"Add me as friend" results in error message

Bug #1089136 reported by Kristina Hoeppner on 2012-12-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Jono Mingard

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.

Jono Mingard (mingard) 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 Mingard (mingard) on 2014-02-20
Changed in mahara:
importance: Undecided → Medium
assignee: nobody → Jono Mingard (mingard)
status: Confirmed → In Progress

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) on 2014-02-21
Changed in mahara:
milestone: none → 1.9.0
status: In Progress → Fix Committed
Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers