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

Bug #1856824 reported by Robert Lyon on 2019-12-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
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

Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
milestone: none → 20.04.0
Changed in mahara:
milestone: 20.04.0 → 20.10.0

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

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) on 2020-10-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers