** Changed in: mahara/15.10 Milestone: 15.10.1 => 15.10.2 -- 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp