Page MenuHomePhabricator

Display certain hatnotes only if the user has been redirected from certain targets
Closed, InvalidPublic

Description

The Blue Album is an album by Weezer. It contains a song called "The World Has Turned and Left Me Here". There is also an episode of a TV show titled "The World Has Turned and Left Me Here".

If you go to the Blue Album article ([[Weezer (Blue Album)]]), it currently displays this hatnote:

'The World Has Turned and Left Me Here" redirects here. For the Vampire Diaries episode, see The World Has Turned and Left Me Here (The Vampire Diaries).'

I think this hatnote should only be displayed if the user has searched for "The World Has Turned and Left Me Here" and been redirected to [[Weezer (Blue Album)]]. My logic is this:

  • If you're redirected to the Blue Album article because you were looking for an article about the TV episode, the hatnote is useful. It tells you that you're in the wrong place and gives you a link to the right article.
  • If you arrive at the Blue Album article some other way, the hatnote isn't useful - you probably don't care that there is an episode of a TV show with the same title as a song on this album. It's just clutter.

It would be great if there were a way to display certain hatnotes only if the user has been redirected from certain targets..

Event Timeline

Aklapper removed a project: MediaWiki-Redirects.

Hi @Popcornduff, thanks for taking the time to report this!

I assume that this is about https://en.wikipedia.org/wiki/Weezer_(Blue_Album) (full links always welcome, as there are many websites out there).
Looking at the wiki text of that page, you can see the line
{{Redirect|The World Has Turned and Left Me Here|the ''Vampire Diaries'' episode|The World Has Turned and Left Me Here (The Vampire Diaries)}}

Hence removing MediaWiki-Redirects from this task as this is not done by the MediaWiki software but by a local template on English WIkipedia, and closing this task as invalid as this is about changing on-wiki content of a wiki page, which needs to be discussed on that local wiki.

As this was brought up on en.wp yesterday, I should probably clarify my previous comment:

In my understanding, the template logic could check if the HTML id contentSub includes the HTML class mw-redirectedfrom. If that is the case, then the template should not display the hatnotes.
Someone correct me if I am wrong, please.