While importing students using “Import From File > Student Enrolment”
it shows “Invalid value: “1”. Expected: Number” for the field “rollOrder (4)”
In Gibbon v20 it was working fine. now i am trying it on the latest Gibbon v21
Screen shot below
Values in excel
I’ve tried to reproduce this issue locally with v21 but haven’t seen it crop up. If you’re importing via an excel file, can you try saving the file as csv, and trying the import again? Thanks!
I tried it using .csv also, and it did not work in my linux machine. Then I tried the same file using a windows machine it worked without any problem. Really strange no? any idea?
Hmm, that is odd. We run our servers on linux and haven’t seen the same issue. If you visit your System Check page, are there any extensions missing?
No, I am running gibbon in linux server only using docker. And I was doing import using linux desktop first and it failed then I tried it using windows desktop using the same file and it worked without any problem. And also all extensions are installed properly as shown below
Interesting indeed. I think it may be related to different SQL modes and the handling of null values. I’ve pushed a possible fix to v22, which just changes the one ImportType.php file. Would you be interested to test the fix and see if the import then works on your Linux system? Since I can’t reproduce it, it’d be nice to know if the issue is truly fixed. You can view the changes here and grab the updated ImportType.php file here (its backwards compatible to v21).
Sorry Sandra, still it is not working. I have copied the new ImportType.php into src/Data folder, restarted the dockers
but same error output.
To reproduce the error is very easy. create a ubuntu vm in your windows/mac desktop and try. Because i have tried to import the same excel file using a ubuntu vm in windows desktop and the same error I got.
Hmm. I’m running Ubuntu systems in development and production and haven’t been able to recreate the issue. I wonder if it’s specific to the version you’re running or the configuration on the VM image. Its interesting that it was working in v20 but not v21. The most recent fix that I shared should mitigate any of the logic changes between these versions. Odd!
I migrated my database to mysql5.7 and everything works as expected without any problem. That means it is something related mysql versions not gibbon versions. Since I am using dockers migration is not a problem for me
Thank you very much for your kind cooperation
Great to hear you’ve solved the issue. Thanks for updating us on the solution, should someone encounter something similar.
One more thing can I use latest mariadb instead of mysql8 for gibbon v21?
Technically yes, we haven’t had any issues with MariaDB running the same versions as MySQL. We haven’t tested it thoughtfully compared to MySQL 8, so test first locally before considering production. You may see an error on the version check for MySQL, but that can often be ignored.