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

Craft 5 - Location query removes nested entry results #405

Open
RyVeata opened this issue Sep 10, 2024 · 0 comments
Open

Craft 5 - Location query removes nested entry results #405

RyVeata opened this issue Sep 10, 2024 · 0 comments

Comments

@RyVeata
Copy link

RyVeata commented Sep 10, 2024

Description

Thanks for your support in updating the location searching so far. On upgrading to the latest release 5.0.2 and testing it against our implementation I discovered that, although location searching now works at the top level, it prevents nested entry results from being returned within the context of GraphQL. This includes both related assets and entries. As our Craft is headless I don't know if this also effects front end templating.

Steps to reproduce

  1. Ensure you have an entry type that has a related or asset based field, and a location
  2. Make a GraphQL query in the Craft explorer that fetchs the entry without any location filtering and returns properties of the related asset or entry. Retrieve the results, the related asset/entry data will be displayed.
  3. Build a second GraphQL query in the Craft explorer with the same structure, but that uses location filter with lat lng and order by distance.
  4. Fetch the results. In the second request the nested data is missing and only an empty array is returned (see attached screenshots for examples). The only difference between the two requests is the addition of the location filter. Although the example shows results for a related asset, I have also tested for related Entries and the same issue occurs.

Screenshot 2024-09-10 at 18 04 38
Screenshot 2024-09-10 at 18 03 03

Additional info

  • Craft version: 5.4.2
  • Maps version: 5.0.2
  • PHP version: 8.2.3
  • Database driver & version: Postgres 14
  • Other Plugins: CKEditor, Super Table
Tam added a commit that referenced this issue Sep 16, 2024
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