Page MenuHomePhabricator

MobileFrontend fails to enable Edit buttons when incorrectly mixing section levels
Closed, ResolvedPublic

Description

Entering section headers in the wrong hierarchical order, e.g. Level 4 section before Level 2 section, causes Javascript to trip with exception "Exception thrown by mobile.startup : TypeError: Cannot read property 'children' of undefined : Line 150", making the code to enable Edit buttons unreachable, which in turn makes the page un-editable and un-fixable.

Workaround is to switch to Desktop view, which does not exhibit this problem and fix there. However, unless the user knows that misaligned sections is what is causing the problem of disabled Edit buttons, even switching to Desktop view will not make clear what to do to fix.

Additionally, there are probably other startup tasks that the browser is not completing because of this.

Event Timeline

Manfred.schlager raised the priority of this task from to Needs Triage.
Manfred.schlager updated the task description. (Show Details)
Manfred.schlager subscribed.

Hmm, i tested it with this page content:

==== Test ====
testsection

== Test2 ==
Testsection 2

and can't reproduce it :/ Have you an example page or page source?

Thanks for your prompt answer Florian!

Strange, I was able to reproduce it with the exact same markup. (See screenshots 1 [Desktop in mobile mode] & 2 [Mobile])

Perhaps more info is in order? Versions.png shows installed extensions and software versions. MobileFrontend's version not reported there, but from "version" file in the extension package, I have: "MobileFrontend: REL1_24 2015-02-05T02:09:46 2ae8237"

This is running the latest stable Ubuntu12.04-distributed Chromium for Desktop (37.0.2062.120 (32-bit)) and Chrome (40.0.2214.109) for Android (4.4.2).

Any additional info that may be of help? I'm using this privately, as a project notes repository for myself, but I can open it up so you can experiment with it if that would help.

Screenshot_1.png (1×1 px, 18 KB)

Screenshot_2.png (1×1 px, 26 KB)

Versions.png (2×1 px, 98 KB)

Thanks KLans and Florian.

To make it easier to test and verify, I have setup public access to the wiki exhibiting this issue. You can access sample pages from here: TEST AREA. (NOTE: It's the linked pages which demonstrate the issue, not the TEST AREA page itself.)

I have already setup a test user ( username = tester, password = testing ) for easy editing access.

Please test editing capabilities in both Desktop and Mobile views.

@Manfred.schlager: Big thanks for your work in support us to solve this problem. For a little bit background: Earlier this day i want to try it out with the versions you used, but it was harder to bring back my development environment to REL1_24 as i thought, so i had to move it to a later point.

The biggest problem is, that the problem is in an older branch of MobileFrontend (REL1_24), which we normally doesn't support anymore :/ And the problem seems to be fixed with one of our many commits since then. I try to find out, if there is an easy fix to at least allow editing, but maybe we have to wait until REL1_25 released :(

@Florian: No worries, I'm absolutely delighted to see the level of interest, hard work, and great support you guys put into this AMAZING MW extension! Also glad to have shared my two cents!

Personally, I'm fine keeping the proper ordering of sections in mind so that this issue doesn't affect me, now I know better. And if documenting it also helps someone else, then that's great too!

If REL1_25 fixes this, I can certainly wait. :)

Thanks for everything, have a great day and keep up the awesome work you guys do!

Change 193889 had a related patch set uploaded (by Florianschmidtwelzow):
Cherry pick "Fix transforming sections" to REL1_24

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

Change 193889 abandoned by Florianschmidtwelzow:
Cherry pick "Fix transforming sections" to REL1_24

Reason:
shouldn't be in master, sorry

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

Change 193891 had a related patch set uploaded (by Florianschmidtwelzow):
Cherry pick "Fix transforming sections" to REL1_24

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

Change 193894 had a related patch set uploaded (by Florianschmidtwelzow):
Cherry pick "Fix transforming sections" to REL1_24

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

Change 193894 abandoned by Florianschmidtwelzow:
Cherry pick "Fix transforming sections" to REL1_24

Reason:
git review again :(

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

@Florian what do we need to do to get this bug closed?

Argh, i totally forgot this :/ It's basically just a cherry pick (see https://gerrit.wikimedia.org/r/193891), but actually jenkins doesn't like the tests, let me update it :) If this change get's merged we're finished, the problem is already solved in master :)

Change 193891 merged by MaxSem:
Cherry pick "Fix transforming sections" to REL1_24

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