LoadXML error when upgrading from 18.10 to 20.04

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

Bug Description

There is a malformed xml in artefact description that will produce an exception when running upgrades for code to related to following bug

https://bugs.launchpad.net/mahara/+bug/1826948

we might need to catch this exception when calling LoadXML during the upgrade

Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :
summary: - LoadXML error when upgrading from 19.04 to 20.04
+ LoadXML error when upgrading from 18.10 to 20.04
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/11067

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

to test follow steps

- have a mahara site 18.10
- add a comment to a page
- go to the DB and check the id of the comment

select * from artefact where artefacttype='comment'
- change the artefact description to a malformed xml

update artefact set
description ='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<p class="a" align="center"><strong><span lang="EN-US">Title</span></strong></p>
<p class="a"><span lang="EN-US">Random text.</span></p>
<p class="a"><span lang="EN-US"><img src="data:image/png,iVBORw0'
where id = <artefact id>;

- change the code to master branch
- upgrade

excepted result: the site upgrades without any errors
actual results: the upgrade will show errors like the ones shown in the image attached to this bug report

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

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

commit a3383fc2e89bfc8e4cc6e0aea6023b0e9e288955
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Jul 13 13:02:27 2020 +1200

Bug 1887317: ignore warning from malformed xml in LoadXML

in 19.04 we added an upgrade step for
https://bugs.launchpad.net/mahara/+bug/1826948
to fix comments descriptions but it will throw
warning if the xml is malformed
the code will fix the xml anyway, but we should
prevent it to display the warnings as is they were
errors in the upgrade page

behatnotneeded

Change-Id: Iab6eed353a1b17876e3037b591633367d4d96d1a

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/11084

Revision history for this message
Mahara Bot (dev-mahara) wrote :

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

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/11086

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

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

commit ab6b2f21ae6d3a4131fa55c772324b7998e31cc9
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Jul 13 13:02:27 2020 +1200

Bug 1887317: ignore warning from malformed xml in LoadXML

in 19.04 we added an upgrade step for
https://bugs.launchpad.net/mahara/+bug/1826948
to fix comments descriptions but it will throw
warning if the xml is malformed
the code will fix the xml anyway, but we should
prevent it to display the warnings as is they were
errors in the upgrade page

behatnotneeded

Change-Id: Iab6eed353a1b17876e3037b591633367d4d96d1a
(cherry picked from commit a3383fc2e89bfc8e4cc6e0aea6023b0e9e288955)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

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

commit f81006fa4f9c431dbfb0c8aafbf055698c51c9e9
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Jul 13 13:02:27 2020 +1200

Bug 1887317: ignore warning from malformed xml in LoadXML

in 19.04 we added an upgrade step for
https://bugs.launchpad.net/mahara/+bug/1826948
to fix comments descriptions but it will throw
warning if the xml is malformed
the code will fix the xml anyway, but we should
prevent it to display the warnings as is they were
errors in the upgrade page

behatnotneeded

Change-Id: Iab6eed353a1b17876e3037b591633367d4d96d1a
(cherry picked from commit a3383fc2e89bfc8e4cc6e0aea6023b0e9e288955)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/11086
Committed: https://git.mahara.org/mahara/mahara/commit/6551ec53a7fedff7d64c5127229a347af46bd309
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit 6551ec53a7fedff7d64c5127229a347af46bd309
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Jul 13 13:02:27 2020 +1200

Bug 1887317: ignore warning from malformed xml in LoadXML

in 19.04 we added an upgrade step for
https://bugs.launchpad.net/mahara/+bug/1826948
to fix comments descriptions but it will throw
warning if the xml is malformed
the code will fix the xml anyway, but we should
prevent it to display the warnings as is they were
errors in the upgrade page

behatnotneeded

Change-Id: Iab6eed353a1b17876e3037b591633367d4d96d1a
(cherry picked from commit a3383fc2e89bfc8e4cc6e0aea6023b0e9e288955)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
no longer affects: mahara
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.