CoreImage give wrong caption when lightbox is enable

Open
#185 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
graphql, php
Domain
api, backend

Research direction

No source file or test is named. Reproduce the issue with a Gutenberg Image block, a caption, and lightbox enabled, then run the shown GraphQL query and trace the CoreImage attributes response. Done means the caption appears once rather than three times while the lightbox attribute remains available.

Written by the indexing model from the issue text.

Description

needs: discussion type: bug

When I add caption on Image, if "lightbox" checkbox is checked, graphql show me the caption three times.

SCR-20240206-ixaf

Step to reproduce:

  1. Add a block "image" on your gutenberg and add a caption
  2. Duplicate it and enable "lightbox on click" checkbox
  3. Make the following graphql request :
{
  page(id: "your-page-slug", idType: URI) {
    editorBlocks(flat: false) {
      ... on CoreImage {
        attributes {
          caption
          lightbox
        }
      }
    }
  }
}

Version:

  • wp-graphql-content-blocks: 2.0.0
  • Faust.js: 1.2.1
  • WPGraphQL: 1.20.0
Dominant language
PHP
Stars
149
Forks
16
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wpengine/wp-graphql-content-blocks

All issues in wpengine/wp-graphql-content-blocks

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.