Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: generateSitemaps in production giving 404 (#62212)
generateSitemaps function returns a 404 for /sitemap/[id].xml in production While finding the correct sitemap partition from the array, we check the param against the id. Which works in dev because id and param are both without trailing .xml. But it fails in production as param has a trailing .xml (/sitemap/[id] works in production because it falls back to dynamic loading and param and id are both without .xml) If we are in production environment, check the id with a trailing .xml because that's whats returned from generateStaticParams, an array of __metadata_id__ with trailing .xml Fixes #61969 --------- Co-authored-by: Jiachi Liu <[email protected]>
- Loading branch information