contentmodel.io-web icon indicating copy to clipboard operation
contentmodel.io-web copied to clipboard

JSON export was failing on

Open cnewfeldt opened this issue 3 years ago • 1 comments

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!

cnewfeldt avatar Sep 24 '21 04:09 cnewfeldt

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

OriginalEXE avatar Sep 24 '21 07:09 OriginalEXE

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 !

mschultz-kaliop avatar Jun 23 '23 10:06 mschultz-kaliop

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?

OriginalEXE avatar Jun 23 '23 10:06 OriginalEXE

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 image

It's working only if using copy/paste feature and a manual update to transform linkContentType validation as an array instead of a string

mschultz-kaliop avatar Jun 23 '23 12:06 mschultz-kaliop

Thanks for sharing the screenshot and for bringing this (back) up. Could you check if it works as expected now?

OriginalEXE avatar Jun 23 '23 13:06 OriginalEXE

Ante,

No, still same error :cry:

Your welcome for the feedback :wink:

mschultz-kaliop avatar Jun 23 '23 14:06 mschultz-kaliop

Ok, ready for another test 😄 Forgot to fix the visualization part.

OriginalEXE avatar Jun 23 '23 14:06 OriginalEXE

Hello Ante,

Now everything works well, thanks about the fix :wink:

mschultz-kaliop avatar Jun 26 '23 07:06 mschultz-kaliop

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.

OriginalEXE avatar Jun 26 '23 10:06 OriginalEXE