Hi I am trying to save and enable the module but when I push the save button, reload the page and reset all the settings.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Ziozas created an issue. See original summary.

Ziozas’s picture

Title: Can't save and enable module » Can't save and Enable banner
bochemie’s picture

Issue tags: +I have the same problem.
svenryen’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Ziozas and bochemie!

I tested a site using version 7.x-1.37 and I can save and enable the banner. The settings are not reset when I reload the page. Are you using Domain access or translations? Also, could you please run drush vget eu_cookie_compliance and share the output here?

StefCarr’s picture

Hi,
I have the same problem on an existing recently updated multilingual site.

Drupal 7.88
eu cookie compliance 7.x-1.37
bootstrap custom subtheme

$ drush vget eu_cookie_compliance
eu_cookie_compliance: { }
eu_cookie_compliance_categories: { }
eu_cookie_compliance_cookie_lifetime: '100'
eu_cookie_compliance_domain: ''
eu_cookie_compliance_domain_all_sites: 0

With a fresh installation of drupal 7.88, eu_cookie_compliance 7.x-1.37 and the same custom bootstrap theme, everything works fine and the output of drush vget eu_cookie_compliance is:
eu_cookie_compliance:
popup_enabled: 1
method: opt_in
info_template: new
enable_save_preferences_button: 1
save_preferences_button_label: 'Save preferences'
accept_all_categories_button_label: 'Accept all cookies'
disabled_javascripts: ''
automatic_cookies_removal: 1
allowed_cookies: ''
consent_storage_method: do_not_store
popup_clicking_confirmation: false
popup_info:
value: "

Questo sito utilizza solo cookie tecnici, propri e di terze parti, per il corretto funzionamento delle pagine web e per il miglioramento dei servizi. Se vuoi saperne di più o negare il consenso usa il tasto \"maggiori informazioni\". Proseguendo la navigazione del sito o cliccando su \"accetto\" acconsenti all'uso dei cookie.

\r\n"
format: full_html
use_mobile_message: 0
mobile_popup_info:
value: "

We use cookies on this site to enhance your user experience

\r\n\r\n

By tapping the Accept button, you agree to us doing so.

\r\n"
format: full_html
mobile_breakpoint: '768'
popup_agree_button_message: Accetto
show_disagree_button: true
popup_disagree_button_message: 'Maggiori informazioni'
disagree_button_label: Declino
withdraw_enabled: 0
withdraw_button_on_info_popup: 0
withdraw_message:
value: "

We use cookies on this site to enhance your user experience

\r\n\r\n

You have given your consent for us to set cookies.

\r\n"
format: full_html
withdraw_tab_button_label: ''
withdraw_action_button_label: ''
popup_agreed_enabled: 0
popup_hide_agreed: 0
popup_agreed:
value: "

Thank you for accepting cookies

\r\n\r\n

You can now hide this message or find out more about cookies.

\r\n"
format: full_html
popup_find_more_button_message: 'More info'
popup_hide_button_message: Hide
popup_link: 'https://www.uniroma1.it/it/node/22402'
popup_link_translate: 0
popup_link_new_window: 1
cookie_policy_version: 1.0.0
containing_element: body
popup_position: false
use_bare_css: 0
popup_text_hex: fff
popup_bg_hex: '005866'
popup_height: ''
popup_width: 100%
fixed_top_position: 1
popup_delay: '1000'
disagree_do_not_show_popup: 0
reload_page: 0
popup_scrolling_confirmation: false
cookie_name: ''
cookie_value_disagreed: '0'
cookie_value_agreed_show_thank_you: '1'
cookie_value_agreed: '2'
domains_option: '1'
domains_list: ''
exclude_paths: ''
exclude_admin_pages: 1
exclude_uid_1: 0
script_scope: footer
better_support_for_screen_readers: 0
cookie_session: 0
eu_cookie_compliance_cookie_lifetime: '100'
eu_cookie_compliance_domain: ''
eu_cookie_compliance_domain_all_sites: 0

svenryen’s picture

Status: Postponed (maintainer needs more info) » Active
svenryen’s picture

I have heard about this bug from time to time but we haven't been able to reproduce. Can you try to uninstall and reinstall the module? Does that help?

svenryen’s picture

Status: Active » Postponed (maintainer needs more info)
StefCarr’s picture

This are the operations I've done:
1. uninstall module
2. clear the cache
3. delete eu_cookie_compliance folder
4. execute update.php
5. reinstall module

but I have the same issue.

svenryen’s picture

Did you also save settings? I'm not sure if we're installing any settings by default in D7.

StefCarr’s picture

Yes, I save settings.

svenryen’s picture

Status: Postponed (maintainer needs more info) » Active

svenryen’s picture

Status: Active » Needs review

@StefCarr, @Ziozas and @bochemie, can you apply this patch and see if you're able to resolve the issue.

I noticed that we're not deleting all settings from the module on uninstall, so I wonder if a corrupt settings array is causing this.

https://git.drupalcode.org/project/eu-cookie-compliance/-/merge_requests...

Please apply the patch, clear cache, uninstall and reinstall the module and see if you still have the same problem.

svenryen’s picture

Status: Needs review » Fixed

I'm committing this. We're no doing a proper clean on uninstall, so if you uninstall and reinstall it should work.

Let me know if it still doesn't resolve your issue.

  • svenryen committed 09631c7 on 7.x-1.x
    Issue #3265246: Can't save and  Enable banner
    
neslee canil pinto’s picture

Version: 7.x-1.37 » 7.x-1.x-dev
Assigned: Ziozas » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.