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

Metadata API: description sometimes are editor states #1667

Open
kulla opened this issue Jul 9, 2024 · 0 comments
Open

Metadata API: description sometimes are editor states #1667

kulla opened this issue Jul 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kulla
Copy link
Member

kulla commented Jul 9, 2024

What is wrong?

Metadata API returns editor state as JSON for description in some courses.

BTW: After the fix serlo/metadata-exports#214 needs to be reverted.

Steps to reproduce

  1. Go to https://api.serlo.org/___graphql
  2. Enter the query
query {
  metadata {
    resources(first: 1, after: "MTg1NzEK") {
      nodes
    }
  }
}

You see the following in the result

"description": "{\"plugin\":\"rows\",\"state\":[{\"plugin\":\"text\",\"state\":[{\"type\":\"p\",\"children\":[{}]}],\"id\":\"dd3a8cf3-e126-40be-a026-288053190bbc\"}],\"id\":\"c872656f-8893-4967-80ec-5c3a4f83f823\"}"

How should it behave?

Description should not be parsed editor state.

Proposed Solution

I guess this is a bug after serlo/db-migrations#338 since only courses are affected when I looked into it...

@kulla kulla added the bug Something isn't working label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant