Can't edit pages if "Users can choose page themes" is enabled.

Bug #1591304 reported by Tony Box on 2016-06-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Unassigned
16.04
High
Unassigned
16.10
High
Unassigned

Bug Description

Updated from 15.04.5 to 16.04.2 and ran into this issue when editing any page:

[Fri Jun 10 10:57:51 2016] [error] [client ] [WAR] c3 (lib/view.php:5999) Undefined variable: view, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] Call stack (most recent first):, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] * log_message("Undefined variable: view", 8, true, true, "/var/www/html/mahara1604/lib/view.php", 5999) at /var/www/html/mahara1604/lib/errors.php:489, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] * error(8, "Undefined variable: view", "/var/www/html/mahara1604/lib/view.php", 5999, array(size 1)) at /var/www/html/mahara1604/lib/view.php:5999, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] * View->is_themeable() at /var/www/html/mahara1604/view/blocks.php:271, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] , referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] [WAR] c3 (lib/errors.php:508) An exception was thrown of class Error. , referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] [WAR] c3 (lib/errors.php:508) THIS IS BAD and should be changed to something extending MaharaException,, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] [WAR] c3 (lib/errors.php:508) unless the exception is from a third party library., referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] [WAR] c3 (lib/errors.php:508) Original trace follows, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] [WAR] c3 (lib/view.php:5999) Call to a member function get() on null, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] Call stack (most recent first):, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] * View->is_themeable() at /var/www/html/mahara1604/view/blocks.php:271, referer: http://learningdev.campus.up.edu/mahara1604/view/index.php
[Fri Jun 10 10:57:51 2016] [error] [client ] , referer: http://learningdev.campus.up.edu/mahara1604/view/index.php

Before I got this error, I got a message about a user's theme not being available and it asked me to switch to a different one. After switching, this is the error that occurred. It seems to be happening on any page I try to edit and any new page I attempt to create.

Still need to confirm if it also affects 15.10.

Changed in mahara:
status: New → Confirmed
importance: Undecided → High

This error occurs when the option "Users can choose page themes" in Config site -> site options -> User settings is selected. It's fine when it is not selected.

Robert Lyon (robertl-9) on 2016-06-12
Changed in mahara:
status: Confirmed → In Progress

Reviewed: https://reviews.mahara.org/6595
Committed: https://git.mahara.org/mahara/mahara/commit/8203904b32a24e4eafca9ac9ebb5213607c0cd41
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 8203904b32a24e4eafca9ac9ebb5213607c0cd41
Author: Robert Lyon <email address hidden>
Date: Mon Jun 13 08:38:37 2016 +1200

Bug 1591304: Undefined $view in is_themeable()

Should be $this rather than $view as we are within a view object

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

Reviewed: https://reviews.mahara.org/6597
Committed: https://git.mahara.org/mahara/mahara/commit/e859baf0699804ef676165dd344040b461d68444
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit e859baf0699804ef676165dd344040b461d68444
Author: Robert Lyon <email address hidden>
Date: Mon Jun 13 08:38:37 2016 +1200

Bug 1591304: Undefined $view in is_themeable()

Should be $this rather than $view as we are within a view object

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

Aaron Wells (u-aaronw) on 2016-06-22
summary: - is_themeable function is breaking page editing
+ Can't edit pages if "Users can choose page themes" is enabled.
Robert Lyon (robertl-9) on 2016-10-21
Changed in mahara:
status: Fix Committed → Fix Released
Robert Lyon (robertl-9) on 2016-10-21
Changed in mahara:
milestone: 16.10.0 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers