LISE doesn't import leading "0"

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
smithdesign77
Forum Members
Forum Members
Posts: 32
Joined: Mon Jan 02, 2017 10:27 pm

LISE doesn't import leading "0"

Post by smithdesign77 »

Hello together,
today I found a funny behaviour and wondered if you could somehow help me to get that solved:
I wanted to update the entries (currently in development, so there are only very few entries) through Excel via the CSV export/import. I downloaded the file, found in one column (a custom text field) leading zeros (it's about drinks; here they have like '0,7 liters'), even so in Excel * - very nice, just as intended.
Saving the file from Excel as CSV also shows the correct field value (checked in a stupid notepad editor software) - however, as soon I upload the file and merge the data into my LISE instance, the values are being changed from '0,7 liters' to '7 liters' — so I assume this must happen on the CMS or respectively LISE part.

My configuration is the newest CMSms release 2.1.6 with the afaik newest LISE version 1.2.3. (I'll later attempt to run it on PHP7, yet the module manager keeps breaking as soon PHP7 is on, so for now it is PHP5.6, again afaik the latest release)

I hope these informations are sufficient - I don't get any errors, only the changed values here. I actually assume it is much more about the comma, but I'd really need that, if possible.
Thank you very much for your time, I appreciate your support while I have no clue how to figure this out.

* I assumed Excel would start messing up values like treating numbers for numbers and not text - therefore killing the leading zeros - but amazingly didn't.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: LISE doesn't import leading "0"

Post by paulbaker »

Something somewhere in the chain is not understanding "0,7". The first thing I would try is a global change on your data:

Code: Select all

0,7 liters -> 0.7 liters
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: LISE doesn't import leading "0"

Post by Jo Morg »

LISE should import fine as long as the CSV file is properly formatted. I never had any issues with commas in fields so far...
Check the CSV files and see if there are any missing double quotes that may be responsible for that behavior.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Modules/Add-Ons”