Page MenuHomePhabricator

Auto-numbered external links are not visible when JS doesn't execute
Closed, ResolvedPublic

Description

" Ciencia Al Poder (Talkcontribs) This page contains all the information you should know about http compression: " http://flow-tests.wmflabs.org/w/index.php?title=Topic:Sd4yv8rsdn6x53h0&topic_showPostId=sd7ejjb1nqh8j49i#flow-post-sd7ejjb1nqh8j49i is missing the link.

Original wikitext:

This page contains all the information you should know about http compression: [http://lmgtfy.com/?q=http+compression]

https://www.mediawiki.org/wiki/Thread:Project:Support_desk/enable_compression_of_images_to_speed_up_the_page_load_%282%29

Please run HTML differs or something between the output of the original wikitext by MediaWiki parser and the output of the conversion.

Event Timeline

Nemo_bis raised the priority of this task from to High.
Nemo_bis updated the task description. (Show Details)

I see the link right there. For me, the Parsoid version is:

<p data-parsoid="{&quot;dsr&quot;:[0,118,0,0]}">This page contains all the information you should know about http compression: <a rel="mw:ExtLink" href="http://lmgtfy.com/?q=http+compression" data-parsoid="{&quot;targetOff&quot;:117,&quot;contentOffsets&quot;:[117,117],&quot;dsr&quot;:[79,118,38,1]}"></a></p>

Permalink to initial Flow-imported version is http://flow-tests.wmflabs.org/w/index.php?title=Topic:Sd4yv8rsdn6x53h0&topic_postId=sd7ejjb1nqh8j49i&topic_revId=sd7ejjb1nqh8j49i&action=single-view .

This seems invalid.

In T93723#1146216, @Mattflaschen wrote:

I see the link right there. For me, the Parsoid version is: (...)

The link is there, true, but it has no text, so there's nothing to display. But that isn't true on the original LQT post

The strange part is that, I think, when I viewed that page from my work, the link text "[1]" was there, but now I don't see it from home :S

the [1] is applied by some parsoid specific css in core, from resources/src/mediawiki.skinning/content.parsoid.less:

/*
 * Auto-numbered external links
 * Parsoid renders those as link without content, and lets CSS do the
 * counting. This way the counting style can be customized, and counts update
 * automatically when content is modified.
 */
.mw-body-content {
    counter-reset: mw-NumberedExtLink;
}

.mw-body-content a[rel~="mw:ExtLink"]:empty:after {
    content: "[" counter(mw-NumberedExtLink) "]";
    counter-increment: mw-NumberedExtLink;
}

It seems the problem is this parsoid css is not being delivered to mobile? The resource itself does seem to be enabled for mobile, will need to do some investigation to see whats happening.

Ah! Now that you mention that, now I see why the text isn't displayed for me at home: because I have a stricter cookie configuration and the nasty Firefox bug 748620 breaks JavaScript.

So basically, if JavaScript is disabled, there's no text for autonumbered links? That doesn't sound right.

The patch below will embed the mediawiki.skinning.content.parsoid requirement into a <link> in the page rather than letting resource loader add them after page load via javascript. May or may not solve the mobile issue.

Change 199753 had a related patch set uploaded (by EBernhardson):
Use addModuleStyles for mediawiki.skinning.content.parsoid

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

Mattflaschen-WMF renamed this task from Conversion to Flow eats content to Auto-numbered external links are not visible with JS turned off.Mar 25 2015, 10:19 PM
Mattflaschen-WMF renamed this task from Auto-numbered external links are not visible with JS turned off to Auto-numbered external links are not visible when JS doesn't execute.
Mattflaschen-WMF set Security to None.

Change 199753 merged by jenkins-bot:
Use addModuleStyles for mediawiki.skinning.content.parsoid

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

Due to a core change. Not sure how flow-tests got updated. Fixed now.

This no-JS Parsoid styling is also fixed on MediaWiki.org by now.