This issue solely affects hkrailwiki (hkrail.miraheze.org).
Steps to reproduce bug
- Head to the sandbox page or just any page on hkrailwiki.
- Type specifically (a) [[#雙島式月台]], (b) [[#雙島式月台|any random text]], (c) [[#雙島式月台|雙島式月台]], (d) [[#雙島式月台|三軌雙島式月台]] in separate attempts (do not submit them together) and try to preview or submit.
All four section pipelinks are rendered as expected.
Ever since the late December recovery of the wiki from the original database, (a) and (b) functions as expected (control tests), (c) renders as an empty HTML link (anchor <a> tag), and (d) results in an MWException (example exception ID - db3495b4d981e944aef2becf), disallowing viewing, saving or previewing of any content with that exact section pipelink.
On saving or previewing (d), the browser sometimes logs an HTTP 500 error, showing that it's likely to be an internal error.
Per conversation with @Agent_Isai on Discord, this could be a server-side cache problem. This might explain why the import after resetting hkrailwiki had unexpected behaviour, with correct page history but mismatched source code that doesn't even exist in the import but from the deleted November wiki, as discussed in T10173 and in DMs with @Universal_Omega.
I set the priority of the task to Normal as it isn't a minor bug that doesn't actually affect usage and operations but doesn't affect the entire Miraheze site.