Page MenuHomePhabricator

Redirect link in Special:What_links_here should link to original page and not target page
Closed, ResolvedPublic

Description

I think there is an usability problem into the Special:What links here when the page it's a redirect.

Navigation use case

  1. The user wants to know what links to the page A380
  2. The user visits A380 (yes, it's a redirect)
    1. (The user is redirected to Airbus A380)
    2. (The user still want to know what links to the page A380
    3. The user clicks on Redirect from A380
  3. User clicks on What links here
  4. User is satisfied
  5. Now the user wants to do more stuff on the page A380
  6. The user clicks on The following pages link to A380
    1. (The user is redirected to Airbus A380)
    2. (The user still wants to do more stuff on the page A380)
    3. The user clicks on Redirect from A380
  7. The user does other actions on the page A380

Considerations

  • The step 6.A is not consistent with the promise of the message 6 (the user is redirected to Airbus A380 after clicking on The following pages link to A380)
  • I don't see an use case where the step 6.A should be the wanted behavior ( see the step 1: why the user should want to resolve that redirect?)

Proposed solution

The link of the message from the step 6 could have a redirect=no. e.g. The following pages link to A380.

Thanks.

Event Timeline

Aklapper changed the task status from Open to Stalled.Mar 16 2018, 10:24 AM

Hi @.avgas, thanks for taking the time to report this!
Unfortunately this report lacks some information. It describes a solution but no problem to solve.
If you have time and can still reproduce the problem: Please add a more complete description to this report (a list of steps to reproduce which leave no room for interpretation what to do, describing actual results and expected results after performing the steps to reproduce, attaching or linking to a public testcase, etc). You can edit the task description by clicking Edit Task.
Thanks!

.avgas updated the task description. (Show Details)

while I'd like to get on "A380" page.

@.avgas: Can you please explain which actual underlying problem this would solve for you? Is this just a "I like blue more than red" personal preference, or is there an actual use case for this change?

Aklapper renamed this task from Redirect link in Special:What_links_here to Redirect link in Special:What_links_here should link to original page and not target page.Mar 30 2018, 8:01 PM

@.avgas: Can you please explain which actual underlying problem this would solve for you? Is this just a "I like blue more than red" personal preference, or is there an actual use case for this change?

Unfortunately closing this report as no further information has been provided.

@.avgas: After you have provided the information asked for and if this still happens, please set the status of this report back to "Open" via the Add Action...Change Status dropdown. Thanks!

According with logical thinking, wlink present below text box should aim EXACTLY to queried page, not to its (possible) redirect. I don't think this could be a personal preference.

For my better understanding, the result is the line "The following pages link to A380" with A380 linking to https://en.wikipedia.org/wiki/A380 . The reporter seems to request to append redirect=no to that very link.

Still missing a use case why looking at a Redirect page helps you with getting work done, compared to the redirect target page. See T189860#4094780.

Thanks @Aklapper, you well summarized. I've added a use case directly from the task description.

Change 431629 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] Use redirect=no in whatLinksHere if the target is a redirect

https://gerrit.wikimedia.org/r/431629

Change 431629 merged by jenkins-bot:
[mediawiki/core@master] Use redirect=no in whatLinksHere if the target is a redirect

https://gerrit.wikimedia.org/r/431629

PrimeHunter added a subscriber: PrimeHunter.

Please revert the current implementation of this change. It breaks the message in all wikis which have customized it to use the page name to add other useful links on WhatLinksHere. See e.g.:

https://en.wikipedia.org/w/index.php?title=MediaWiki:Linkshere&action=edit
https://de.wikipedia.org/w/index.php?title=MediaWiki:Linkshere&action=edit
https://fr.wikipedia.org/w/index.php?title=MediaWiki:Linkshere&action=edit

Customized messages assume $1 is the page name but it has now changed to a html link which is difficult to work with if it's even possible.

The message name was changed from Linkshere to Linkshere-2 so the customized messages are not currently used but if the wikis try to copy them then it will not work. I suggest either a full reversal of the change or to make it backwards compatible with existing customized messages. This could be done by calling the message Linkshere again with the page name as $1 as before. A new $2 could be added with the redirect=no functionality and the default Linkshere could use $2. I suggest a quick reversal so wikis don't waste more time dealing with this. Implementation of my suggested $2 should not delay the restoration of the current customized messages.

Another problem that red links are now blue was reported in https://phabricator.wikimedia.org/T195933

There is discussion here:
https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Jarry's_Template_transclusion_count_missing!
https://en.wikipedia.org/wiki/MediaWiki_talk:Linkshere#New_message_name

Daimona triaged this task as High priority.May 30 2018, 3:12 PM
Daimona added a subscriber: Raymond.

Customized message weren't considered when submitting this patch, especially messages which highly expand the basic one. The messages were renamed because we changed the parsing from wikitext to HTML, since we don't have a wikisyntax way to provide a link with redirect=no. My proposal (which should be almost the same as yours) is that we change message parameters to be:

$1 - plain page name
$2 - HTML link

and change the default message to

The following pages link to <strong>$2</strong>:

So that users will still be able to use $1 for whatever they want. However, the message will still be treated as HTML, so I don't think we can restore the old "linkshere" message. I'll prepare a patch with this solution, and we'd also need @Raymond to please change $1 to $2 in all involved messages.

Some other notes:

  • The red/blue link problem will be addressed separately in a follow-up
  • We should have notified users in Tech News
  • I disagree with the change being "annoying and pointless", and disagree even more on the need to stab someone :-[
  • Users won't be required to change any existing message. Or, if they do, then such messages will need to be changed again after incoming patch.

Change 436307 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] Make linkshere-related messages backward compatible

https://gerrit.wikimedia.org/r/436307

Better late than never. We should notify users that they need to move customization to the new message, keeping in mind that it will be treated as HTML, and if they already made some change to workaround the HTML link they'll be able again to use $1 as before.

@Daimona I will take care for the change on translatewiki.net and change $1 to $2 in all involved messages.

@Raymond Many thanks! Of course, we need to wait for the patch above to be merged on master and maybe backported.

I called it annoying and pointless before knowing the purpose was to enable redirect=no. Sorry about that.
I'm unsure what it means when it's both said the new version will be backwards compatible and it will be html. Will customized messages be able to use wikitext like previously? If yes then all sounds fine. If no then the previous customized functionality may be hard or impossible to restore. It used features like namespace-dependent behaviour and url encoding of the page name. MediaWiki messages should allow wikitext as much as possible. Wikisyntax can link with redirect=no by using a url instead of a wikilink, e.g.:
<span class="plainlinks">[{{fullurl:$1|redirect=no}} $1]</span>

But at the mobile site it would link to the desktop site due to T52399.
If there is a choice between enabling wikitext and enabling redirect=no then I strongly prefer the former.

Yes, it'll be possible to use wikitext there. Anyway let's wait for someone with a better idea or to merge my patches.

How would you phrase this in Tech News, if included in the message that goes on Monday? Something like this?

Redirect links in [[Special:What links here]] now link to the original page and not the target page. This was done last week. This was a problem for some wikis that now had messages that were no longer true. A new change tries to correct this. Wikis that already changed their customised messages might have to change them again. [link]

@Johan Yeah, more or less, thanks :) I didn't write it myself because I'd rather wait for the patch, first. Actually, I realized that we may go back to the message without "-2", as far as we keep the old $1 parameter the same as above, and of course if Raymond could help us by moving again all messages. So, depending on whether we move back messages (1) or not (2) my proposed message would be:

