[D 10.1.4] Error when trying to translate banner

Created on 5 February 2024, 9 months ago
Updated 7 February 2024, 9 months ago

Problem/Motivation

When I go to "/admin/config/system/eu-cookie-compliance/settings/translate/xx/add", an error is thrown. I can't translate the banner because of it. I tried to translate it to different languages present on my website but it's still not working.

Steps to reproduce

I just freshly installed the module on a website, configured it and now, I'm just trying to translate the entity normally.

🐛 Bug report
Status

Needs review

Version

1.24

Component

Code

Created by

🇨🇭Switzerland zilloww

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @zilloww
  • 🇨🇭Switzerland zilloww

    I fixed this issue by noticing that in the config/install folder of the module, there is a eu_cookie_compliance.settings.yml file that contains the key 'langcode' defaulted to 'en'. Since I don't have English language on my website, Drupal doesn't recognize the langcode 'en'. That's the source of the error.

    To fix this:

    1. Go to your drupal/config/sync
    2. Open the file "eu_cookie_compliance.settings.yml"
    3. Add the "langcode: xx" (replace 'xx' by whatever is your default website language for example "langcode: fr"
    4. drush cim
    5. Clear cache
    6. The issue should be fixed
  • Status changed to Needs review 9 months ago
Production build 0.71.5 2024