Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

I am creating custom rest resource using this code: <?php /** * Provides a resource to get view modes by entity and bundle. * * @RestResource( * id = “region_node_rest_resource”, * label = @Translation(“Region node rest resource”), * *... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Unable to uninstall the Field Collection module

I want to remove field collection module in Drupal 8 as the module has been deprecated. When I try to uninstall after removing the fields from content type the option to uninstall is greyed out. I get an error field_collection: There is content for the entity type:... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Restful permission is required

I’ve created a @RestResource plugin to provide a REST endpoint to get some data, but when I try a GET from Postman it shows this error: { “message”: “The ‘restful get ez_share_document_resource’ permission is required.” } I... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Webform hook field text element

I Use Drupal 8.8 with Webform 8.x, in a simple webform with a select list element and a text field element, I need to update a text field element with values resulting from database queries when the user chooses an option from the listbox. I would like to accomplish... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

How do I use the administrative theme?

I’m building a custom Drupal theme and wondering if there is a way to get the modal windows to use the default admin theme. I’m using the Layout builder module with a custom block that uses the Media Library module and it uses jQuery UI classes. This is... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Get the user’s current language code

How can I get the user’s current language code in a view as a raw value, for example en or fr-ca? This isn’t for filtering content. I need the raw value of the users’ current language to pass into a URL for a third-party tool. I added a custom text... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Ajax callback is not working on views exposed filters

I am implementing dependent filters in views exposed filter for content:datasource search(Solr search). I have a requirement that in exposed dropdown field when a category is selected, by ajax i need to fetch the sub-categories and show up in another dropdown.For this... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Set SameSite=strict for session cookies

I’m trying to figure out how to set the SameSite cookie attribute for Drupal 8 session cookies, but I can’t find a solution. I thought SessionConfiguration might give me enough options, but it seems not. Where can I perform such magic? read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Is it possible to get the node ID of the node that will be created?

Trying to pass some information to third party API, every time a new node is created. So far I have managed to identify the node insert/create when a node is created in hook_node_presave(). Done it by using empty($node->id()). Now I want to anticipate what the node... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Drush does not run command, but prints the php script

We have a special server that runs php5.x and relies on drush 5.x. PHP 7.0 is installed, but the sites on the server all run PHP5, because PHP7 breaks them. We have previously had drush 5 on it, but it didn’t work anymore for some reason. So what I did was... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

What’s the quivalent of node_access()?

I need to test if a given user (in my case, the currently logged-in user) has access to a given node for one of the existing operations. In Drupal 7, I could use the following code. if (node_access(‘view’, $node, $account)) { // User is allowed to see the... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Run code once on each page load

In the past there were some hooks, such as described here: How to run check on each page load? to execute arbitrary code on each page load. Now this has been replaced with an event based approach. I wrote this to check it out: class MyModuleEventSubscriber implements... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

Invalidating Paragraph Cache

I’m working on a paragraph type that will need to display on a very limited number of pages but has some specific functionality where the preprocess function will need to run each time. In my preprocess function, I’ve tried various iterations of the... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

How do I programmatically add fields to Paragraph types?

I have one paragraph type of Product. and I have to add one field to paragraph product programmatically, how can I achive this. function my_module_field_widget_paragraphs_form_alter(&$element, FormStateInterface &$form_state, $context){ if... read more
Getting error {"message":"No route found for u0022GET /standortimporter/region_node_rest_resourceu0022"} custom rest POST

How to redirect a user on login?

I have a registration form, when submitted, the user gets logged in automatically. I want to redirect the users to a specific page on login. Whether they are logged in using the login form or through the registration form. I used the following code first, function... read more