This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Custom modules are cached after Drupal 8.9 or 9.0

After upgrading to Drupal 8.9 or 9.0 all my custom modules always give the last result as if it's fully cached. I'm logged in as the admin user. On another web browser I get the same cached result.

I quickly wrote a simple module that shows the GET variables, a random number and the first line of a text file.

Each time I start it I get the same output. If I clear all caches in /admin/config/development/performance, I get one time the correct new data.

Until Drupal 8.8.6 all worked fine.

Tested with:

Do derivative plugin block names need to be unique machine names?

Hoping someone might be able to answer this for me. I have a custom module making use of derivative plugin blocks and not sure which one of these are the correct way to ensure the block names are unique:

Option #1) Do I simply save each newly created derivative plugin block name into the config entity using standard textfield and perhaps build my own method for ensuring that the derivative plugin block name is unique (not already in use)?

How can I make email field required

How can I make email field required in add user page (admin/people/create) ?

I tried this in form alter:

$form['mail'] = [
'#required' => TRUE,
];

and this as well

$form ['mail']['widget'][0]['value']['#required']=TRUE;

But didn't work, even when I dump($form), its not showing mail,

Please help me its urgent, I stuck from long time in this.

Do derivative plugin blocks need to have their own unique machine name?

Quick Drupal 8 question as I'm a bit confused and hoping someone can clarify this. I have a custom module which makes use of a derivative plugin and as you can see from the code below I currently have the block ID's and labels hard-coded. But I plan on creating an config entity form to let users define their own block ID's/labels.

Installing code snippet for Intercom integration

I own a fledgling startup with a Drupal 8 website connected. We have an excellent developer however he is busy on other projects and expensive for a startup. I am therefore trying to educate myself on being able to do minor tasks and have managed to integrate Intercom with Tribe, however the Drupal site is another beast altogether.

Getting field value from search results

Hello,

I am using Search API (search_api) and SOLR Search (search_api_solr) modules for searching. I created search page via Search API module. This pages shows Title of node. This node has another field field_link, which is just basic text field. 

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions