Hi,
The fix is still in progress by the developers team.
Meanwhile you can try the following workaround :
Approach (details below):
-
Add beforeInsert hook for the collection you need to import data that will take a value from a temporary field and set it for the real one (explained below)
-
Import data while the target field for the problematic numeric-like source column is defined to be a new temporary column (not the real text-defined one)
-
Verify that the content loaded as expected
-
Delete temporary filed from the collection
-
Delete the beforeInsert hook
Details
- Adding hook :
- Go to the collection (in this example it is Info collection), click on Hooks button and then on " Add hook ":
- Select the Before Insert hook:

The data.js file will be added into the Backend folder (in case it wasn’t there yet) and it will be open in the editor. Add the following code into the hook - assuming that the real field you want to upload the data to, is called year ( existing property defined as Text ) and that the temporary field will be called temp_year :
if (item.temp_year) {
item.year = item.temp_year.toString();
}
So it will look like this (make sure you use the correct hook):
- Importing data
- Open the Import dialog and map all the “good” fields as you need, and the numeric-like text field to the new temp field - in this example named temp_year:

- Continue with the import as usual.
-
Verify
Now it is expected to have the correct data in the year property, and the problematic data in the temp property temp_year. Verify that it is the case indeed. -
Delete the temp property from the collection:

- Delete hook
Delete the code from the insertBefore hook.
Or the whole insertBefore hook if you don’t use it for anything else.
Or the whole data.js file if there is no other code you need there.
I would suggest first to try this with small amount of imported data to verify that the process works as expected.
Regards,
Alexander

