Error message when theme cannot be found

Bug #1487815 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Robert Lyon
15.10
Fix Released
Undecided
Unassigned

Bug Description

on master 15.10dev

To test:

1. Install Mahara 15.04
2. Change the site theme to a theme that is not "Raw" or "Default".
3. Upgrade the site to the latest master.

When logging back into the site, I get the following warning when I'm on "Configure site" -> "Site options":

[WAR] dd (lib/pieforms/pieform.php:1314) Invalid value for select "theme"
Call stack (most recent first):

    log_message("Invalid value for select "theme"", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/pieforms/pie...", 1314) at /home/kristina/code/mahara/htdocs/lib/errors.php:441
    error(1024, "Invalid value for select "theme"", "/home/kristina/code/mahara/htdocs/lib/pieforms/pie...", 1314, array(size 2)) at Unknown:0
    trigger_error("Invalid value for select "theme"", 1024) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:1314
    Pieform::info("Invalid value for select "theme"") at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform/elements/select.php:143
    pieform_element_select(object(Pieform), array(size 13)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:1480
    Pieform->build_element_html(array(size 13)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:709
    Pieform->build() at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:169
    Pieform::process(array(size 7)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 7)) at /home/kristina/code/mahara/htdocs/admin/site/options.php:774

The old theme cannot be found (correct), but also the value can't be found.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5166

Revision history for this message
Robert Lyon (robertl-9) wrote :

I've added a patch that sets the theme to raw on site -> options page if the current theme is missing and alerts the user to the change.

Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
status: Confirmed → In Progress
Aaron Wells (u-aaronw)
Changed in mahara:
importance: High → Low
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5166
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/f62cafd8da4cf4c1512c966dd9f6fbb54cc898e5
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit f62cafd8da4cf4c1512c966dd9f6fbb54cc898e5
Author: Robert Lyon <email address hidden>
Date: Tue Oct 20 13:53:45 2015 +1300

Bug 1487815: Dealing with missing theme select box error

On site config page after upgrade some themes will not exist anymore
so we need to reset the theme to the default theme whatever that is
and alert the user about this.

We also need to set institution theme to sitedefault if their set theme
has gone.

behatnotneeded

Change-Id: I9459a920f1d870b71a9a0d48cc0ed39761152143
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.10_STABLE" branch: https://reviews.mahara.org/5587

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5587
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/12660c46256cb2964c35a0740bf6f8c815624f0c
Submitter: Son Nguyen (<email address hidden>)
Branch: 15.10_STABLE

commit 12660c46256cb2964c35a0740bf6f8c815624f0c
Author: Robert Lyon <email address hidden>
Date: Tue Oct 20 13:53:45 2015 +1300

Bug 1487815: Dealing with missing theme select box error

On site config page after upgrade some themes will not exist anymore
so we need to reset the theme to the default theme whatever that is
and alert the user about this.

We also need to set institution theme to sitedefault if their set theme
has gone.

behatnotneeded

Change-Id: I9459a920f1d870b71a9a0d48cc0ed39761152143
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit f62cafd8da4cf4c1512c966dd9f6fbb54cc898e5)

Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.