settings page error Undefined index: licensedefault

Bug #1296915 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon

Bug Description

This is a regression.

The fix for: https://bugs.launchpad.net/mahara/+bug/1251089 has created a new bug where if the site does NOT have License metadata config option set it throws an error:

[WAR] ce (account/index.php:103) Undefined index: licensedefault
Call stack (most recent first):

    log_message("Undefined index: licensedefault", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:433
    error(8, "Undefined index: licensedefault", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103, array(size 55)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/account/index.php:103

[WAR] ce (account/index.php:103) Undefined index: licensedefault
Call stack (most recent first):

    log_message("Undefined index: licensedefault", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:433
    error(8, "Undefined index: licensedefault", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103, array(size 55)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/account/index.php:103

[WAR] ce (account/index.php:103) array_keys() expects parameter 1 to be array, null given
Call stack (most recent first):

    log_message("array_keys() expects parameter 1 to be array, null...", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:433
    error(2, "array_keys() expects parameter 1 to be array, null...", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103, array(size 55)) at Unknown:0
    array_keys(null) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/account/index.php:103

[WAR] ce (account/index.php:103) array_search() expects parameter 2 to be array, null given
Call stack (most recent first):

    log_message("array_search() expects parameter 2 to be array, nu...", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:433
    error(2, "array_search() expects parameter 2 to be array, nu...", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 103, array(size 55)) at Unknown:0
    array_search(null, null) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/account/index.php:103

Tags: regression
Revision history for this message
Aaron Wells (u-aaronw) wrote :

I found that reverting the patch https://reviews.mahara.org/#/c/2893/ from the original bug 1251089 both fixes this problem, *and* the problem originally described in bug 1251089 can also not be replicated after reverting.

So I've pushed a new gerrit patch to simply revert patch 2893. Here's the URL: https://reviews.mahara.org/#/c/3117/

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

Revision history for this message
Mahara Bot (dev-mahara) wrote :

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

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3119
Committed: http://gitorious.org/mahara/mahara/commit/c727285dccb217603228dab794404133cd07461f
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit c727285dccb217603228dab794404133cd07461f
Author: Son Nguyen <email address hidden>
Date: Thu Mar 27 09:57:42 2014 +1300

Fix the licendefault's value when creating a new account (Bug 1251098)

see also bug 1296915

Change-Id: I8a72beb37a23584f93e0e654df7e95c0f9e6311c
Signed-off-by: Son Nguyen <email address hidden>

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

Reviewed: https://reviews.mahara.org/3117
Committed: http://gitorious.org/mahara/mahara/commit/274bc0ebcef132fe61919aa11e5a483aadf43755
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 274bc0ebcef132fe61919aa11e5a483aadf43755
Author: Aaron Wells <email address hidden>
Date: Tue Mar 25 16:43:17 2014 +1300

Revert "Correcting licensedefault's default value for 'no institution'"

This patch caused a regression. See Bug 1296915

This reverts commit 9d491d4afedf5385f14dc0b9bcbc98daa5e985f8.

Change-Id: I819066517ad3c1b4205c6b9a36b18530b3a2fb70

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3120
Committed: http://gitorious.org/mahara/mahara/commit/7a79c29c187157c09ada04c8b27895c621e2ed1e
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 7a79c29c187157c09ada04c8b27895c621e2ed1e
Author: Robert Lyon <email address hidden>
Date: Thu Mar 27 13:19:07 2014 +1300

Cleaning up bad data created by problem with user csv upload

Bug 1296915

Change-Id: I572e066162e6b26630c887a66400098d90638122
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 "master" branch: https://reviews.mahara.org/3136

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

Reviewed: https://reviews.mahara.org/3136
Committed: http://gitorious.org/mahara/mahara/commit/467ca4361adde69276f63b527a57a73e68a0b748
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 467ca4361adde69276f63b527a57a73e68a0b748
Author: Robert Lyon <email address hidden>
Date: Mon Mar 31 07:30:58 2014 +1300

Fixing usr_account_preference bad data cleanup sql call (Bug #1296915)

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

Robert Lyon (robertl-9)
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.