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

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

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

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

thanks for the quick fix everyone!

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

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?

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