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

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 ?

(D9) Change max length of slogan field in translation

With THEME_form_system_site_information_settings_alter i can change the max field length of the site_slogan form, like:

function THEME_form_system_site_information_settings_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  $form['site_information']['site_slogan']['#maxlength'] = 500;
}

Apparently the form for the slogan in the site information translation is different,

thus forexample in /admin/config/system/site-information/translate/en/edit

There is other form for the slogan.

Cannot flag nodes and comments automatically

I created a code to automatically flag nodes and comments. When I put only the code to flag the nodes, it works. But when I add the code to flag the comments it doesn't work anymore.

Which code should I use ?

Pages

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