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

Custom module how to include JS/CSS with contenthash in file name ?

What is a good way to include JS and CSS files in a module using the .libraries.yml file that have file names as follows :

abc-61c284b39224e2b2e4d5.css

abc-61c284b39224e2b2e4d5.js

The JS and CSS are generated using contenthash which would change on every build of the files if their content changes. How can I include these files in my pages using the file name as only : abc without caring for the contenthash ?

How do I get the administrator to automatically flag ?

I created a module for flagging entities automatically when created or updated.

There are some errors in my code because only nodes work.

If a user "user1" creates a node, the flag will be in his name. I want the flag to be done automatically on behalf of the site administrator.

How do I get the administrator to automatically flag ?

The mailchimp class is not found in my module

The mailchimp class is not found in my module.

I use phpStorm. The project recognize the class ...

The info is found at: https://mailchimp.com/developer/guides/marketing-api-quick-start/

composer require mailchimp/marketing

Base url server:

/home/mysite/vendor/mailchimp/marketing/lib

/home/mysite/vendor/mailchimp/marketing/lib/Api/

Remove username field from registration form in drupal8

Hi,

Remove username field from registration form, i try with the Email Registration module but my username field is not removed. i want to register the form without the username field.

Why is my code for flagging entities not working ?

I created a code to automatically flag entities when they are created or updated.

With this code only the nodes are flagged but it does not work for the other entities.

What is wrong with my code? Why is it not working ?

There is no error in the logs. The flags are of course the right entity.

How do I flag the update store automatically ?

I created a flag to flag the stores. I want when a user updates a store, the store is automatically flagged. The code below does not work and there is no error message.

I don't want to use the Rules module.

How do I flag the update store automatically ?

Pages

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