Thanks, @Cathy_Sarisky, for raising this bug. I wanted to just chime in that I unfortunately encountered this problem tonight as well.
And yes, to your question: it didn’t matter which editor I had toggled at the time of import. If the post was initially written in lexical
, then it simply won’t import correctly. If it was initially written in mobiledoc
, then everything works fine.
My specific workflow is I actually create posts on my localmachine, make sure they look like I expect (especially because I’ll sometimes tweak the theme too) and then when I’m happy I’ll export from my local machine and import that .json
onto my Ghost(Pro) instance (and a new corresponding theme, if necessary). (Also, on my Ghost(Pro) instance, I always do delete everything before importing the new .json
.)
The workaround right now is to just make sure all of one’s posts and pages are written in mobiledoc
, I guess? Like you said in your GitHub issue, the actual json
I’m importing is correctly formatted and mobiledoc
is indeed set to null:
The problem is something in the importer
itself.
I’d already written about half of my posts and pages in lexical
but I’ll go back now and manually convert them all into mobiledoc
. Am hoping this bug will get fixed soon though! As it’s definitely a dealbreaker that makes
lexical
not possible in my current workflow.
Edit:
I’m adding the actual error message in text so SEO can actually find this post:
Validation error, cannot edit post. Posts can have either a mobiledoc or a lexical property, never both. Both the mobiledoc and lexical properties are set, one must be null