Skip to content

Keep relative links working after loading a category in place - #445

Open
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:fix/370-relative-links-ajax
Open

Keep relative links working after loading a category in place#445
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:fix/370-relative-links-ajax

Conversation

@ECYaz

@ECYaz ECYaz commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #370

The fix converts the page's relative links and form actions to full URLs before the address changes, so they keep working no matter what category is loaded.

The category browser swaps the contribution list with AJAX and rewrites the
address to the category's URL, which usually sits at a different directory
depth. The board's own links are relative, so the browser re-resolves all of
them against the new path: from a deeper category, Board index turns into
customise/community/index.php on phpbb.com and the quick links, search and
FAQ shift the same way. A direct load of the category regenerates the links
at the right depth, which is why only the in-place navigation breaks.

Resolve the document's relative links and form actions against the address
it was rendered under before the first rewrite, so they keep pointing where
they did when the page loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default board links broken when expanding categories

1 participant