statamic / ssg

The official Statamic Static Site Generator
229 stars 23 forks source link

Static Site Generator randomly returns null for a related entry #171

Open o1y opened 2 weeks ago

o1y commented 2 weeks ago

Bug description

Possibly related to #170.

We have a multi-site where the entries fieldtype is sometimes returning null, instead of the linked entry.

How to reproduce

  1. Add Statamic Multi-Site
  2. Use ssg + spatie/fork
  3. Link an entry using the entries fieldtype. In my case the linked entry was not translated in all locales.
  4. In Statamic CP the entry is always returned. When building the site using ssg the entry randomly returns null.

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 🤷‍♂️

I would assume that this is a bug in statamic/cms, and not in statamic/ssg.

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