After upgrading to rc7, all my address field labels suddenly became empty (both in order checkout, and in admin / edit address fields).
When I commented out the assignments to $conf['i18n_variables'][] in uc_store.module:uc_store_init(), the labels came back.
I don't have any uc_field_* variables in my {variables} table, so I expect to get the default names.
I have the i18n modules installed, latest release (6.x-1.1).
I have no experience with the use of i18n_variables so I didn't digg any further... Anything else I should try?
Comments
Comment #1
xibun commentedseems same issue as this: http://www.ubercart.org/forum/support/13156/cannot_edit_delivery_and_bil...
Comment #2
wimh commentedYes that's exactly what I'm seeing.
Comment #3
wimh commentedOk I think I got it: the problem is in the i18n module which messes up the default settings. (It writes an empty string to $conf[(my-i18n'd-variable)] instead of NULL or unset()ing it, variable_get() therefor just returns the "" instead of using our default).
They know of the problem #527534: Unset variables set to be multilingual don't show default values, the fix just isn't released yet but the patch in there works for me.
Comment #4
xibun commentedDid you do anything else then apply the patch? I'm using the dev version now and the problem is still the same.
Comment #5
gregober commentedSorry I have applied the patch in the i18n.module file and that didn't change anything.
I still have no field displayed on the checkout page.
Comment #6
xibun commented@gregober: won't fix is the status a maintainer set's when he will not fix a problem. I put this back to active - even tough "duplicate" might be correct in the long run.
Comment #7
wimh commentedI commented out some stuff in uc_store.module (see original post), that solved it.
Then I installed the patch for i18n, and reverted my changes to uc_store.module, and it kept working.
So I guess no, I didn't do anything else.
You mean the dev version of i18n ? Because the dev version of Ubercart won't help, nothing is changed there.
Comment #8
wimh commentedI also just checked my variables tables: both table variable and i18n_variable do not contain any uc_field_* variables (just as before), so nothing changed there either...
Comment #9
xibun commentedThanks for coming back to this. Yes, I'm using the dev version of i18n as it includes the patch mentioned in #527534: Unset variables set to be multilingual don't show default values.
Comment #10
wimh commentedFor you guys where it's not working: can you try the commenting out I did originally, and see if that solves it?
Also, did you by any change go to Admin > Store > Address Fields and pressed OK? This would save the empty field descriptions as your preferences, which override the default. So check the i18n_variables table and confirm it doesn't contain any uc_field_* entries (and delete them if there are any).
Comment #11
wimh commentedI just tried this myself (first undid the patch, pressed Save on the empty address fields, and redid the patch).
To get the names back I had to clear out the uc_field_* entries in table variables though, not i18n_variable (the latter didn't have any), and also clear out the caches, so something is probably wrong in the way I understand the i18n_variable thing. But I did get it fixed, so hopefully you can find some ideas here to make it work for you...
Comment #12
xibun commentedGood news!
Commenting out the $conf assignments doesn't help.
But for some reason the Title fields in Address fields were empty! Filling them back in brought the fields in checkout back.
-> it's in "Store administration / Configuration / Checkout settings / Address fields"
Just as a note: my feeling is that it was not a manipulation mistake on my side, but a side effect of the update process.
Thanks wimh for solving this!
Comment #13
wimh commentedHi xibun, glad you got your site working again.
But we can't have everyone fill in the fields again manually, there should be an automatic fix, or a patch that prevents this from happening. I'm marking this issue as active again for now...
Comment #14
wimh commentedI'll put it to "needs review" as we probably know what the solution is (apply #527534: Unset variables set to be multilingual don't show default values or install i18n-dev), but I'd like confirmation from someone else before closing this...
Comment #15
tearslake commentedHere's what I've done:
- Commented out in uc_store.module:uc_store_init() all $conf['i18n_variables'][] assignments
- Did the patch update for line (now it sets the NULL value) for i18n.module: $i18n_conf[$name] = isset($variables[$name]) ? $variables[$name] : (isset($conf[$name]) ? $conf[$name] : 'NULL');
- In database removed all uc_field_* entries from both tables: variable and i18n_variable
- Cleared the Drupal cache in admin/settings/performance
Now it shows all entries except the "Street address 2"... But I find it not necessary so I am happy :)
Comment #16
tearslake commentedUpdate: the "Add to cart" button text disappeared so I reverted everything back and installed the dev version of i18n module. All is working now.
Comment #17
Island Usurper commented