Page MenuHomePhabricator

Hash gets swallowed by Varnish redirect to mobile site
Closed, DeclinedPublic

Description

Go to https://en.m.wikipedia.org/wiki/Roekiah#Early_life on a mobile device. This doesn't take you to the section. It leaves you at the top of the page.

It didn't used to do this.


Version: unspecified
Severity: normal

Details

Reference
bz64918

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:18 AM
bzimport set Reference to bz64918.
bzimport added a subscriber: Unknown Object (MLST).
Jdlrobson created this task.May 5 2014, 9:09 PM

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/9q49egRq

I don't think it's a problem with the hash. If I try it with an h2 header, it works fine. It appears to only fail for sections that are collapsed.

Change 133470 merged by jenkins-bot:
Respect the hash with sub headings

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

Sigh, it's back.

Steps to repro:

  1. Google "wiring color codes" in Safari mobile browser on iPhone.
  2. Follow the "Jump to "Colour code" link in the results.
  3. Get taken to the top of the article instead of the color code section.

I did write a browser test for this so you may want to check if that is failing...

See features/toggling.feature
According to the test it's not broken.

Plus, when I follow those steps on my Android Chrome device it works for me.
If it's not working on an iPhone there might be another bug here.

I wasn't able to reproduce, but I'm also not 100% clear on the reproduction steps. When I search for "wiring color codes" on en.wiki I don't get any results to click on. I tried using the original repro steps in Comment #1 and those seem to work OK (no bug apparent).

I was able to reproduce by following the steps more closely. It looks like the hash is getting lost at the Varnish redirect level. Do you want to take a look at this Max?

In other words, if I try to go to https://en.m.wikipedia.org/wiki/Earth#Shape directly, it works fine. But if I try to go to https://en.wikipedia.org/wiki/Earth#Shape on a mobile device, the hash gets lost and I'm redirected to https://en.m.wikipedia.org/wiki/Earth.

According to Max, the problem here is that Varnish has no way of knowing the hash and this has always been a problem.

you should really create a new bug in these circumstances. the original bug was about a JavaScript error. I seem to remember the varnish bug was recorded separately.

These are not the hashes you're looking for:P

In varnish's terminology, a hash is a cache key. What JS calls a hash is never passed to server.

I'm closing this bug. See bug 50517 if you want to discuss this different issue. Original reported issue works fine.