slmnio / slmngg-sfc

New SLMN.GG website & server
5 stars 8 forks source link

Minisite event routing priorities are messed up when looking at another event #250

Closed slmnio closed 2 months ago

slmnio commented 2 months ago

There were some issues with minisites that caused subpages to 404 when ordered in certain ways in the router config. It seems there was an edge case that was missed. Previous work in https://github.com/slmnio/slmngg-sfc/commit/6b93eac472ab8e1f270b6582c74b012d40aa8cde

Schedule, bracket and streams are the routes that get redirected and 404 on event pages on minisites that don't match.

https://bpl.slmn.gg/schedule - Minisite schedule - Works https://bpl.slmn.gg/standings - Minisite standings - Works https://slmn.gg/event/jLlfrqowHdZFJI/schedule - Root site schedule - Works https://slmn.gg/event/jLlfrqowHdZFJI/standings - Root site standings - Works https://bpl.slmn.gg/event/iz1PvtxZK90PbJ/schedule - Minisite looking at other event schedule - 404s https://bpl.slmn.gg/event/iz1PvtxZK90PbJ/standings - Minisite looking at other event standings - Works

slmnio commented 2 months ago

Turns out it's a routing issue with having the same named routes declared in multiple places. Fixed in https://github.com/slmnio/slmngg-sfc/commit/983f591a3245efada0034fd7a53ad26fc01a3a5e by renaming the routes that appear on minisites.