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

[4.x]: GraphQL - Ancestor and Parent are missing #16341

Open
Latex88 opened this issue Dec 18, 2024 · 3 comments
Open

[4.x]: GraphQL - Ancestor and Parent are missing #16341

Latex88 opened this issue Dec 18, 2024 · 3 comments

Comments

@Latex88
Copy link

Latex88 commented Dec 18, 2024

What happened?

Description

Followup on #16327 (comment)
After upgrading to 4.13.7 unfortunately all ancestors and parents are missing when I query for multiple items.

Steps to reproduce

  1. See [4.x]: GraphQL Preview - Ancestor and Parent is missing #16327 (comment)

Expected behavior

See #16327 (comment)

Actual behavior

See #16327 (comment)

Craft CMS version

4.13.7

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

I’m not able to reproduce this. Is the query for entries in a Structure section?

@Latex88
Copy link
Author

Latex88 commented Dec 18, 2024

I’m not able to reproduce this. Is the query for entries in a Structure section?

Yes, the query looks like this:

query get_officelist {
    entries(section: "bueroseiten_at", status: "live", site: "at_de", , , uri: "*/remax-style-eisenstadt*") {
        id
        isDraft
        title
        slug
        status
        url
        uri
        enabled
        dateCreated
        language
        expiryDate
        level
        sectionHandle
        parent {
            id
        }
        ancestors {
            id
            slug
            ... on bueroseiten_at_default_Entry {
                lukasuniqueid {
                    ids
                }
            }
        }
        ... on bueroseiten_at_default_Entry {

            ...fragment_main_seo_fields_office

            lukasuniqueid {
             ids
            }

            page
        }
    }
}
fragment fragment_main_seo_fields_office on bueroseiten_at_default_Entry {
	ogImage {
		url_mobile: url(transform: "halfContentPics400")
	}
	ogTitel
	seodescription
	seokeywords
	sitemapexport
}

@brandonkelly
Copy link
Member

Just tested that query (with adjusted section and site arguments, and without the fragments) and the parent and ancestors fields are both getting populated as expected.

Are you able to reproduce on a fresh Craft install? If so, please send the Composer files and a database backup into [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants