Anonymous author link not working

Bug #1499150 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon
15.10
Fix Released
Undecided
Unassigned

Bug Description

Now that we load some blocks via ajax the 'Allow anonymous pages' is not working right

When you are an admin and a user has made their page have anonymous author you see a link with ' (Author's name hidden) ' instead of name. On clicking that link it should show you the actual name, but it doesn't.

Things broken:

1) The js is not working for the ' (Author's name hidden) ' links when block loaded via ajax

2) The js is not working right if there are two blocks on a page showing pages with author = ' (Author's name hidden) ' as each one sets an id to use from a loop and so the id's are doubled.

The way this was implemented for the templates was a bit overblown.

Instead of trying to assign the index via the parent template then declare it in author.tpl and also include the author.js via the smarty, we can just do a js snippet in the author.tpl and call get_random_key() instead.

This way things are easier to understand and the js will function with ajax load

Tags: regression
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/5358

Revision history for this message
Robert Lyon (robertl-9) wrote :

To test,

1) Set up a site and have Administration -> site configs -> general settings -> allow anonymous pages turned on

2) As a normal user create a page and on the page description form page turn on the 'Anonymise' option

3) Share the page with others

4) Login as admin and the page should be in latest pages list follow page and add to watchlist - now back on dashboard page you should see the page with '(Author's name hidden)' link in both latest pages block and watchlist block

5) clicking the link should display the actual username for only the link you clicked and not the other one.

Test this also with making a group page

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

Reviewed: https://reviews.mahara.org/5358
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/fd621d412447d7d907f6dff655974ca9914e9c82
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit fd621d412447d7d907f6dff655974ca9914e9c82
Author: Robert Lyon <email address hidden>
Date: Thu Sep 24 15:26:40 2015 +1200

Bug 1499150: Allow anonymous author link to work via ajax

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

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