We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Within Statamic there are various places that use Site::current(), one of which is https://github.com/statamic/cms/blob/5.x/src/Fieldtypes/Bard/LinkMark.php#L69 . This is an issue because Site::current() is not being set when using GraphQL using a site scope (e.g. entry(uri: "/", site: "fr") {}).
Site::current()
entry(uri: "/", site: "fr") {}
In the example of LinkMark this causes the generated link to be from the first site defined and not the requested one.
LinkMark
Would it be an option to set Site::current during the GQL call? While having such a side effect isn't nice, it seems to be the simplest solution.
Site::current
The surrounding text will be from the correct site but the link will be from the first one
No response
Environment Application Name: XXX Laravel Version: 11.15.0 PHP Version: 8.3.8 Composer Version: 2.7.7 Environment: local Debug Mode: ENABLED URL: XXX Maintenance Mode: OFF Timezone: Europe/Zurich Locale: de Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: NOT CACHED Drivers Broadcasting: log Cache: redis Database: sqlite Logs: stack / single Mail: smtp Queue: redis Session: redis Sentry Enabled: MISSING DSN Environment: local Laravel SDK Version: 4.6.1 PHP SDK Version: 4.8.0 Release: 2b96dc5 Sample Rate Errors: 100% Sample Rate Performance Monitoring: 1% Sample Rate Profiling: 1% Send Default PII: ENABLED Statamic Addons: 2 Sites: 4 (🇩🇪 Deutsch, 🇫🇷 Français, 🇮🇹 Italiano, 🇬🇧 English) Stache Watcher: Disabled Static Caching: Disabled Version: 5.19.0.1 PRO
Other (please explain)
The text was updated successfully, but these errors were encountered:
Duplicate of #9424.
Sorry, something went wrong.
No branches or pull requests
Bug description
Within Statamic there are various places that use
Site::current()
, one of which is https://github.com/statamic/cms/blob/5.x/src/Fieldtypes/Bard/LinkMark.php#L69 . This is an issue because Site::current() is not being set when using GraphQL using a site scope (e.g.entry(uri: "/", site: "fr") {}
).In the example of
LinkMark
this causes the generated link to be from the first site defined and not the requested one.Would it be an option to set
Site::current
during the GQL call? While having such a side effect isn't nice, it seems to be the simplest solution.How to reproduce
The surrounding text will be from the correct site but the link will be from the first one
Logs
No response
Environment
Installation
Other (please explain)
Additional details
No response
The text was updated successfully, but these errors were encountered: