mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #37143
[Bug 1612451] A change has been merged
Reviewed: https://reviews.mahara.org/6833
Committed: https://git.mahara.org/mahara/mahara/commit/6ada1f7a9b6fa56cfec841635a99c54029b56c65
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 15.10_STABLE
commit 6ada1f7a9b6fa56cfec841635a99c54029b56c65
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Tue Aug 9 17:41:10 2016 +1200
Bug 1612451: Graceful handling of invalid embedded artefact id
Adds a try/catch block so that the code doesn't crash if
you've put in an invalid image ID in an embedded image tag.
Also tweaks the embed code so that it will skip invalid
images but continue processing the rest of the text block.
behatnotneeded: Covered by existing tests
Change-Id: I573adc7d29a0c1a4289f1b0a0b402d308a739be9
(cherry picked from commit f7470234c8be263368988cd712b25782dd7dfd48)
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1612451
Title:
Artefact blog upgrade gives error for embedded image
Status in Mahara:
Fix Committed
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
Fix Committed
Status in Mahara 16.04 series:
Fix Committed
Status in Mahara 16.10 series:
Fix Committed
Bug description:
This error:
Artefact with id 6 not found
Call stack (most recent first):
artefact_instance_from_id("6") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/embeddedimage.php:79
EmbeddedImage::prepare_embedded_images(" <p>This is a test</p> <p><img width="155" heig...", "blogpost", "7", null, "1") at /home/robertl/htdocs/mahara-devel/mahara/htdocs/artefact/blog/db/upgrade.php:76
Occurs when a Journal post (blogpost) has an embedded image <img> tag
in it but the underlying image itself has been deleted.
We need to adjust EmbeddedImage::prepare_embedded_images() to check
that the underlying image artefact still exists
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1612451/+subscriptions
References