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

GraphQL: Internal Server Error when querying blogContent in a page #31496

Open
4 tasks
rjvelazco opened this issue Feb 27, 2025 · 0 comments
Open
4 tasks

GraphQL: Internal Server Error when querying blogContent in a page #31496

rjvelazco opened this issue Feb 27, 2025 · 0 comments

Comments

@rjvelazco
Copy link
Contributor

rjvelazco commented Feb 27, 2025

Problem Statement

When querying a page that includes a Blog Content Type and attempting to retrieve the blogContent field (Block Editor), GraphQL throws an Internal Server Error instead of returning the expected data.

Steps to Reproduce

  1. Create a Regular Page in dotCMS.

  2. Add a Blog Content Type as a contentlet within a container on that page.

  3. Navigate to DevTools > GraphQL.

  4. Run the following GraphQL query:

    query page {
      page(url: "/example") {
        containers {
          identifier
          containerContentlets {
            uuid
            contentlets {
              ... on Blog {
                title
                blogContent {
                  json
                }
              }
            }
          }
        }
      }
    }
  5. Observe that the query fails with an Internal Server Error.

Expected Behavior

  • The query should successfully return the blog content stored in the blogContent field without errors.
  • The response should correctly serialize the Block Editor content as JSON.

Acceptance Criteria

  • GraphQL should correctly resolve blogContent when queried within a page.
  • Ensure that blogContent properly serializes Block Editor content as JSON.
  • No Internal Server Error should occur when querying pages that contain Blog contentlets.
  • Add test cases for retrieving blogContent via GraphQL to prevent regressions.

dotCMS Version

Reproducible in: main / trunk / demo

Proposed Objective

Technical User Experience

Proposed Priority

Priority 3 - Average

Quality Assurance Notes & Workarounds

  • Temporary Workaround: If applicable, suggest an alternative way to fetch blogContent until the issue is resolved.
  • Verify the fix by testing the query on multiple pages containing Blog contentlets.

Sub-Tasks & Estimates

  • Investigate the root cause of the error.
  • Implement a fix for blogContent serialization in GraphQL.
  • Write unit tests to validate proper serialization and prevent future regressions.
  • Perform QA testing to confirm the fix works across different page configurations.
@rjvelazco rjvelazco changed the title GraphQL: Internal Server Error while executing blogContent in a page GraphQL: Internal Server Error when querying blogContent in a page Feb 27, 2025
@nollymar nollymar removed the Triage label Feb 27, 2025
@nollymar nollymar moved this from New to Next 1-3 Sprints in dotCMS - Product Planning Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Next 1-3 Sprints
Development

No branches or pull requests

2 participants