Page MenuHomePhabricator

Search results discard first letter of fragment identifiers
Closed, ResolvedPublic

Description

When the search results include links to page fragments (with the hash notation), the first letter of the hash identifier is discarded.
For example:
https://test2.wikipedia.org/w/index.php?search=find+areas
returns a link to /wiki/Calculus#ow_to_use_Integral_Calculus_to_find_Areas: notice the missing H after the hash sign. Fixing the URL manually leads to the correct place in the page.

Event Timeline

Cigaes created this task.Aug 6 2016, 3:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 6 2016, 3:11 PM
Danny_B triaged this task as Unbreak Now! priority.Aug 6 2016, 3:14 PM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptAug 6 2016, 3:14 PM
Restricted Application added subscribers: Luke081515, TerraCodes. · View Herald Transcript

Change 303518 had a related patch set uploaded (by DCausse):
Add a leading # when calling setFragment

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

greg added a subscriber: greg.Aug 8 2016, 5:50 PM

This is UBN! and appears to be affecting production. What is the status and timeline for resolution?

@Smalyshev @TJones Can you review the above patch, please? If it fixes the issue, we need to get this deployed.

@greg trying to get this patch reviewed and applied asap so we can swat today.

Change 303518 merged by jenkins-bot:
Use createFragmentTarget instead of setFragment

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

Change 303597 had a related patch set uploaded (by DCausse):
Use createFragmentTarget instead of setFragment

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

debt added a subscriber: debt.Aug 8 2016, 7:15 PM

thanks for the quick fix everyone!

Patch for wmf13 branch (https://gerrit.wikimedia.org/r/303597) added to morning swat tomorrow (Aug 9).

greg added a comment.Aug 8 2016, 8:05 PM

Patch for wmf13 branch (https://gerrit.wikimedia.org/r/303597) added to morning swat tomorrow (Aug 9).

If someone is around, there is also the evening swat window in a little less than 3 hours. If it is UBN! (I'm not sure, it wasn't set by someone on Discovery) then it should probably be... now, yes? :)

Patch for wmf13 branch (https://gerrit.wikimedia.org/r/303597) added to morning swat tomorrow (Aug 9).

If someone is around, there is also the evening swat window in a little less than 3 hours. If it is UBN! (I'm not sure, it wasn't set by someone on Discovery) then it should probably be... now, yes? :)

Getting it done today would be ideal. That said, it only breaks a small number of searches and only breaks them in a fairly minor way, so it's not the worst thing in the world if it does have to wait until tomorrow.

greg lowered the priority of this task from Unbreak Now! to High.Aug 8 2016, 8:23 PM

Per Dan.

Change 303597 merged by jenkins-bot:
Use createFragmentTarget instead of setFragment

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

Mentioned in SAL [2016-08-09T15:18:46Z] <thcipriani@tin> Synchronized php-1.28.0-wmf.13/extensions/CirrusSearch/includes/Search/Result.php: SWAT: [[gerrit:303597|Use createFragmentTarget instead of setFragment (T142297)]] (duration: 00m 54s)

Deployed it seems.

Can this task be closed as resolved or what's missing here?

dcausse closed this task as Resolved.Aug 11 2016, 12:16 PM

Thanks for the heads up @Aklapper
The fix was deployed on all wikis, closing.