Comments

jukka792 created an issue. See original summary.

valssi’s picture

The field [popup_agree_button_message] is on the admin form but hidden for some reason. I was still able to change/translate the text.

svenryen’s picture

Status: Active » Postponed (maintainer needs more info)

@jukka792 and @valssi , can you run `drush vget eu_cookie_compliance` and share the output?

vradova’s picture

Hello!

I have the same issue and fix it by change code in file "eu_cookie_compliance.admin.inc".

I have replace line from 347 to 360 with this code:

"$form['popup_message']['eu_cookie_compliance']['popup_agree_button_message'] = array(
'#type' => 'textfield',
'#title' => t('Agree button label'),
'#default_value' => isset($popup_settings['popup_agree_button_message']) ? $popup_settings['popup_agree_button_message'] : t('OK, I agree'),
'#size' => 30,
'#states' => array(
'visible' => array(
'input[name="eu_cookie_compliance[enable_save_preferences_button]"]' => array('!value' => 'default'),
),
'required' => array(
'input[name="eu_cookie_compliance[method]"]' => array('!value' => 'default'),
),
),
);"

I know that I should made a patch but right now I do not have a time for this. Sorry :(

Just change those lines and flush Drupal cache. After that you will get a field with option to change label OK, I agree.

Regards, Vlade.

jukka792’s picture

Thanks, #4 worked for me

florianmuellerch’s picture

Patch from comment #4. Wrong state visible condition fixed.

florianmuellerch’s picture

Category: Support request » Bug report
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Needs review
svenryen’s picture

Status: Needs review » Needs work

Thank you for the patch @fmueller_previon.

There is one problem with this patch;
when the user has selected "Opt-in with categories." and "Replace the Agree button …", the "Agree button label" field is supposed to be hidden.

With your patch, the "Agree button label" field stays visible.

The issue needs work.

svenryen’s picture

Here are patches that work.

With this code, the Agree button label field is visible when the consent method is set to Categories AND the checkbox to replace the Agree button with Accept all categories is NOT checked, OR when ANY other consent method category is selected.

  • svenryen authored e13b335 on 8.x-1.x
    Issue #3067433 by svenryen, fmueller_previon, jukka792, valssi, vradova...

  • svenryen authored 817400c on 7.x-1.x
    Issue #3067433 by svenryen, fmueller_previon, jukka792, valssi, vradova...
svenryen’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

joachim desarmenien’s picture

Hello,

Thanks you very much for your work.

We have about 40 Drupal websites running with this module, patching each one would be very time consuming.
Is there a plan to commit this patch to the module ?

Thank you very much

smurfxx’s picture

I'm in the same situation of @joachim desarmenien, the patch works and it's mandatory for this module, I don't know why it's not committed yet!

lowfidelity’s picture

If you're just looking for a quick fix without patching your site, you can simply visit the admin page, start your browser's inspector (like firebug or chrome developer tools) usually by clicking F12, then search for "form-item-eu-cookie-compliance-popup-agree-button-message" and display the missing textfield by removing the "display:none" property of that dom element.

wotney’s picture

Why on earth is the "form-item-eu-cookie-compliance-popup-agree-button-message" set to display:none ????

PatricNox’s picture

Without patch:

Go to the settings page in admin
/admin/config/system/eu-cookie-compliance

Right click -> inspect -> console

Paste this:
document.querySelector('.js-form-item-popup-agree-button-message').style.display = 'block';

drupaldope’s picture

this is not fixed in Drupal 8

charlysole’s picture

@wotney
absolutelly right
Why on earth is the "form-item-eu-cookie-compliance-popup-agree-button-message" set to display:none ????
just change display none to block or disable that css rule and it works perfectly!

2flower’s picture

7.x-1.31, still invisible. Why?