On a site using i18n, upgrading from 7.x-1.28 to 7.x-1.31 runs 3 hook_update_Ns and the eu_cookie_compliance variable gets reset.

In eu_cookie_compliance_update_7011, i18n_variable_set() executes variable_realm_refresh() which does a unset($GLOBALS['conf']['eu_cookie_compliance']);.

Then, in eu_cookie_compliance_update_7012, when variable_get('eu_cookie_compliance') is called, it returns empty array. When variable_set('eu_cookie_compliance') gets called, the empty array (with a few new values) is saved.

My suggestion is to use variable_realm_set() instead and explicitly turn off $rebuild:

variable_realm_set('language', $langcode, 'eu_cookie_compliance', $settings, FALSE);

CommentFileSizeAuthor
#2 3090247-2.patch2.4 KBbwaindwain

Comments

bwaindwain created an issue. See original summary.

bwaindwain’s picture

StatusFileSize
new2.4 KB
bwaindwain’s picture

Issue summary: View changes
Status: Active » Needs review
bwaindwain’s picture

Issue summary: View changes
bwaindwain’s picture

  • svenryen committed c01c33e on 7.x-1.x authored by bwaindwain
    Issue #3090247 by bwaindwain: Update from 1.28 to 1.31 - default...
svenryen’s picture

Status: Needs review » Fixed

Thanks for the patch.

Status: Fixed » Closed (fixed)

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