public group and allow submissions problem

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

Bug Description

When making public a group that has Allow submissions also ticked we get this error:

[WAR] b7 (lib/user.php:1678) profile_url called with no user id
Call stack (most recent first):

    profile_url(object(stdClass), false) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/view.php:4602
    View->get_url(false) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/view.php:4272
    View::get_extra_view_info(array(size 1), false, false) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/view.php:4863
    View::get_views_and_collections(0) at /home/robertl/htdocs/mahara-testing/mahara/htdocs/lib/group.php:1272
    group_view_submission_form("1") at /home/robertl/htdocs/mahara-testing/mahara/htdocs/blocktype/groupviews/lib.php:162
    PluginBlocktypeGroupViews::get_data("1") at /home/robertl/htdocs/mahara-testing/mahara/htdocs/blocktype/groupviews/lib.php:56
    PluginBlocktypeGroupViews::render_instance(object(BlockInstance)) at Unknown:0

The problem stems from an anonymous user viewing the public group being assigned the same id, which is zero, as the structural dummy user. That dummy user has a default 'profile' page and this is causing the problems.

Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
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/3268

Revision history for this message
Robert Lyon (robertl-9) wrote :
Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

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

commit 362aaae779d8b50906d4fee13e9406c48341231e
Author: Robert Lyon <email address hidden>
Date: Tue Apr 22 07:43:34 2014 +1200

Public group with allow submissions ticked causes error (Bug #1310761)

This is due to the dummy 'root' user having the same id, which is 0, as
an anonymous user.

Needed to not include the dummy 'root' profile page in the get views
and collections db call.

Change-Id: Id349bdb193e510df5ecbc6f76a6324dbc15a2a57
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
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "1.9_STABLE" branch: https://reviews.mahara.org/3310

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

Reviewed: https://reviews.mahara.org/3310
Committed: http://gitorious.org/mahara/mahara/commit/2e5cbc14af9c87aa8cd45715b90a446eb7e2b714
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.9_STABLE

commit 2e5cbc14af9c87aa8cd45715b90a446eb7e2b714
Author: Robert Lyon <email address hidden>
Date: Tue Apr 22 07:43:34 2014 +1200

Public group with allow submissions ticked causes error (Bug #1310761)

This is due to the dummy 'root' user having the same id, which is 0, as
an anonymous user.

Needed to not include the dummy 'root' profile page in the get views
and collections db call.

Change-Id: Id349bdb193e510df5ecbc6f76a6324dbc15a2a57
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 "1.8_STABLE" branch: https://reviews.mahara.org/3311

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

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

commit ed042e1da57d64aea329b814ac15d54eb8c4a53b
Author: Robert Lyon <email address hidden>
Date: Tue Apr 22 07:43:34 2014 +1200

Public group with allow submissions ticked causes error (Bug #1310761)

This is due to the dummy 'root' user having the same id, which is 0, as
an anonymous user.

Needed to not include the dummy 'root' profile page in the get views
and collections db call.

Change-Id: Id349bdb193e510df5ecbc6f76a6324dbc15a2a57
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 "1.7_STABLE" branch: https://reviews.mahara.org/3312

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

Reviewed: https://reviews.mahara.org/3312
Committed: http://gitorious.org/mahara/mahara/commit/45f11f5bf2eee816eb896b37a6a3c965018c6e76
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.7_STABLE

commit 45f11f5bf2eee816eb896b37a6a3c965018c6e76
Author: Robert Lyon <email address hidden>
Date: Tue Apr 22 07:43:34 2014 +1200

Public group with allow submissions ticked causes error (Bug #1310761)

This is due to the dummy 'root' user having the same id, which is 0, as
an anonymous user.

Needed to not include the dummy 'root' profile page in the get views
and collections db call.

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

Aaron Wells (u-aaronw)
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.