Moving a bit deeper into the realm of "how to break redirects..."
**Steps to replicate the issue**
* Create a redirect that points to `[[example#Foobar1234567890]]`
**What happens?**:
* No error is thrown if the page `[[Example]]` is an article, as, for example, example is on English Wikipedia. The criteria in {T326057} are met.
* The redirect half-works; it takes the user to page `[[Example]]`, but since there is no section heading `Foobar1234567890`, it doesn't take you to any section, but leaves the user at the top of the page.
**What should happen instead?**:
MediaWiki should check the heading exists on the target page. If it doesn't exist, an error should be thrown.
The error message should probably say something like:
> `The redirect's target page {{{1}}} exists, but does not have the heading {{{2}}}. Please check you have the right target page and that the heading exists on that page. If you resubmit the same target, the page will be created anyway.`
Ideally, this would also work for special pages, so `[[Special:Preferences#mw-prefsection-rendering]]` would be OK, but `[[Special:Preferences#I-like-bananas]]` wouldn't be.
**Benefits**:
Would prevent the creation of new "Broken section redirects," though it would still be possible if the name of a section heading is changed.
**Notes**:
A new function might have to be written to check whether section headings exist.