External links in Mahara no longer open in external tab/window by default

Bug #1875785 reported by Rangi Daymond
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Cecilia Vela Gurovic
19.10
Fix Released
Medium
Unassigned
20.04
Fix Released
Medium
Unassigned
20.10
Fix Released
Medium
Cecilia Vela Gurovic

Bug Description

Code: Release 2020.04_RC2
Browser/s: Chrome & Firefox
Theme: Raw

Summary: The functionality for related bug ​#1802205 'Make all external links in Mahara open in external tab/window by default' no longer works.

Steps:

As logged in PersonA:
1. Create a new page with a text block on it that has a few/5 paragraphs of text.

2. Use the tinymce editor to add the following links before the text paragraphs using the Insert/Edit Link modal:
a. External URL = https://www.catalyst.net.nz/
   Text to display = 'Catalyst default-None, new tab/window'
   Open link in... = 'None'
b. External URL = https://www.catalyst.net.nz/
   Text to display = 'Catalyst -same page'
   Open link in... = 'Same page'
c. External URL display = https://www.catalyst.net.nz/
   Text to display = 'Catalyst -new tab/window'
   Open link in... = 'New window'
d. Internal URL = http://http://mahara.rdaymond.wgtn.cat-it.co.nz/artefact/internal/index.php
   Text to display = 'Profile page default-None, same tab/window'
   Open link in... = 'None'
e. Internal URL = http://http://mahara.rdaymond.wgtn.cat-it.co.nz/artefact/internal/index.php
   Text to display = 'Profile page - same page',
   Open link in... = 'Same page'
f. Internal URL = http://http://mahara.rdaymond.wgtn.cat-it.co.nz/artefact/internal/index.php
   Text to display = 'Profile page - new tab/window'
   Open link in... = 'New window'.

3. At the bottom of the page, enter the text 'End of page' select the text and use the tinymce editor to create an anchor tag (3rd option line, second to last icon) named 'Page_End'.

4. Create the following in block link to the 'Page_End' anchor from the top of the page:
   URL = #Page_End
   Text to display = 'Link to page end -default None'
   Open link in... = 'None'

Expected results: When selected, each link should behave as per its displayed link text.
Actual results: all links behave as expected EXCEPT for 2.a.

Tags: regression
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

This stopped working on blocks in a page with gridstack.

It looks like the script to replace the target in links is triggered when the page is ready, but the blocks have not loaded yet

Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
importance: Undecided → Medium
status: New → In Progress
Changed in mahara:
milestone: none → 20.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10950

tags: added: regression
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10950
Committed: https://git.mahara.org/mahara/mahara/commit/9f6a3896d150d03f7c541f7b7860fb1bf3373f49
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 9f6a3896d150d03f7c541f7b7860fb1bf3373f49
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Apr 29 19:01:21 2020 +1200

Bug 1875785: replace target attr in links: wait for the block to load

Whether an external <a> link has target=_blank or not we should open them in external tab/window to differentiate mahara site from external content

check https://bugs.launchpad.net/mahara/+bug/1802205

behatnotneeded

Change-Id: I371a9f63132ae49eedd7543b682fe80602130117

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/10960

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10960
Committed: https://git.mahara.org/mahara/mahara/commit/9bf6fc173ecbe1912a762b8dfb0ebeb0fec970a3
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.04_STABLE

commit 9bf6fc173ecbe1912a762b8dfb0ebeb0fec970a3
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Apr 29 19:01:21 2020 +1200

Bug 1875785: replace target attr in links: wait for the block to load

Whether an external <a> link has target=_blank or not we should open them in external tab/window to differentiate mahara site from external content

check https://bugs.launchpad.net/mahara/+bug/1802205

behatnotneeded

Change-Id: I371a9f63132ae49eedd7543b682fe80602130117
(cherry picked from commit 9f6a3896d150d03f7c541f7b7860fb1bf3373f49)

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "19.10_STABLE" branch: https://reviews.mahara.org/10961

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10961
Committed: https://git.mahara.org/mahara/mahara/commit/22b18c58de76c98bc5a84e7913eddb7b594ae745
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit 22b18c58de76c98bc5a84e7913eddb7b594ae745
Author: Cecilia Vela Gurovic <email address hidden>
Date: Wed Apr 29 19:01:21 2020 +1200

Bug 1875785: replace target attr in links: wait for the block to load

Whether an external <a> link has target=_blank or not we should open them in external tab/window to differentiate mahara site from external content

check https://bugs.launchpad.net/mahara/+bug/1802205

behatnotneeded

Change-Id: I371a9f63132ae49eedd7543b682fe80602130117
(cherry picked from commit 9f6a3896d150d03f7c541f7b7860fb1bf3373f49)
(cherry picked from commit 9bf6fc173ecbe1912a762b8dfb0ebeb0fec970a3)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.