contentmodel.io-web
contentmodel.io-web copied to clipboard
JSON export was failing on
Hi,
I've come across an issue when importing from a Contentful space when linkContentType was a straight key value pair insted of an object with a key value pairs.
For example
"validations": [ { "linkContentType": "someValue" } ],
would return an error when importing the data from all three import types.
Application error: a client-side exception has occurred (developer guidance).
The console would show:
framework-3af989d3dbeb77832f99.js:1 TypeError: r.linkContentType.filter is not a function at 970.2a6080e7e8af1e58dd89.js:1 at 970.2a6080e7e8af1e58dd89.js:1 at Array.forEach (<anonymous>) at 970.2a6080e7e8af1e58dd89.js:1 at Array.forEach (<anonymous>) at r (970.2a6080e7e8af1e58dd89.js:1) at o (970.2a6080e7e8af1e58dd89.js:1) at 397.174af88c9883836b7998.js:1 at Ii (framework-3af989d3dbeb77832f99.js:1) at t.unstable_runWithPriority (framework-3af989d3dbeb77832f99.js:1) uu @ framework-3af989d3dbeb77832f99.js:1 main-5947f05c764f928168cd.js:1 TypeError: r.linkContentType.filter is not a function at 970.2a6080e7e8af1e58dd89.js:1 at 970.2a6080e7e8af1e58dd89.js:1 at Array.forEach (<anonymous>) at 970.2a6080e7e8af1e58dd89.js:1 at Array.forEach (<anonymous>) at r (970.2a6080e7e8af1e58dd89.js:1) at o (970.2a6080e7e8af1e58dd89.js:1) at 397.174af88c9883836b7998.js:1 at Ii (framework-3af989d3dbeb77832f99.js:1) at t.unstable_runWithPriority (framework-3af989d3dbeb77832f99.js:1)
Changing to the following
"validations": [ { [ "linkContentType": "someValue" ] } ],
Allowed the import to complete.
Hope this is enough information.
Thank you for the wonderful software!
Hey Cary 👋🏻
Thank you for reporting this. I will look into this and get back to you, it might be that the validations schema is more flexible than I've allowed it 🙂
Thanks, Ante
Hi !
Do you have any news about this issue ? It's a blocker to use "Pull from Contentful" and "Import from a space" features. We can only use "Copy/paste" feature with manual fix inside the json to paste... So it's sad, because your tool is really cool :slightly_smiling_face:
Thanks !
Hi @mschultz-kaliop,
A complete rewrite is in the works at the moment, but in the meantime I can take a look. Would you be able to share an example minimal schema that fails the import at the moment?
Thanks for your prompt reply Ante !
It's pretty the same problem as Cary,
Application error: a client-side exception has occurred (developer guidance).
This error occurs when importing models with at least one validation like this below
It's working only if using copy/paste feature and a manual update to transform linkContentType
validation as an array instead of a string
Thanks for sharing the screenshot and for bringing this (back) up. Could you check if it works as expected now?
Ante,
No, still same error :cry:
Your welcome for the feedback :wink:
Ok, ready for another test 😄 Forgot to fix the visualization part.
Hello Ante,
Now everything works well, thanks about the fix :wink:
Woohoo, awesome, thanks again for re-raising the issue from the dead 😄 And thanks for using the app, hopefully you'll like the new version better.