🇦🇺Australia @iaslam

Account created on 10 July 2023, over 1 year ago
#

Recent comments

🇦🇺Australia iaslam

Any reference of how to inject services in a custom bundle class extending Node?

I added this constructor:

   public function __construct() {

   }

And got error like this:

BasicNode::__construct(): Argument #1 ($node) must be of type Drupal\node\Entity\Node, array given, called in /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php

And not surprisingly for Drupal, there is no proper (or easy to find) official documentation on this change except this page.

Cheers

🇦🇺Australia iaslam

It is not working with Drupal 11

🇦🇺Australia iaslam

Why is it such a simple thing like getting query param in template file so complicated? And on top of that, no clear documentation!

🇦🇺Australia iaslam

Beyond understanding why simple things are so complicated in Drupal. Installing plugin to add a body class is just horrendous for me.

🇦🇺Australia iaslam

I don't understand why this went unanswered. I am facing same annoying issue, I did some config change in my dev environment which included some module configuration which I didn't like and wanted to revert. I did drush cim command as well as import from the configuration page it is always displaying one particular config as different which is actually not different and the only difference is the order of configs which is technically not a difference and one would see this as a bug.

🇦🇺Australia iaslam

The above patch works for me.

🇦🇺Australia iaslam

I have a request for one of our clients to change the 'Postal code' label to 'Post code' saying Postal code is an American thing. We are based in Australia.
Since the labels are not configurable from the back-end, is there any proper way to do so through the hooks and without translations definition?
I tried the method mentioned at https://docs.drupalcommerce.org/commerce2/developer-guide/customers/addr..., however in my case, the $form_id is not same on different pages for a same form. It is like

'webform_submission_get_in_touch_node_36877_add_form' 

whereas I expect it to be

'webform_submission_get_in_touch_add_form'

(it is right on some pages though_.
So the above link does not help in my case.
Any workaround would be appreciated.

Thank you

Production build 0.71.5 2024