← Back to team overview

mahara-contributors team mailing list archive

[Bug 1540667] A change has been merged

 

Reviewed:  https://reviews.mahara.org/5994
Committed: https://git.mahara.org/mahara/mahara/commit/3f4b4b7f9cbda6c63090843605591285492bc4fe
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit 3f4b4b7f9cbda6c63090843605591285492bc4fe
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date:   Tue Feb 2 13:05:44 2016 +1300

Prevent crashes when embedding images

Bug 1540667: Prior to commit c432903, we were loading htdocs/artefact/internal/lib.php
on *every* page load, via the login auth method's code that checked for missing
internal artefact files. This call meant that we also loaded artefact/lib.php on
every page load.

Removing that for performance reasons, caused some calls to embeddedimages.php to fail,
when they were on pages that aren't otherwise requiring artefact/lib.php.

behatnotneeded: Can't use the image embedder from Behat

Change-Id: Ibcdbd17d289f2b4614c28ad522173286acc9bc27

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

Title:
  Fatal error trying to use an image in a forum topic

Status in Mahara:
  Fix Committed
Status in Mahara 16.04 series:
  Fix Committed

Bug description:
  I noticed this one while using 16.04dev.

  To replicate:

  1. Create a group
  2. In the group, navigate to the default forum and post a topic
  3. In the TinyMCE editor for the topic, use the image button.
  4. The image button will pop up the TinyMCE image utility, with the Mahara uploader/selector. Use this to upload an image into your file storage and put the image into the TinyMCE text area.
  5. Save the topic.

  Expected result: The topic is saved, and you can see it with the image in place.
  Actual result: Mahara loads a fatal error page with this error:

  ( ! ) Fatal error: Call to undefined function artefact_instance_from_id() in /home/aaronw/www/mahara/htdocs/lib/embeddedimage.php on line 59
  Call Stack
  #	Time	Memory	Function	Location
  1	0.0006	326080	{main}( )	../edittopic.php:0
  2	0.0961	10553960	pieform( )	../edittopic.php:173
  3	0.0984	10858176	Pieform::process( )	../mahara.php:4438
  4	0.0984	10860696	Pieform->__construct( )	../pieform.php:161
  5	0.6325	11054376	call_user_func_array ( )	../pieform.php:540
  6	0.6325	11054720	addtopic_submit( )	../pieform.php:540
  7	0.6997	11082160	EmbeddedImage::prepare_embedded_images( )	../edittopic.php:220

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1540667/+subscriptions


References