Get errors when creating a group with cleanurls turned on

Bug #1212863 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Low
Robert Lyon

Bug Description

When creating a new group I get the following errors:

[WAR] 2b (group/edit.php:473) Undefined index: urlid
Call stack (most recent first):

    log_message("Undefined index: urlid", 8, true, true, "/var/www/myportfolio-school2-design-mahara/release...", 473) at /var/www/myportfolio-school2-design-mahara/releases/20130815015155/htdocs/lib/errors.php:446
    error(8, "Undefined index: urlid", "/var/www/myportfolio-school2-design-mahara/release...", 473, array(size 6)) at /var/www/myportfolio-school2-design-mahara/releases/20130815015155/htdocs/group/edit.php:473
    editgroup_submit(object(Pieform), array(size 26)) at Unknown:0
    call_user_func_array("editgroup_submit", array(size 2)) at /var/www/myportfolio-school2-design-mahara/releases/20130815015155/htdocs/lib/pieforms/pieform.php:528
    Pieform->__construct(array(size 4)) at /var/www/myportfolio-school2-design-mahara/releases/20130815015155/htdocs/lib/pieforms/pieform.php:170
    Pieform::process(array(size 4)) at /var/www/myportfolio-school2-design-mahara/releases/20130815015155/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 4)) at /var/www/myportfolio-school2-design-mahara/releases/20130815015155/htdocs/group/edit.php:390

I also get: Group saved successfully

I can edit the group fine also.

To test:
Activate cleanurls and make a new Group

The problem stems from the fact on the initial save of a new group there is no id value set but the form field for urlid is not displayed until an id does exist.

Tags: groups
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/2399
Committed: http://gitorious.org/mahara/mahara/commit/7b3c69d192ae2762e97cd6f24ec594e3403d8408
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 7b3c69d192ae2762e97cd6f24ec594e3403d8408
Author: Aaron Wells <email address hidden>
Date: Mon Aug 12 17:33:11 2013 +1200

htdocs/group/edit.php: Squelch a cleanurls warning (bug 1211161)

- also bug 1212863

The code is designed to rely on the not set variable being automatically
converted to an empty string, but PHP throws a warning if you do that.

Change-Id: I40c2c7bd69939779bda68f4de4d47643f0212f42

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.