Problem/Motivation
Eu Cookie Compliance works normal on a drupal 8 site but dosen't work on a lightning distribution (8.x-3.104): configuration form admin/config/system/eu-cookie-compliance dosen't submit.
This issue makes lightning distribution "unusable" for EU countries....
To reproduce: on a fresh lightning install with composer, enable eu cookie compliance module and try to change modules configuration form.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | config.zip | 29.26 KB | jollysolutions |
| #11 | eu_cookie_compliance-expects-specific-text-formats-to-exist-2979440-11.patch | 3.16 KB | svenryen |
Comments
Comment #2
marcel66 commentedI have verified and the issue is caused by text_format in Eu Cookie Compliance config form.
For normal drupal installation the module use restricted_html text format, but lightning distribution doesn't use this format, only rich text format.
I think is normal how Eu Cookie Compliance works and should be Lightning problem to transform restricted_html to rich text, if distribution decided to don't use usual drupal formats.
Comment #3
Andy_D commentedThis is a serious issue considering the importance of the cookie module.
Comment #4
marcel66 commentedHello,
I consider it is not a major issue because anyone may install restricted html or any configuration for text format and solve the problem.
It is also possible to change the test format in eu_cookie_compliance module...
I have created this issue because, in my opinion, if lightning maintainers have decided to remove some text formats from lightning distribution .... we should also find a solution to activate modules which use such text formats (probably transforming different text formats modules may need to lightning default text format .... if we don't want to add a new text format)....
Comment #5
phenaproximaI'm not sure this is Lightning's problem to solve. Here's why I think so:
Text formats, like many other things in Drupal, are configuration. The nature of configuration is that, once a module is installed and its default configuration is imported, the site owns the configuration and therefore, any text format may be modified in any way. Any text format may be removed at any time for any reason.
EU Cookie Compliance, therefore, cannot assume that a specific text format always exists, and if that's what it's doing, it is mistaken.
So this, to me, is a problem with EU Cookie Compliance itself, not Lightning. I am re-titling this and moving it to the module's issue queue. Sorry!
Comment #6
svenryen commentedI thought we had set a fall back to the default text format in the case Full HTML isn't available. Definitely this should be fixed. I'll look into it.
Comment #7
adam-vessey commentedSome observations: It appears that the "restricted_html" format is installed by Drupal's "standard" installation profile; therefore, "minimal" installations lack the format by default, leading to errors in the watchdog logs about the missing format...
The admin form does appear to select another format which is present; however, it requires submitting the form to make it happen.
Should this module ship its own format to use by default? Or somehow make reference to the "standard" profile's "restricted_html" format, to install it when the module is enabled, if the format is not present?
Comment #8
svenryen commentedComment #9
Pascal- commentedComment #10
tiikeri commentedI'm writing here to give a feedback, because I opened an issue which seems a duplicate: https://www.drupal.org/project/eu_cookie_compliance/issues/3109900
I'm not working with lightning distro, but the scenario is similar, because I made a migration into a drupal8 minimal profile, where the "restricted_html" format is not enabled by default. The observation of Adam in #8 may suite my case too.
In my old drupal7 site I had different machine name for "restricted HTML" format, so, into the migrated drupal8 minimal profile I enabled the module and created a "restricted_html" machine named format by my own, without CKEditor. I can give it another check, but I already tried this solution before opening my support request and didn't solved the issue.
If I will have any news about this I will let you know.
Comment #11
svenryen commentedHere's a patch that cleans up a bit after importing the install yml schema.
Test notes
- Uninstall the module
- Delete "Restricted HTML"
- Install the module again
- Verify that we are using a text format that exists; either Full HTML or the default text format for the site.
Comment #12
svenryen commentedComment #14
neslee canil pintoCommitted to dev branch. Thank you.
Comment #15
neslee canil pintoComment #16
jollysolutionsTrying to install with existing config built from minimal profile we get the following error with this applied
Reverting to before the patch does not produce an error.
Webform had I similar issue which was fixed in these two issues
https://www.drupal.org/node/2890035
https://www.drupal.org/project/webform/issues/2919721
Comment #17
svenryen commentedHi @jollysolutions. I tried to reproduce.
I'm running Drupal 8.9 and EUCC 8.x-1.10. I deleted my database and reinstalled the Minimal profile. When I do that I get a Plain Text text format. And then when I install EU Cookie Compliance, I don't get this error.
Here are my steps, are there different steps to reproduce?
1. Install Minimal profile
2. Install EU Cookie Compliance
I also tried to disable the Filter module, but that's not possible when Text and Node are installed.
Comment #18
svenryen commentedMaybe you could send me your config so I can try to reproduce installing that one?
Comment #19
jollysolutionssteps to reproduce
1. Install drupal with minimal profile
2. Enable EU Cookie Compliance
3. Export config
4. Delete Database
5. drush si --existing-config
6. ERROR as above
Example from above included
Comment #20
svenryen commentedRight, didn't get the part where you had to import the config from the first install. I'll take a look tomorrow afternoon.
Comment #21
svenryen commentedComment #22
svenryen commentedThanks. I was able to reproduce. I'm not really sure that's a module bug though. There was a text filter in the config and the module declares that it needs
filter.I'll investigate a bit further.
Comment #23
svenryen commentedI opened a new issue, since it's not related to the fix being discussed here.
#3176439: Error when installing minimal profile (config export)
Comment #24
svenryen commented