


How to redirect current articles URL to query string URL?
I wants to change my articles page URL and add a query string parameters for all articles content. Existing URL:: http://example.com/articles/test Expected URL:: http://example.com/articles/test?q=blog I have tried below code but page redirecting too many times.... read more
how to analyse kint(header) in views-view.html.twig
I have problem to analyse output of kint. I am in views-view.html.twig and run {{ kint(header) }} This is output of kint: How to print just en, value of field_flag_code filed. I understend begining and the end, but I miss the middle. {{ header.entity_taxonomy_term... read more
How to get the current page URI in Drupal 8?
How to get the current URI in drupal 8 programmatically? read more
How to send a contact form via JSON:API?
What are the requirements for submitting the contact form using JSON:API? I enabled the core Contacts module and set up a custom site-wide contact form. I gave permission to anon + auth users to submit the form. Next, I enabled JSON:API. I can see the contact form at... read more
Bibcite: How to sort publications by last name of first author?
Bibcite module: I have a view which shows all publications and I’m using the citation field. But every publication is shown as many time as many authors it has. When I’m using aggregation (count distinct) on one of the sorting items only one publication... read more
drush configuration import export order of the yml
I recently upgraded some minor versions of modules and upgraded Drupal core-recommended to 9.3.3 from 9.2.9. I followed the usual drush updatedb, drush cim -y drush cr and everything looks fine. In my local env, everything is fine. However, in my dev environment in... read more
How to extend core block class SystemMenuBlock
Please advice how we can extend the core block class DrupalsystemPluginBlockSystemMenuBlock and add custom function in it. For example, I want to add customBuild() function there I can make custom render arrays. read more
Publishing Options for Content Type Not Showing
I am on version 9.3.2. When I change the Publishing Options for any content type, nothing changes on the node’s edit page or the new content page. Not sure when this changed, but a year ago it was working. Any idea how to get the publishing options to show up as... read more
How do I display field from one content type in another content type
I am working with Drupal 9. I found other questions similar, but I do not understand what they are saying to do, and they are 10+ years old so I do not know if they still apply. Maybe the best way to describe this is how a SQL JOIN might handle it in a query. I... read more
Problems with drupal core update from version 7.83 to 7.8x
Since a few weeks I have problems with the drupal core update. I am on version 7.83 and as 7.84 was released I’ve tried to install it as usual, (clear everything beside the sides folder an some theme files, then ftp the new files on the server and update the... read more
Do something when a content is saved
I’m a total beginner in module coding and i’m trying to adapt a simple D7 module which is updating a field from a content type from an external API when the content is created or modified. On an fresh D9 install, i’ve created a module named :... read more
Entity route requirement not working
I’m trying to get the following route working but the entity bundle requirement won’t work. If I switch requirements to _access: ‘TRUE’ it works but entity checks are not working. I’ve traced it to EntityBundleAccessCheck.php where the... read more
ERROR 1062 (23000): Duplicate entry ‘/-de’ for key ‘PRIMARY’
When importing a dump from a production site with mysql in a xampp environment I got this error: ERROR 1062 (23000): Duplicate entry ‘/-de’ for key ‘PRIMARY’ These lines are affected: ALTER TABLE `redirect_404` ADD PRIMARY KEY... read more
How to change html ‘lang’ when node is created with a different language from the site’s default
I would like to change a node’s html ‘lang’ from site’s default to the selected language when creating a node. For example, if I create a node and while creating I select French as the language, I would like the page’s html... read more
Drupal 7 and/or CKEditor adding paragraphs to code breaking styling
I’ve recently started a new job where I’m managing a Drupal 7 website for the first time. We will be moving away from this platform soon, but I have to maintain this site for the time being. I’m trying to add a new form to one of our pages, but... read more
Render custom region into node twig template
My code used for D8 doesn’t work anymore for D9. Custom region twig template for region into node twig template I get thise error and WSOD: Error : Call to undefined function entity_load_multiple_by_properties() dans themex_add_regions_to_node()... read more
Updated from Drupal 8.9.20 to 9.0.0, but can’t run update.php due to errors
Here’s what I get when attempted to run update.php: Requirements problem Errors found MISSING UPDATES FOR: SYSTEM The installed version of the System module is too old to update. Update to a version prior to 9.0.0 first (missing updates:... read more
Where did my commerce token go after an update to 7.87
My Drupal 7 commerce setup sends out a couple of emails after an order is placed. It uses this token: [commerce-order:commerce-customer-shipping:commerce_customer_address] After updating to Drupal 7.87 (from 7.82), that token started going out as is, not being... read more