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

Static Site Generator randomly generates entries with incorrect site URLs #170

Closed
o1y opened this issue Jun 21, 2024 · 1 comment · Fixed by #172
Closed

Static Site Generator randomly generates entries with incorrect site URLs #170

o1y opened this issue Jun 21, 2024 · 1 comment · Fixed by #172
Labels
bug Something isn't working

Comments

@o1y
Copy link
Contributor

o1y commented Jun 21, 2024

Bug description

We have a multi-site where the URLs are sometimes generated incorrectly. This can result in a URI redirecting to the wrong site language, for example, you're on the Default Site and the link leads to a different site.

How to reproduce

In my case this seems to happen with the link field type. This is my template:

  <a
    class="btn"
    role="button"
    href="{{ _link | antlers }}">{{ _label }}
  </a>

This bug is completely random. It's almost impossible to reproduce, but it happens since Statamic 5. I would guess it's because of one of the new introduced cache commits, but I don't know how to create a reliable reproduction case 🤷‍♂️

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 11.7.0
PHP Version: 8.3.8
Composer Version: 2.7.6
Environment: local
Debug Mode: ENABLED
URL: localhost:8080
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: reverb
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 3
Sites: 11 (English, Deutsch, Español, and 8 more)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.7.3 PRO

Statamic Addons
jacksleight/statamic-bard-mutator: 2.3.1
jacksleight/statamic-bard-texstyle: 3.2.2
statamic/ssg: 3.0.1

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@duncanmcclean duncanmcclean transferred this issue from statamic/cms Jun 21, 2024
@duncanmcclean duncanmcclean added the bug Something isn't working label Jun 21, 2024
@o1y
Copy link
Contributor Author

o1y commented Jun 26, 2024

In the re-implementation of #10280, the return values of fields() are cached using Blink. This also affects frontend augmentation, and it's possible for incorrect values of an entry in one language to leak into another locale of the entry.

Oops. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants