Problem/Motivation

The external link icon will not show up for any of the external links on the page when any given anchor ID is exactly 'module'.

To reproduce, try the following:

<h2 id="foo">Title 1</h2>

<p>A <a href="https://www.drupal.org/project/extlink">link</a>.</p>

<h2 id="bar">Title 2</h2>

<p>Another <a href="https://www.drupal.org/node/131949/commits">link</a>.</p>

<h2 id="module">Title 3</h2>

<p>One last <a href="https://www.drupal.org/node/2834289">link</a>.</p>

Proposed resolution

TBD.

Remaining tasks

Understand why this particular string is causing the module to fail to display the icon next to all links on the page.

User interface changes

The expected external link icon should now appear on all pages, even those with 'module' as an anchor ID

API changes

None.

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anavarre created an issue. See original summary.

anavarre’s picture

Issue summary: View changes
elachlan’s picture

Can you see anything in the code that might relate to this? I can't see anything targeting elements with an id of 'module'.

yoruvo’s picture

The difference I see between these three links is that the first two are HTTPS, the last is HTTP. Might your issue be related to that, instead?

anavarre’s picture

Issue summary: View changes
anavarre’s picture

@ivi.arocom - I've clarified the issue summary to have only HTTPS links and prevent any confusion. You can try with the sample code to reproduce the issue. I was able to do so just now. Add the first two links and it works immediately. Add the last one with 'module' as the anchor and it fails to display extlink immediately for all links on the page.

elachlan’s picture

Status: Active » Needs review
FileSize
1.97 KB

Status: Needs review » Needs work

The last submitted patch, 7: 2834289-1.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

elachlan’s picture

Status: Needs work » Needs review
FileSize
1.94 KB

Status: Needs review » Needs work

The last submitted patch, 9: 2834289-9.patch, failed testing. View results

elachlan’s picture

Status: Needs work » Needs review
FileSize
1.55 KB

Status: Needs review » Needs work

The last submitted patch, 11: 2834289-11.patch, failed testing. View results

elachlan’s picture

Status: Needs work » Needs review
FileSize
2.52 KB

Status: Needs review » Needs work

The last submitted patch, 13: 2834289-13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

elachlan’s picture

OK. The functional test is displaying the problem. But I think the error is in Drupal Core? It is the one causing the javascript error.

Do you agree?

elachlan’s picture

elachlan’s picture

Status: Needs work » Closed (won't fix)

The issue is in the domready library used by drupal 8.

I have filed an issue at https://github.com/ded/domready/issues/57

Please track the progress there, or at #2961308: All JavaScript breaks if an HTML id="module" is in the markup (domready library bug).