"Add me as friend" results in error message

Bug #1089136 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Jono M

Bug Description

Reproduced on demo.mahara.org (1.6 stable)

When you have
- your friend settings set to "New friends are automatically authorised" and
- the "Friends" block on your profile page and
- made your profile page public and
- do not yet any friends and
- a person who is not logged in views your profile page,

they see the "Add me to your friends" button. When they click on it, the generic Mahara error message

"Mahara: Site unavailable
A nonrecoverable error occurred. This probably means you have encountered a bug in the system"

comes up instead of logging you in and adding you to the list of friends of that user.

Revision history for this message
Jono M (jonom) wrote :

This still happens in latest 1.9 master. The stack trace is:

[WAR] c3 (lib/user.php:1672) profile_url called with no user id

    profile_url(object(LiveUser), false) at /home/jonom/Catalyst/mahara/htdocs/lib/user.php:2099
    addfriend_submit(object(Pieform), array(size 3)) at Unknown:0
    call_user_func_array("addfriend_submit", array(size 2)) at /home/jonom/Catalyst/mahara/htdocs/lib/pieforms/pieform.php:520
    Pieform->__construct(array(size 5)) at /home/jonom/Catalyst/mahara/htdocs/lib/pieforms/pieform.php:162
    Pieform::process(array(size 5)) at /home/jonom/Catalyst/mahara/htdocs/lib/pieforms/pieform.php:71
    pieform(array(size 5)) at /home/jonom/Catalyst/mahara/htdocs/blocktype/myfriends/lib.php:123
    PluginBlocktypeMyfriends::render_instance(object(BlockInstance)) at Unknown:0
    call_user_func_array(array(size 2), array(size 1)) at /home/jonom/Catalyst/mahara/htdocs/lib/mahara.php:1551
    call_static_method("PluginBlocktypeMyfriends", "render_instance", object(BlockInstance)) at /home/jonom/Catalyst/mahara/htdocs/blocktype/lib.php:763
    BlockInstance->render_viewing() at /home/jonom/Catalyst/mahara/htdocs/lib/view.php:2007
    View->build_column(1, 2, false) at /home/jonom/Catalyst/mahara/htdocs/lib/view.php:1964
    View->build_columns(1, false) at /home/jonom/Catalyst/mahara/htdocs/lib/view.php:1949
    View->build_rows() at /home/jonom/Catalyst/mahara/htdocs/user/view.php:93

Changed in mahara:
status: New → Confirmed
Jono M (jonom)
Changed in mahara:
importance: Undecided → Medium
assignee: nobody → Jono Mingard (mingard)
status: Confirmed → In Progress
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/3029

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

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

commit e32a8f41be5cbabf0f5b905448c52cfd1577369a
Author: Jono Mingard <email address hidden>
Date: Thu Feb 20 13:58:45 2014 +1300

Only show "Add friend" button to logged in users (Bug #1089136)

Change-Id: I0b442c189ccc6c34791aacd412e0fb05675567b7
Signed-off-by: Jono Mingard <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 1.9.0
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.