-
-
Notifications
You must be signed in to change notification settings - Fork 541
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
Bard fieldtype: Linked entries in Bard field resolves to wrong locale of the entry (GraphQL and RESTful API) #9424
Comments
any updates on this? 😬 |
No updates yet sorry. You'd see them here if there were. |
alrighty thanks for the reply |
I'm not able to fix it right now, but this is a note for us or whoever wants to tackle this: The issue is here: cms/src/Fieldtypes/Bard/LinkMark.php Line 69 in 1f08790
It's localizing to the current site, which works great on the frontend but not in the APIs. Instead of |
In my project I "fixed" this by injecting a middleware into the Statamic GraphQL queries
This solution isn't that nice because of it being a side-effect in a query, however it does work quite well even with fetching multiple sites, and doesn't require refactoring all the |
Currently facing same issue with REST API 😞 |
Closing as I believe this has been fixed in #11207, which will be part of the next release. |
Bug description
I have a Statamic instance configured with multisite (German, French, and Italian). The default root locale is set to German. Also I am fetching the CMS data via the GraphQL endpoint. the same bug applies for the REST api as well.
Within a bard field, when I link to an entry of the same locale - for example, French entry to another French entry, I expect the linked entry to resolve to the French URL
/fr/first-page
->/fr/second-page
, but it currently does not.How to reproduce
Current behavior
French linked entry within Bard field resolves to German url of the linked entry. for example:
/fr/french-page-a
->/de/german-page-a
it resolves to the correct entry but in the wrong locale
Expected behavior
/fr/french-page-a
->/fr/french-page-a
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
I have found this merged issue which seems to fix this similar bug but not for the GraphQL and REST api: #8319
The text was updated successfully, but these errors were encountered: