Page MenuHomePhabricator

VisualEditor: Blue link / red link logic should descend into links inside transclusions
Closed, ResolvedPublic

Description

Redlinks are displayed as blue links in templates inside the VisualEditor

https://en.wikipedia.org/wiki/Javier_Payo?veaction=edit


Version: unspecified
Severity: minor

Details

Reference
bz65353

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:13 AM
bzimport set Reference to bz65353.
  • Bug 65355 has been marked as a duplicate of this bug. ***

We used to parse template content with action=parse from the PHP parser which naturally contained <a class="new">.

Nowadays we use Parsoid for the generated fragments as well, but this meant we lost the natural classes MediaWiki provided.

The mw.LinkCache logic should extend to the nodes inside generated content.

I think right now this isn't done because we use the same DOM for both the DM and the CE of generated content nodes, but, just as we do for practically everything else, it shouldn't be an issue to have our copy in CE be different from the copy in DM (thus not having to worry about needing to strip any classes when saving back to Parsoid).

Change 165240 had a related patch set uploaded by Alex Monk:
Apply link styling logic to transclusion nodes

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

Change 165240 merged by jenkins-bot:
Apply link styling logic to transclusion nodes

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

Transclusion nodes are not the only generated content nodes

(In reply to Alex Monk from comment #5)

Transclusion nodes are not the only generated content nodes

They are, however, almost exclusively the GCNs with wikitext links in them. Do we actually care about <easytimeline> blocks?

Well, it was you who changed this bug from being about just templates to being about "generated content nodes (e.g. templates)"... We can just make it about templates only again if you want.

(In reply to Alex Monk from comment #7)

Well, it was you who changed this bug from being about just templates to
being about "generated content nodes (e.g. templates)"... We can just make
it about templates only again if you want.

Created that as bug 71900.