studio1902 / statamic-peak-seo

Belongs to the Statamic Peak Starter Kit and contains all SEO fieldsets and partials.
GNU General Public License v3.0
11 stars 14 forks source link

Multisite {site_handle}/sitemap.xml routes not working #33

Closed prikkprikkprikk closed 10 months ago

prikkprikkprikk commented 1 year ago

Bug description

In my Norwegian/English multisite, /sitemaps.xml lists both default /sitemap.xml and /en/sitemap.xml, however, when I visit the latter URL, I get a 404 error.

Doing php artisan route:list shows only sitemap.xml and sitemaps.xml, not en/sitemap.xml or any other sitemap related routes.

If I clear the route cache, the English sitemap works, but if I cache the routes with php artisan route:cache, it gives a 404 error again.

How to reproduce

(Disclaimer: Not tested with a fresh Peak install, only on our setup.)

Logs

No response

Environment

Environment
Application Name: VK
Laravel Version: 10.16.1
PHP Version: 8.2.7
Composer Version: 2.5.7
Environment: local
Debug Mode: ENABLED
URL: vk.test
Maintenance Mode: OFF

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

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

Filament
Packages: filament, forms, notifications, support, tables
Version: v2.17.51
Views: PUBLISHED: filament

Statamic
Addons: 8
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.21.0 PRO

Statamic Addons
insight-media/statamic-pdf-thumbnailer: 1.0.1
jacksleight/statamic-bard-mutator: 2.3.0
jonassiewertsen/statamic-livewire: 2.12.0
mitydigital/iconamic: 1.1.6
studio1902/statamic-peak-browser-appearance: 3.2
studio1902/statamic-peak-commands: 2.5.1
studio1902/statamic-peak-seo: 7.0.2
studio1902/statamic-peak-tools: 3.2

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Additional details

No response

marcorieser commented 1 year ago

According to the discord discussion it works when reverting the changes introduced here: https://github.com/studio1902/statamic-peak-seo/pull/25

robdekort commented 1 year ago

Bug confirmed. I'll reverse that commit. Thanks.

robdekort commented 1 year ago

Opening again. There's probably a better solution.

marcorieser commented 1 year ago

Just for the record: Social Image Urls are affected by this too.

marcorieser commented 10 months ago

@prikkprikkprikk Do the changes in that PR (#35) solve your issue?

robdekort commented 10 months ago

Amazing. Thank you Marco!

prikkprikkprikk commented 10 months ago

@prikkprikkprikk Do the changes in that PR (#35) solve your issue?

Yes! Thank you!