mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #31094
[Bug 1514641] Re: Blocktype rendering error when artefact is not found
Hi Ghada,
Do you have any instructions on how to replicate this error? I tried
putting an image in an image block and then deleting the image, but it
seems like that particular use case successfully unsets the block
instance so this error doesn't happen.
Cheers,
Aaron
** Also affects: mahara/16.04
Importance: Undecided
Status: New
** Also affects: mahara/15.10
Importance: Undecided
Status: New
** Changed in: mahara/15.10
Status: New => Triaged
** Changed in: mahara/16.04
Status: New => Triaged
** Changed in: mahara/15.10
Milestone: None => 15.10.1
** Changed in: mahara/16.04
Milestone: None => 16.04.0
--
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/1514641
Title:
Blocktype rendering error when artefact is not found
Status in Mahara:
Triaged
Status in Mahara 15.10 series:
Triaged
Status in Mahara 16.04 series:
Triaged
Bug description:
Mahara 15.10:
version = 2015092910
release = 15.10.0
If an artefact is not found while rending a block instance, the try/catch catches the error - which is good.
But, further down the page when it sets pieformcss => $css (on line
916):
return array('html' =>
$smarty->fetch('view/blocktypecontainerediting.tpl'), 'javascript' =>
$js, 'pieformcss' => $css);
the variable $css has not been declared - giving this error:
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] [WAR] 63 (blocktype/lib.php:913) Undefined variable: css, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] Call stack (most recent first):, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] * log_message("Undefined variable: css", 8, true, true, "/var/www/acttqi/mahara/htdocs/blocktype/lib.php", 913) at /var/www/acttqi/mahara/htdocs/lib/errors.php:441, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] * error(8, "Undefined variable: css", "/var/www/acttqi/mahara/htdocs/blocktype/lib.php", 913, array(size 14)) at /var/www/acttqi/mahara/htdocs/blocktype/lib.php:913, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] * BlockInstance->render_editing() at /var/www/acttqi/mahara/htdocs/lib/view.php:2082, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] * View->build_column(1, 3, true, false) at /var/www/acttqi/mahara/htdocs/lib/view.php:2043, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] * View->build_columns(1, true, false) at /var/www/acttqi/mahara/htdocs/lib/view.php:2028, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] * View->build_rows(true) at /var/www/acttqi/mahara/htdocs/view/blocks.php:191, referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
[Tue Nov 10 11:47:20 2015] [error] [client 192.168.124.138] , referer: http://d.acttqi.mahara/view/blocks.php?id=2149&
So, before calling the static methods (on lines 822+), we should instantiate the $css variable first.
So when it does fail, $css has already been defined.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1514641/+subscriptions
References