Saving 'no institution' institution gives errors

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

Bug Description

There are errors for dropdownmenu and skins:

This is because the default institution has less values in it's config form

[WAR] 3a (admin/users/institutions.php:643) Undefined index: dropdownmenu
Call stack (most recent first):

    log_message("Undefined index: dropdownmenu", 8, true, true, "/home/robertl/htdocs/mahara-devel/mahara/htdocs/ad...", 643) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:430
    error(8, "Undefined index: dropdownmenu", "/home/robertl/htdocs/mahara-devel/mahara/htdocs/ad...", 643, array(size 11)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/admin/users/institutions.php:643
    institution_submit(object(Pieform), array(size 34)) at Unknown:0
    call_user_func_array("institution_submit", array(size 2)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:528
    Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:170
    Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 5)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/admin/users/institutions.php:517

[WAR] 3a (admin/users/institutions.php:644) Undefined index: skins
Call stack (most recent first):

    log_message("Undefined index: skins", 8, true, true, "/home/robertl/htdocs/mahara-devel/mahara/htdocs/ad...", 644) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/errors.php:430
    error(8, "Undefined index: skins", "/home/robertl/htdocs/mahara-devel/mahara/htdocs/ad...", 644, array(size 11)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/admin/users/institutions.php:644
    institution_submit(object(Pieform), array(size 34)) at Unknown:0
    call_user_func_array("institution_submit", array(size 2)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:528
    Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:170
    Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 5)) at /home/robertl/htdocs/mahara-devel/mahara/htdocs/admin/users/institutions.php:517

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

Reviewed: https://reviews.mahara.org/2697
Committed: http://gitorious.org/mahara/mahara/commit/94b2f372a203d577638f1de08fd9b913d334fada
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 94b2f372a203d577638f1de08fd9b913d334fada
Author: Robert Lyon <email address hidden>
Date: Tue Nov 12 11:36:39 2013 +1300

Checking if variables exist before trying access them (Bug #1250239)

The skins and dropdownmenu institution variables don't exist when
saving the config form for 'no institution' so we need to check they
exist.

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

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Robert Lyon (robertl-9) wrote :
Download full text (3.4 KiB)

If you have license metadata turned on and try to save the 'No Institution' institution you get these errors:

[WAR] b8 (admin/users/institutions.php:590) Undefined index: licensemandatory
Call stack (most recent first):

    log_message("Undefined index: licensemandatory", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 590) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
    error(8, "Undefined index: licensemandatory", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 590, array(size 3)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:590
    institution_validate(object(Pieform), array(size 35)) at Unknown:0
    call_user_func_array("institution_validate", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:1348
    Pieform->validate(array(size 35)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:506
    Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:170
    Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:522

[WAR] b8 (admin/users/institutions.php:682) Undefined index: licensemandatory
Call stack (most recent first):

    log_message("Undefined index: licensemandatory", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 682) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
    error(8, "Undefined index: licensemandatory", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 682, array(size 11)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:682
    institution_submit(object(Pieform), array(size 35)) at Unknown:0
    call_user_func_array("institution_submit", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:528
    Pieform->__construct(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:170
    Pieform::process(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 5)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:522

[WAR] b8 (admin/users/institutions.php:683) Undefined index: licensedefault
Call stack (most recent first):

    log_message("Undefined index: licensedefault", 8, true, true, "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 683) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/errors.php:430
    error(8, "Undefined index: licensedefault", "/home/robertl/htdocs/mahara-testing/mahara/htdocs/...", 683, array(size 11)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/admin/users/institutions.php:683
    institution_submit(object(Pieform), array(size 35)) at Unknown:0
    call_user_func_array("institution_submit", array(size 2)) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/pieforms/pieform.php:528
    Pieform->__construct(array(size 5)) at /h...

Read more...

Changed in mahara:
status: Fix Committed → In Progress
Revision history for this message
Robert Lyon (robertl-9) wrote :

Patch for the license metadata errors added
https://reviews.mahara.org/#/c/2711/

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

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

commit 012e0c910312ac9bd283542563209ec8daf925d4
Author: Robert Lyon <email address hidden>
Date: Mon Nov 18 12:03:50 2013 +1300

Saving 'no institution' institution gives license errors (bug #1250239)

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

Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2789
Committed: http://gitorious.org/mahara/mahara/commit/64345c65064b138f0995e127aee55a679c2bf4c1
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.8_STABLE

commit 64345c65064b138f0995e127aee55a679c2bf4c1
Author: Robert Lyon <email address hidden>
Date: Tue Nov 12 11:36:39 2013 +1300

Checking if variables exist before trying access them (Bug #1250239)

The skins and dropdownmenu institution variables don't exist when
saving the config form for 'no institution' so we need to check they
exist.

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

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

There were two patches posted to this bug. Here's a backport of the other one to 1.8: https://reviews.mahara.org/2823

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

Reviewed: https://reviews.mahara.org/2823
Committed: http://gitorious.org/mahara/mahara/commit/d18dea9346382b9faaa363fea2e71e7cc913dd62
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.8_STABLE

commit d18dea9346382b9faaa363fea2e71e7cc913dd62
Author: Robert Lyon <email address hidden>
Date: Mon Nov 18 12:03:50 2013 +1300

Saving 'no institution' institution gives license errors (bug #1250239)

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

Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Committed → Fix Released
Aaron Wells (u-aaronw)
Changed in mahara:
status: Fix Released → 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.