ArtefactTypeMismatchException when you try to display a profile icon in an Image block

Bug #1419539 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Aaron Wells

Bug Description

To replicate:

1. Go to Content -> Profile Icons
2. Upload a new profile icon
3. Go to Portfolio -> Pages
4. Create a new page
5. Put an Image block in the page
6. For the picture in the image block, select the profile icon you just uploaded. (It'll be in the "Images" directory)
7. Save and close the block config

Expected result: The block config closes and you see the image served up.
Actual result: The block config hangs, and this error appears in the server logs:

[WAR] 48 (artefact/lib.php:298) Artefact type mismatch. You are trying to use this profileicon as a image., referer: http://vegas.wgtn.cat-it.co.nz/mahara/ht
docs/view/blocks.php?id=9
Call stack (most recent first):, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
  * ArtefactType->__construct(10, null) at /home/aaronw/www/mahara/htdocs/artefact/file/lib.php:475, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/vi
ew/blocks.php?id=9
  * ArtefactTypeFileBase->__construct(10, null) at /home/aaronw/www/mahara/htdocs/artefact/file/lib.php:1018, referer: http://vegas.wgtn.cat-it.co.nz/mahara/
htdocs/view/blocks.php?id=9
  * ArtefactTypeFile->__construct(10, null) at /home/aaronw/www/mahara/htdocs/artefact/file/lib.php:2219, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdo
cs/view/blocks.php?id=9
  * ArtefactTypeImage->__construct(10) at /home/aaronw/www/mahara/htdocs/artefact/file/blocktype/image/lib.php:52, referer: http://vegas.wgtn.cat-it.co.nz/ma
hara/htdocs/view/blocks.php?id=9
  * PluginBlocktypeImage::render_instance(object(BlockInstance), true) at Unknown:0, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id
=9
  * call_user_func_array(array(size 2), array(size 2)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:1581, referer: http://vegas.wgtn.cat-it.co.nz/mahara/
htdocs/view/blocks.php?id=9
  * call_static_method("PluginBlocktypeImage", "render_instance", object(BlockInstance), true) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:715, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
  * BlockInstance->render_editing(false, false, true) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:641, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
  * BlockInstance->instance_config_store(object(Pieform), array(size 12)) at Unknown:0, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
  * call_user_func_array(array(size 2), array(size 2)) at /home/aaronw/www/mahara/htdocs/lib/pieforms/pieform.php:527, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
  * Pieform->__construct(array(size 15)) at /home/aaronw/www/mahara/htdocs/blocktype/lib.php:996, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
  * BlockInstance->build_configure_form() at /home/aaronw/www/mahara/htdocs/view/blocks.php:72, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9
, referer: http://vegas.wgtn.cat-it.co.nz/mahara/htdocs/view/blocks.php?id=9

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Using git bisect, I determined the problem was this commit:

commit f95dc9b44c897bfa113b6b551a36687691e3ec1f
Author: Robert Lyon <email address hidden>
Date: Thu Aug 14 15:23:35 2014 +1200

    Changing the image block to show hide comments (Bug #1037531)

    - similar to the changes done for textbox

    Change-Id: I7419a50b6790d11ee5e4d48b2d1bbd2b134f2126
    Signed-off-by: Robert Lyon <email address hidden>

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

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

Reviewed: https://reviews.mahara.org/4256
Committed: http://gitorious.org/mahara/mahara/commit/561fb82f457baa25cc1d62aff058f919289218a9
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 561fb82f457baa25cc1d62aff058f919289218a9
Author: Aaron Wells <email address hidden>
Date: Mon Feb 9 11:07:59 2015 +1300

Fix ArtefactTypeMismatchException when putting a profile icon in an image block

Bug 1419539

Change-Id: Id0ce0e028a504b5284e13a2f01e71e7ca1f07c1d

Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
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.