(1)

Redirect links in [[Special:What links here]] now link to the original page and not the target page. This was done last week by changing the used messages: [[Mediawiki:linkshere]], [[Mediawiki:nolinkshere]] e [[Mediawiki:nolinkshere-ns]] were added a "-2" at the end. This was a problem for some wikis that customized the message, since the new, uncustomized version started to appear and old customization stopped working. A new change corrected this by using the old messages again, with one more parameter for customization. Wikis that already changed their customized messages with the new "-2" suffix will have to move the customization back again. [link]

(2)

Redirect links in [[Special:What links here]] now link to the original page and not the target page. This was done last week by changing the used messages: [[Mediawiki:linkshere]], [[Mediawiki:nolinkshere]] e [[Mediawiki:nolinkshere-ns]] were added a "-2" at the end. This was a problem for some wikis that customized the message, since the new, uncustomized version started to appear and old customization stopped working. A new change corrected this by re-adding the old parameter used for customization. Wikis will only have to move their old customized message to the new "-2" one without any further change. [link]

As usual, this surely is unnecessarily verbose and might non be suitable for en-1 users, but unfortunately I can't do much better.

Thanks. And don't worry about being unnecessarily verbose – fixing that is part of why I'm here, after all. (:

I'll wait with including this until we know what we're going to do.

Change 436307 merged by jenkins-bot:
[mediawiki/core@master] Make linkshere-related messages backward compatible

https://gerrit.wikimedia.org/r/436307

Change 436684 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] Use the old linkshere-related messages without "-2"

https://gerrit.wikimedia.org/r/436684

The patch above is to restore old messages, which I think we can do safely. @Legoktm since you reviewed the other related patches, could you please take a look at this as well? @Johan, version (1) in my previous post can now be added to T/N, and @Raymond could you please do the following?

  • Re-move "linkshere-2", "nolinkshere-2" and "nolinkshere-ns-2" to their old version without "-2" (that is, revert the previous move)
  • Change $1 to $2

And this should solve this problem once and for all :-)

@Daimona: Text replacement - "$1" to "$2" done per https://gerrit.wikimedia.org/r/436307

https://gerrit.wikimedia.org/r/436684 is not merged until now. Re-move will be done after the merge.

Could someone please review the patch above? I think it's much better if we get everything up all at once with this week's train.

Could someone please review the patch above? I think it's much better if we get everything up all at once with this week's train.

Sorry for the delay, reviewed it now. Do you want it backported?

Change 436684 merged by jenkins-bot:
[mediawiki/core@master] Use the old linkshere-related messages without "-2"

https://gerrit.wikimedia.org/r/436684

No problem :-) I'd say yes, let's put it in the ongoing train (together with the change on translatewiki), because of how we notified users about this

Change 437924 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@wmf/1.32.0-wmf.7] Use the old linkshere-related messages without "-2"

https://gerrit.wikimedia.org/r/437924

@Daimona: Translations moved back on translatewiki.net. Export to Gerrit will follow next night.

Many thanks! So we're waiting for the change to come on gerrit and the backport of the above change as well.

Change 437924 abandoned by Daimona Eaytoy:
Use the old linkshere-related messages without "-2"

Reason:
We decided to wait for the train.

https://gerrit.wikimedia.org/r/437924