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

Augmentation cache does not respect site/locale #10428

Closed
mvar opened this issue Jul 10, 2024 · 1 comment
Closed

Augmentation cache does not respect site/locale #10428

mvar opened this issue Jul 10, 2024 · 1 comment

Comments

@mvar
Copy link

mvar commented Jul 10, 2024

Bug description

Relation is not loaded if it has value in master site.

In my case entries has relation to "country". There are two sites: master and en. When loading data for "en" relations that has value assigned in "master" site will not be loaded.

Disabling cache in Entries class (reverting to Statamic 4 code) solves the problem.

Here cache key is generated only by $values

https://github.com/statamic/cms/blob/v5.13.0/src/Fieldtypes/Entries.php#L352

but actual data is queried by site

https://github.com/statamic/cms/blob/v5.13.0/src/Fieldtypes/Entries.php#L332

How to reproduce

Will provide later.

Logs

No response

Environment

Laravel Version: 10.48.16
PHP Version: 8.2.18
Composer Version: 2.7.4
Environment: local
Debug Mode: ENABLED

Statamic
Addons: 5
Sites: 3 (English, Norwegian, Master)
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.12.0 PRO

Statamic Addons
mitydigital/sitemapamic: 3.0.2
statamic-rad-pack/runway: 7.5.3
statamic/collaboration: 1.0.0
statamic/eloquent-driver: 4.8.1
takepart-media/statamic-oreos: 1.3.0

Installation

Other (please explain)

Additional details

Problem occurred after Statamic upgrade from version 4 to version 5.

@jasonvarga
Copy link
Member

Good find. We can probably add the locale into the blink key.

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

3 participants