The commit "Fixed: Multilingual variables cache being rebuilt every page load, by patrick2000, #905428" (650b3f4c8c04232ab0a9757a27da8f7aff3caaa1 on Thu Sep 9 2010) changed _i18n_variable_exit() so that variables would only be saved if they had a corresponding entry in $i18n_conf:
- foreach ($i18n_conf[$langcode] as $name => $value) {
- if (isset($conf[$name]) && $value != $conf[$name]) {
+ foreach (i18n_variable() as $name) {
+ if (isset($conf[$name]) && isset($i18n_conf[$langcode][$name]) && $conf[$name] != $i18n_conf[$langcode][$name]) {
As a result, since version 6.x-1.7 any module that attempts to stores a multilingual variable in their form submit handlers will not have it saved to the i18n_variables table. If a variable was previously saved to the i18n_variables table (for example, while using an older version of the i18n module) then it will be unaffected.
This was discovered while looking into Ubercart issue #834290: Address fields are no longer multilingual variables and cannot be translated.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1205804.patch | 877 bytes | caktux |
Comments
Comment #1
klonos...coming from #905428: Multiple issues with i18n variables: wrong multilingual variables, cache rebuild, etc..
Comment #2
caktux CreditAttribution: caktux commentedI think this might do the trick without bringing back the cache problem...
Comment #3
klonos...what do we need to test here?
Comment #4
caktux CreditAttribution: caktux commentedMultilingual variables get saved (created) outside of a settings page and making sure the cache doesn't get rebuilt every page load. Was also coming from the Ubercart issue #834290: Address fields are no longer multilingual variables and cannot be translated
Comment #5
caktux CreditAttribution: caktux commentedComment #6
klonosok, thanx for taking the time to respond, but I was referring to any actual step-by-step reproduction of the bug that I could test and confirm working after applying the patch. Any way to repro this one without having to install UC?
Comment #7
ar-jan CreditAttribution: ar-jan commentedHm, the patch in #2 applied, but it didn't solve the problem with Ubercart for me.
Comment #7.0
mgiffordadding a #
Comment #8
joseph.olstad