https://bugzilla.wikimedia.org/show_bug.cgi?id=32661

--- Comment #6 from Edward Akerboom <[email protected]> 
2012-02-07 13:02:30 UTC ---
Hello Jeroen,

Nope, I was hired to fix the issue on the wiki-products site and (therefore)
only looked at that. This code was called from the SMWCompatibilityHelpers
class, if I'm not mistaken.

The issue here was that the localized value was stored in the database, in the
value_xsd column. I don't think that the localized data should have ever ended
up in the database, but that's another point entirely. In any case, the
value_xsd column contained the value "3,8" and the value_num column contained
the value "3". The value "3,8" was read from the db, and (incorrectly)
unserialized to "3", and that value was passed on and ended up in all overview
and comparison pages. Note that the value in "value_num" is also incorrect -
the numerical value of "3,8" is not "3" but "3.8". 

Anyway, if you want to reproduce, I think that's easy: take an existing SMW
install, find a key with a numerical value, and put a localized string ("3,8"
for example) in the 'value_xsd' column. Then go to the corresponding
'attributes' page, and you will (most likely, didn't test) see that the listed
value is incorrect.

I'm not sure if that helps. I understand that the above fix might not be the
'correct' way to fix it, but I'm only superficially familiar with your code
architecture. If there is a better way to fix it, please do. My guess would be
that the 'real' bug is that the value "3,8" ended up in the database (instead
of 3.8). I think this could be caused because the wiki-products site runs in
two different locales (English and German) that have different and incompatible
rules for how to format a number. Just my two cents. If you need more info,
shoot.

Best,
Ed

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to