-
Notifications
You must be signed in to change notification settings - Fork 45
Open
statamic/cms
#14109Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
In a Multisite setup, the sitemap behaves inconsistently and becomes completely empty after clearing the cache.
How to reproduce
- Have a multisite setup with a structured collection and localized entries
- Run
php please cache:clear - Open sitemap.xml
Result: /sitemap.xml is empty (0 entries).
Logs
Environment
Environment
Application Name: Statamic
Laravel Version: 12.53.0
PHP Version: 8.4.16
Composer Version: 2.8.10
Environment: local
Debug Mode: ENABLED
URL: statamic-seo-test.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Statamic
Addons: 1
Sites: 2 (Statamic, German)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.4.1 PRO
Statamic Addons
statamic/seo-pro: 7.1.1Additional details
My PR statamic/cms#14031 revealed this bug for single-site setups, although the issue already existed before.
Another reproduction:
php please cache:clear
curl -s http://statamic-seo-test.test/sitemap.xml
php please tinker --execute="dump(Statamic\Facades\Entry::query()->whereNotNull('uri')->count());"So when using ->whereNotNull('uri') all entries have null URIs (0 results).
Without the curl -s http://statamic-seo-test.test/sitemap.xml you'd get a correct count.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working