🇧🇷Brazil @irafah

Account created on 7 January 2020, almost 5 years ago
#

Recent comments

🇧🇷Brazil irafah

I'm late to the party but will leave an answer in case anyone needs it

@DaveMatt, the code looks fine, but the issue is that you are creating the items on a preprocess hook, which means that it runs every time the menu is loaded. 

You can easily fix it by creating the menu items on a hook_update, so the items will be created once when the database is updated (prob via "drush updb")

Cheers!

🇧🇷Brazil irafah

I started the update over and this time it worked as expected. Might have been a local issue
Thanks for looking

🇧🇷Brazil irafah

After updating the site from version 10.3.1 to 10.3.2 and applying patch #179, the site went down - `The website encountered an unexpected error.`
The main error:

 Error: Class "Drupal\language\AdminLanguageRender" not found in /app/web/core/modules/language/language.module on line 148 #0 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): language_element_info_alter(Array, NULL, NULL)

What is weird is that the class is indeed there and I can even access it by clicking ctrl+click over the class, which shows that it does find it

Has anyone faced anything like this with core 10.3.2?

🇧🇷Brazil irafah

I had the same issues, applied the patch from #175 and it worked correctly. It seems it is still needed even after the previous merge at #170

🇧🇷Brazil irafah

This issue can be closed. It was more related to custom code than contrib/core.
We started by adding drupal/once to the dependencies and replacing jquery once with Drupal once. The rest was custom code.

Thanks!

🇧🇷Brazil irafah

Hello! I investigated this issue and I noticed that enable_save_preferences_button (Cookies categories section) is set as TRUE in a couple of places. Why is that?

I think this field should be set as FALSE considering that the default value for the "Consent method" is "Opt-in" not Opt-in with categories (which is the one that makes the Cookies categories visible)

Otherwise, we will have this issue when configuring the module for the first time, as there are two mandatory fields hidden.
If you are not using the "Opt-in with categories" option, a workaround is to manually check "Opt-in with categories", uncheck Replace the Agree button with "Save preferences" and "Accept all categories" buttons, then choose the option you want and configure as usual.

Some places where I found it:

eu_cookie_compliance.settings.yml#L63
eu_cookie_compliance.install#L454
EuCookieComplianceMigrateTest.php#L45
🇧🇷Brazil irafah

The reason why this issue happens is because of the "Replace the Agree button with "Save preferences" and "Accept all categories" buttons." that is checked by default, which makes the other two fields ("Save preferences" and "Accept all categories") to be required.

If you check the code at EuCookieComplianceConfigForm.php#L274, you will see that the default value comes from the config, and, for some reason, it is set as TRUE even before it is visible.

'#default_value' => $config->get('enable_save_preferences_button')

I tested something like !empty($config->get('enable_save_preferences_button')) ? $config->get('enable_save_preferences_button') : FALSE,, but it didn't work.
Perhaps because there's something set in enable_save_preferences_button, and it is considered "TRUE".

I'm having some issues with my Xdebug, so, that's why I haven't had a chance to check it properly.
In case anyone can check that before me and make the necessary changes to make the field default to FALSE unless TRUE has been properly set, that would be fab.

Thanks!

🇧🇷Brazil irafah

I can confirm this issue is also happening to me when I try to save the settings.
The same steps to reproduce the error.

Production build 0.71.5 2024