Comment 0 for bug 1859118

Revision history for this message
Ghada El-Zoghbi (ghada-z) wrote : Gridstack Layout Converstion Error During New User Creation

Mahara: 19.10.1 (2019093009)
OS: Linux 18.04
DB: Postgres
Browser: FF

If an institution has pages to be copied to users upon creation and those pages are of the old format, an error is generated when trying to copy the page to the new user:

Jan 10 14:12:34 prod: 2020/01/10 14:12:34 [error] 227
#227: *389810 FastCGI sent in stderr: "PHP message: [WAR] 3e (lib/gridstacklayout.php:60) Undefined index: width
#012PHP message: Call stack (most recent first):
#012PHP message: * log_message(string(size 22), integer, true, true, string(size 37), integer) at /var/www/site/lib/errors.php:521
#012PHP message: * error(integer, string(size 22), string(size 37), integer, array(size 9)) at /var/www/site/lib/gridstacklayout.php:60
#012PHP message: * translate_to_new_layout(array(size 4)) at /var/www/site/lib/view.php:5929
#012PHP message: * View->copy_contents(object(View), array(size 0)) at /var/www/site/lib/view.php:458
#012PHP message: * View::create_from_template(array(size 5), string(size 5), string(size 5), false, false, array(size 0)) at /var/www/site/lib/collection.php:349
#012PHP message: * Collection::create_from_template(array(size 2), string(size 5), string(size 5), false) at /var/www/site/auth/user.php:1540
#012PHP message: * User->copy_collections(array(size 8), false) at /var/www/site/auth/user.php:1602
#012PHP message: * User->copy_institution_views_collections_to_new_member(string(size 16)) at /var/www/site/lib/institution.php:360
#012PHP message: * Institution->addUserAsMember(object(stdClass), null, null) at /var/www/site/lib/user.php:2622
#012PHP message: * create_user(object(stdClass), array(size 0), object(Institution), false, null, array(size 27)) at /var/www/site/admin/users/add.php:320
#012PHP message: * adduser_submit(object(Pieform), array(size 27)) at /var/www/site/lib/pieforms/pieform.php:546
#012PHP message: * Pieform->__construct(array(size 8)) at /var/www/site/lib/pieforms/pieform.php:168
#012PHP message: * Pieform::process(array(size 8)) at /var/www/site/lib/mahara.php:5432
#012PHP message: * pieform(array(size 8)) at /var/www/site/admin/users/add.php:156
#012PHP message:
#012PHP message: [WAR] 3e (lib/gridstacklayout.php:73) Undefined index: width
#012PHP message: Call stack (most recent first):
#012PHP message: * log_message(string(size 22), integer, true, true, string(size 37), integer) at /var/w

The issue is:

<b>(lib/gridstacklayout.php:60) Undefined index: width</b> <- translate_to_new_layout() doesn't find a relevant column in the row (i.e. that column is empty) and is trying to add the width of that column.