Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors importing JSON migration file #19751

Open
1 task done
whaleyr opened this issue Feb 23, 2024 · 3 comments
Open
1 task done

Errors importing JSON migration file #19751

whaleyr opened this issue Feb 23, 2024 · 3 comments
Labels
needs:triage [triage] this needs to be triaged by the Ghost team

Comments

@whaleyr
Copy link

whaleyr commented Feb 23, 2024

Issue Summary

I am trying to migrate content from Blogger to my self-hosted Ghost instance (running in a Docker container). I'm following the instructions in your docs (https://ghost.org/docs/migration/custom/) for a "custom" migration. I've created my own import JSON file following the docs.

When I go into the ghost settings panel Advanced > Import/Export > Migration Tools > Universal import and then drop in the JSON file I see hundreds of lines of errors (a subset of which is pasted below).

Steps to Reproduce

  1. Create a JSON migration file according to the docs
  2. Submit the file via Settings > Advanced > Migration Tools > Universal import

Ghost Version

5.79.4

Node.js Version

18.19.1

How did you install Ghost?

Docker image ghost:5-alpine

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

EmailCtaNode must implement static "getType" method
EmailCtaNode must implement static "clone" method
EmailCtaNode must implement "decorate" method
EmailCtaNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
EmailCtaNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
SignupNode must implement static "getType" method
SignupNode must implement static "clone" method
SignupNode must implement "decorate" method
SignupNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
SignupNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
ERROR Content import was unsuccessful

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Feb 23, 2024
@betschki
Copy link
Contributor

I can replicate the error log in a different way (came here to open another issue, but saw this). I initially thought this had something to do with a modified core I am running, yet even a "minimal" installation returns the error.

Here are my steps to end up with a similar error log:

  1. cd into an empty directory
  2. Run ghost install --local --no-start – this successfully installs Ghost v5.79.5 (as of today) without errors
  3. Run ghost run -D -V for verbose error output
  4. Open Ghost on http://localhost:2368/ghost (no errors)
  5. Create new Ghost blog using the setup screen (no errors, apart from the expected failed email due to missing mail configuration)
  6. Go to posts (no errors)
  7. Create new posts (no errors)
  8. Enter heading of new posts (no errors)
  9. Enter post content

When entering post content, the following logs appear:

[2024-02-26 16:53:27] INFO "GET /ghost/api/admin/posts/?formats=mobiledoc%2Clexical&limit=30&page=1&filter=status%3A%5Bdraft%2Cscheduled%2Cpublished%2Csent%5D" 200 91ms
[2024-02-26 16:53:27] INFO "GET /ghost/api/admin/tags/?limit=all" 200 42ms
[2024-02-26 16:53:27] INFO "GET /ghost/api/admin/users/?limit=all&include=roles" 200 31ms
[2024-02-26 16:53:28] INFO "GET /ghost/api/admin/snippets/?formats=mobiledoc%2Clexical&limit=all" 200 26ms
[2024-02-26 16:53:30] INFO "GET /ghost/api/admin/slugs/post/test/" 200 19ms
CodeBlockNode must implement static "getType" method
CodeBlockNode must implement static "clone" method
CodeBlockNode must implement "decorate" method
CodeBlockNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
CodeBlockNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
ImageNode must implement static "getType" method
ImageNode must implement static "clone" method
ImageNode must implement "decorate" method
ImageNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
MarkdownNode must implement static "getType" method
MarkdownNode must implement static "clone" method
MarkdownNode must implement "decorate" method
MarkdownNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
MarkdownNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
VideoNode must implement static "getType" method
VideoNode must implement static "clone" method
VideoNode must implement "decorate" method
VideoNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
AudioNode must implement static "getType" method
AudioNode must implement static "clone" method
AudioNode must implement "decorate" method
AudioNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
AudioNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
CalloutNode must implement static "getType" method
CalloutNode must implement static "clone" method
CalloutNode must implement "decorate" method
CalloutNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
CalloutNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
HorizontalRuleNode must implement static "getType" method
HorizontalRuleNode must implement static "clone" method
HorizontalRuleNode must implement "decorate" method
HorizontalRuleNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
HorizontalRuleNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
HtmlNode must implement static "getType" method
HtmlNode must implement static "clone" method
HtmlNode must implement "decorate" method
HtmlNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
HtmlNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
FileNode must implement static "getType" method
FileNode must implement static "clone" method
FileNode must implement "decorate" method
FileNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
ToggleNode must implement static "getType" method
ToggleNode must implement static "clone" method
ToggleNode must implement "decorate" method
ToggleNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
ToggleNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
ButtonNode must implement static "getType" method
ButtonNode must implement static "clone" method
ButtonNode must implement "decorate" method
ButtonNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
ButtonNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
HeaderNode must implement static "getType" method
HeaderNode must implement static "clone" method
HeaderNode must implement "decorate" method
HeaderNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
HeaderNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
BookmarkNode must implement static "getType" method
BookmarkNode must implement static "clone" method
BookmarkNode must implement "decorate" method
PaywallNode must implement static "getType" method
PaywallNode must implement static "clone" method
PaywallNode must implement "decorate" method
PaywallNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
PaywallNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
ProductNode must implement static "getType" method
ProductNode must implement static "clone" method
ProductNode must implement "decorate" method
ProductNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
EmbedNode must implement static "getType" method
EmbedNode must implement static "clone" method
EmbedNode must implement "decorate" method
EmbedNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
EmbedNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
EmailNode must implement static "getType" method
EmailNode must implement static "clone" method
EmailNode must implement "decorate" method
EmailNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
EmailNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
GalleryNode must implement static "getType" method
GalleryNode must implement static "clone" method
GalleryNode must implement "decorate" method
GalleryNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
GalleryNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
EmailCtaNode must implement static "getType" method
EmailCtaNode must implement static "clone" method
EmailCtaNode must implement "decorate" method
EmailCtaNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
EmailCtaNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
SignupNode must implement static "getType" method
SignupNode must implement static "clone" method
SignupNode must implement "decorate" method
SignupNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
SignupNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected
CollectionNode must implement static "getType" method
CollectionNode must implement static "clone" method
CollectionNode must implement "decorate" method
CollectionNode should implement "importJSON" method to ensure JSON and default HTML serialization works as expected
CollectionNode should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected

@whaleyr
Copy link
Author

whaleyr commented Feb 27, 2024

Thanks for pointing that out! I can see the same thing when I start a brand new post, fill in a title, then focus in the empty post body area.

So it looks like these errors are not tied to exclusively to the import process. Good to know. But now to figure out why it's otherwise failing to import any posts and failing to log any explanation why.

@kevinansfield
Copy link
Contributor

FYI the *Node must/should implement warnings are from the underlying Lexical framework that our editor is built on. They occur because it contains some basic checks that don't account for our use of class inheritance so are just noise.

They aren't errors and don't affect the import process, they also only occur when Ghost is run in development/against a development build of Koenig so shouldn't appear anywhere on a production site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage [triage] this needs to be triaged by the Ghost team
Projects
None yet
Development

No branches or pull requests

3 participants