← Back to team overview

mahara-contributors team mailing list archive

[Bug 1514641] Re: Blocktype rendering error when artefact is not found

 

Hi Aaron,

We're upgrading a Mahara site from 1.10 to 15.10.

In 1.10, we are getting this:

Nov 10 12:25:28 TQIDEB001 mahara-site-acttqi: [Tue Nov 10 12:25:28 2015] [error] [client 203.29.131.142] [DBG] 43 (blocktype/lib.php:692) Artefact not found when rendering a block instance. There might be a bug with deleting artefacts of this type? Original error follows:, referer: https://uatmahara.tqi.act.edu.au/view/index.php
Nov 10 12:25:28 TQIDEB001 mahara-site-acttqi: [Tue Nov 10 12:25:28 2015] [error] [client 203.29.131.142] [DBG] 43 (blocktype/lib.php:693) Collection with id 1211 not found, referer: https://uatmahara.tqi.act.edu.au/view/index.php


The page was originally copied from institution pages/collection.

The institution pages and collection were then deleted.

I think that's probably when it started to happen but I'm not 100% sure.

I hope this helps.

Thanks,
Ghada

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