← Back to team overview

mahara-contributors team mailing list archive

[Bug 1891425] A change has been merged

 

Reviewed:  https://reviews.mahara.org/11138
Committed: https://git.mahara.org/mahara/mahara/commit/0a579a93c8db7602bf7effb17c7989dc67c2637d
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit 0a579a93c8db7602bf7effb17c7989dc67c2637d
Author: Lisa Seeto <lisaseeto@xxxxxxxxxxxxxxx>
Date:   Fri Aug 14 09:47:58 2020 +1200

Bug 1891425: Reset configurable theme to default causing warning and
loss of styles

- add check that $sheets can be set to additional_stylesheets before attempting
to merge into array
- fix reset to default config theme values issue

Change-Id: I11b4b3433b818f45958f69f45d8172c580073a53
Signed-off-by: Lisa Seeto <lisaseeto@xxxxxxxxxxxxxxx>

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

Title:
  Reset configurable theme to default causing warning and loss of styles

Status in Mahara:
  Fix Committed

Bug description:
  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 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

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1891425/+subscriptions


References