Ability to change old embedded urls into correct ones if the site changes domain name

Bug #1856824 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Robert Lyon

Bug Description

If you have a Mahara site that has embedded content in description fields for example then if you change the URL of the site those embedded items will not show any more as the URL path is incorrect.

You can fix most of this if you are a sysadmin by running queries on the database directly but there are other places that need to be fixed individually.

It would be better to have an admin section page similar to cleanurls where one can check if there is any embedded content not using the current URL and if so allow one to switch content from old url to new url in a cleaner way

Tags: newfeature
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
milestone: none → 20.04.0
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :
Changed in mahara:
milestone: 20.04.0 → 20.10.0
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

to test:

- go to admin/extensions/embeddedurls.php
- if all the embedded artefact urls are ok, there should be a message
'There are no potential old URLs detected.'

For page instructions
- create a page and go to edit settings
- on the advanced section, edit the instructions and add an image
- on the tinymce editor menu, open the sorce code (button '<>')
- find the site url and change it
for example if you have http://mahara/
change it for http://mahara2/
and save
- display the page and you should not see the image in the instructions

- go to admin/extensions/embeddedurls.php
- now it should display a form with a table. The row for instructions should have 1 result
- Fill the 'Old site URL' with http://mahara2/
- click on 'Check URL'
- Click on 'Update URLs' and then confirm the migration

- display the page with the instructions and the image should be displayed now

This same steps can be used for testing view description, group description, artefacts

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

Reviewed: https://reviews.mahara.org/10637
Committed: https://git.mahara.org/mahara/mahara/commit/009b4a9e50e1d57a9163d4d0715906b7f067849a
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 009b4a9e50e1d57a9163d4d0715906b7f067849a
Author: Robert Lyon <email address hidden>
Date: Wed Dec 4 14:34:01 2019 +1300

Bug 1856824: Allow embedded URLs to be updated via admin if site changes URL

This will be useful if a site goes from http to https
or if a site's database gets moved to another site eg prod -> testing

Currently a 'hidden' page at admin/extensions/embeddedurls.php

Change-Id: I73aae215306e172869b8962c7ed2e48da9743b81
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
tags: added: newfeature
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "main" branch: https://reviews.mahara.org/12328

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

Reviewed: https://reviews.mahara.org/12328
Committed: https://git.mahara.org/mahara/mahara/commit/b9828fd343d39b58c4f6622545526d881444880d
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit b9828fd343d39b58c4f6622545526d881444880d
Author: Dianne Tennent <email address hidden>
Date: Mon Jan 10 14:48:37 2022 +1300

Bug 1952986: Add 'Emdedded URLs' to the developer menu

Related to bug #1856824 where we introduced a URL
conversion tool that was a hidden page. Now added
to the admin menu under 'Development',
called 'Embedded URLs', and placed below 'Style guide'
in alphabetical order.

Change-Id: I1692de5e29afdc1167a367369bd0ffefff5511c9

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.