Forums | Mahara Community

Support /
Losing Links After Upgrades


30 August 2017, 5:57

Hello,

I have a situation where multiple links have lost their connection to their file. A group was created in 2012 ( don't know the revision of Mahara at that time because I didn't start until 2015) and it contained multiple pages. Each of those pages had multiple links pointing to other Mahara pages within the group. Those pages are shared to the public in the shared section of the group. The links no longer work. However, the pages are still there. Here is an example of one of the links: http://www.plymouth.edu/webapp/mahara/artefact/file/download.php?file=82256&view=16883

FYI. The group has not been accessed for at least a couple of years. However, a faculty member needs this group now for a project they are completing. We are now on Rev 16.10. 

Could this be because of upgrades to Mahara? If not, what could have caused this?  Is there anyway to get these links reconnected without doing it manually? To rectify this problem manually will take hours of work.

Any help will be appreciated.

Thank you,

Melinda

Kristina Hoeppner's profile picture
Posts: 4863

31 August 2017, 14:52

Hello Melinda,

The URL www.plymouth.edu/webapp/mahara does not exist anymore. Your portfolio site is now hosted on www.plymouth.edu/eportfolio

Normally, if the URL changes, links to pages and files on Mahara are updated automatically to reflect the change. The exception is if you link to a file or page from within a Note, Text or journal entry for example. In those cases, you place the link manually. You will need to update the database directly in order to correct those links programmatically.

Aaron gives an explanation of how it can be done at as places that use TinyMCE, the editor, are stored as serialized data. If you want to take an example of the code that you can adapt, take a look at https://git.mahara.org/mahara/mahara/blob/17.04_STABLE/htdocs/lib/db/upgrade.php#L4022 (lines 4022 to 4068), which is already for TinyMCE. In the example, it's replacing Emoticons, but your can adapt it to change other parts of the URL. You may need to consider adding other tables to check depending on where the URLs are.

Cheers

Kristina

 

20 September 2017, 0:28

Thank you for your help.

3 results