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

Flexible content items groups are overwritten #249

Open
2 of 3 tasks
stijlbreuk-dev opened this issue Jan 13, 2025 · 0 comments
Open
2 of 3 tasks

Flexible content items groups are overwritten #249

stijlbreuk-dev opened this issue Jan 13, 2025 · 0 comments

Comments

@stijlbreuk-dev
Copy link

stijlbreuk-dev commented Jan 13, 2025

Description

Hi,

I am trying to migrate from the old WPGraphQL for Advanced Custom Fields plugin to the new WPGraphQL for ACF plugin.
After switching the plugins I run into the following issue.

I have a Flexible content ACF field called slides that holds different types of slides, as you guessed.

All items within this field group have the same scaffold:

  • Content (tab)
  • Content (group)
  • Meta (tab)
  • Meta (group)
  • Settings (tab)
  • Settings (group)

When looking at the slides definition in the Query Composer, it seems that the definition of these groups are overwritten for each slide definition and ends up being the top definition for all slides. As you can see in the screenshot the items are existent in the SlidesItemsType8Layout definition (which is correct), but also in the SlidesItemsType3Layout definition -> which shows up in the Query composer, but is not existent in this slide content group definition. Also, other specific fields for a slide, in this case sentences are not present:
CleanShot 2025-01-13 at 16 59 44

When updating a slide content group to an unique name, like content3 for the third slide it shows up correctly in the Query composer, but the GraphQL Field Name definition in the UI stays the same content, which is confusing. And also I would rather have all content groups to remain the content name to prevent altering the headless front-end that relies on this GraphQL endpoint.

CleanShot 2025-01-13 at 17 09 04

Steps to reproduce

query cards($where: RootQueryToCardConnectionWhereArgs, $first: Int, $after: String, $before: String) {
cards(first: $first, where: $where, after: $after, before: $before) {
edges {
cursor
node {
id: cardId
title
slides {
items {
... on SlidesItemsType3Layout {
fieldGroupName
content {
title
}
content {
items {
fieldGroupName
textLeft
textRight
}
}
}
... on SlidesItemsType8Layout {
fieldGroupName
content {
items {
textLeft
textRight
}
}
}
}
}
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
}

PHP or JSON export of the ACF Field Group(s)

group_6149af58b186c.json.zip

Additional context

No response

WPGraphQL Version

1.29.3

WPGraphQL For ACF Version

2.4.1

ACF (Advanced Custom Fields) Version. Free or Pro?

Advanced Custom Fields PRO 6.3.11

WordPress Version

6.7.1

PHP Version

8.3

Additional enviornment details

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.

  • Yes
  • My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant