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
Using git bisect, I determined the problem was this commit:
commit f95dc9b44c897bf a113b6b551a3668 7691e3ec1f
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: I7419a50b6790d1 1ee5e4d48b2d1bb d2b134f2126
Signed-off-by: Robert Lyon <email address hidden>