Comment 0 for bug 1891425

Revision history for this message
Lisa Seeto (lisaseeto) wrote :

It is possible to set a configurable theme for an institution that will itself have a default configuration of pre-set colours. It is possible to configure a new theme, save it and then to edit the theme values and select "Reset" to return to the default pre-set theme values. Currently, a warning is being produced and Mahara is losing its styling.

To reproduce:
1. Have an institution and log in with an admin member
2. Edit the institution settings and select "Configurable Theme" from the Theme drop-down
3. Set the theme values to any other colour via colour picker or hex value, save
4. The site should update with the newly configured theme, select to edit the institution again
5. return to the Theme settings and set "Reset colours" to "yes", save the page.
Expected result:
The theme is returned to the default configurable theme configuration
Actual result:
All Mahara styling is lost, a warning is produced:

Institution updated successfully. Others will see the new theme the next time they log in.
[WAR] 72 (lib/web.php:90) array_merge(): Argument #2 is not an array
Call stack (most recent first):

    log_message("array_merge(): Argument #2 is not an array", 8, true, true, "/home/lisaseeto/code/mahara-test/htdocs/lib/web.ph...", 90) at /home/lisaseeto/code/mahara-test/htdocs/lib/errors.php:521
    error(2, "array_merge(): Argument #2 is not an array", "/home/lisaseeto/code/mahara-test/htdocs/lib/web.ph...", 90, array(size 11)) at Unknown:0
    array_merge(array(size 2), null) at /home/lisaseeto/code/mahara-test/htdocs/lib/web.php:90
    get_stylesheets_for_current_page(array(size 2), array(size 0)) at /home/lisaseeto/code/mahara-test/htdocs/lib/web.php:646
    smarty(array(size 2)) at /home/lisaseeto/code/mahara-test/htdocs/admin/users/institutions.php:716