Bug #19442
When inserting prices in tx_commerce the input is always transformed into NaN##
Status: | Resolved | Start date: | 2008-10-09 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Michael Stucki | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 4.2 | Is Regression: | ||
PHP Version: | 5.0 | Sprint Focus: | ||
Complexity: |
Description
jsfunc.js seems to interpret prices incorrect.
Examples:
122.00 is transferred into "NaN00"
1888.12 is transferred into "NaN12"
0 is not transferred. Blank neither.
(issue imported from #M9524)
Related issues
History
#1 Updated by Stefano Cecere almost 7 years ago
i confirm this bug!
(on common decimal fields!!!)
#2 Updated by Stefano Cecere almost 7 years ago
it seems the bug is in line 172 of jsfunc.evalfield.js
theVal=this.parseInt(this.noSpace(theVal))+TS.decimalSign+dec.substr(0,2);
it's this function call that returns the NaN00
#3 Updated by Stefano Cecere almost 7 years ago
is seems that that TS.decimalSign variable is undefined .. where does it come from?
#4 Updated by Stefano Cecere almost 7 years ago
yes the problem is that TS.decimalSign undefined...
#5 Updated by Steffen Kamper almost 7 years ago
is defined in jsfunc.tbe_editor.js
#6 Updated by Stefano Cecere almost 7 years ago
yes i found it...:
function typoSetup () {
this.passwordDummy = '********';
this.decimalSign = '.';
}
var TS = new typoSetup();
but checking the whole script running (via Firebug) TS.decimalSign is undefined when it is called jsfunc.evalfield.js
the bug happens either in FF 3 and Safari 3 (so it isn't another FF 3 quirk)
#7 Updated by Stefano Cecere almost 7 years ago
could it be it is because jsfunc.evalfield.js is loaded in the main page header, and jsfunc.tbe_editor.js in the sub sub iframe of the page?
#8 Updated by Christian Hernmarck almost 7 years ago
Maybe same as #19423 ?
#9 Updated by Stefano Cecere almost 7 years ago
yes, it is the same problem (the order of loading .js files and the TS object not istantiated)
#10 Updated by Michael Stucki almost 7 years ago
Duplicate.