Reviewed: https://reviews.mahara.org/6830 Committed: https://git.mahara.org/mahara/mahara/commit/f7470234c8be263368988cd712b25782dd7dfd48 Submitter: Robert Lyon ([email protected]) Branch: master
commit f7470234c8be263368988cd712b25782dd7dfd48 Author: Aaron Wells <[email protected]> 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 -- 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: New Status in Mahara 15.10 series: New Status in Mahara 16.04 series: New 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

