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.
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
anden
. 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
Installation
Other (please explain)
Additional details
Problem occurred after Statamic upgrade from version 4 to version 5.