Repository navigation
Broken api.laravel.com links on the Architecture Concepts: Facades documentation page (version stripped from URL)
#61484
Replies: 1 comment
|
I was able to reproduce the pattern you described from the generated links. One thing I would check is the documentation site's link transformation step rather than the It looks like the version placeholder is being stripped before the final URL is generated, while the same transformation is still being applied to the A possible fix could be to make the URL transformation host-aware:
That would also fix the other entries in the Facade Class Reference table automatically instead of patching each generated URL individually. I haven't traced the documentation site's rendering pipeline yet, so I'd be interested to know where the |
Uh oh!
There was an error while loading. Please reload this page.
The Facade Class Reference table on the Facades doc page renders every
api.laravel.comlink with the version segment stripped, producing 404s.Example:
facades.md):https://api.laravel.com/docs/{{version}}/Illuminate/Foundation/Vite.htmlhttps://api.laravel.com/framework/docs/Illuminate/Foundation/Vite.html→ 404 Not Foundhttps://api.laravel.com/docs/13.x/Illuminate/Foundation/Vite.html→ loads fineThis affects every row in the Facade Class Reference table (~50 links), since they all follow the same
api.laravel.com/docs/{{version}}/...pattern in the source.Root cause (best guess)
The site's link renderer appears to rewrite
/docs/{{version}}/...→/framework/docs/...for all doc links. That's correct forlaravel.com's own internal docs (unversioned in the URL now), but it's incorrectly applied toapi.laravel.comlinks too — that host's API documentation is still served under versioned paths (api.laravel.com/docs/{version}/...), not/framework/docs/....Suggested fix
Exclude
api.laravel.comlinks from the version-stripping transform, or rewrite them toapi.laravel.com/docs/{{version}}/...with the actual version preserved instead offramework/docs/....All reactions