Active
Project:
Ubercart Internationalization
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Jan 2012 at 08:51 UTC
Updated:
25 Apr 2012 at 13:05 UTC
Jump to comment: Most recent file
Comments
Comment #1
splash112 commentedHi gkom,
Strange, it should work like that.
Could you check your the weight assigned to the modules? It should be higher then uc_attribute
Comment #2
gkom commentedI haven't manually changed the weights and they are already as you suggested:
uc_attribute weight = 0
uc_i18n = 2
I checked the values saved in the database and they seem fine for both 'uc_i18n_attributes' and 'uc_i18n_options'.
I specifically checked the "oid" and "language" values and they are correct.
Also, the other functions that 'translate' the cart and the checkout are working nicely.
Any ideas?
Comment #3
splash112 commentedDo you have some other modules that manipulate attributes?
Maybe make the module weight of uc_i18n a little higher?
Thanks
Mark
Comment #4
stewart.adam commentedI was bumping into this too, issue is that hook_nodeapi() overwrites $node->attributes with the new data but doesn't return anything. From the hook_nodeapi() documentation:
So the data returned by uc_attributes take precedence over ours. Attached patch should resolve the issue.
Comment #5
splash112 commentedHi Stewart,
Strange this happens. As you found uc_i18n indeed overwrites the attributes, displaying them in the correct language. This is what the module is doing flawless on my site for the past half year or so...
My best bet still is that another module is reloading the attributes again. Which modules are you both using?
Comment #6
stewart.adam commentedYou're right, I just tested this on a local installation with a stock install of Ubercart and it does work. I believe that we should be returning the translated attributes anyways (as the implementation of hook_nodeapi() does in uc_attribute.module) but I'll try to look into this to see what module is resetting the attributes. I tried enabling a few common modules (uc_addresses, uc_product_minmax, uc_option_image, uc_node_checkout, uc_ajax_cart, uc_aac, uc_recurring, uc_recurring_product) and they didn't trigger the issue so it perhaps it's a theme? The site I was experiencing this on was using an AdaptiveTheme-based theme, if I recall correctly.
Comment #7
splash112 commentedA theme shouldn't do anything, if I understand the basic Drupal logic a little.
Could be easily tested though, maybe try and see what happens (just enable the garland theme for yourself on that site.
Or just check the systems table and see which Ubercart modules have a weight of 2 and higher.
Thx
Mark
Comment #8
stewart.adam commentedI checked which modules have a weight of 2 or higher on my test site and on the site I'm experiencing the issue on, here are the results:
Test site:
Problematic site:
gkom, do you have any modules from the second list installed on your site too? You can generate this list by running this query:
Replace dbprefix_ with your actual database prefix (or omit it if you don't have one).
Comment #9
splash112 commentedSo far found a problem with the default language name and description not being saved to the right place in the DB. So you can edit all you want on the translate pages, but it won't change anything.
Just for the default language though....
Comment #10
splash112 commentedMight want to try and raise the weight of uc_i18n somewhat to like 12 or something and see what happens. Quick and easy test to check on uc_aac and _uc_taxes.
Comment #11
splash112 commentedTheir might be a solution in #1228110: Localization on the product page. Could anyone with this problem try that?
Comment #12
caw67 commentedSorry, module weight doesnt work...