Forums / General / Forums - Edit Button Problem
John Smith
Monday 26 February 2007 3:47:08 am
Hi there,
I am using ez3.6.1 and desperately looking for a fix related to caching of forum edit button.
The Problem is:
User A creates a new forum topic and sees the "Edit" button in the full view of that topic, which allows him to edit his post. fine.
User A logs out, user B logs in. Although he is not allowed to edit A's post, he see the "edit" button, when he views the forum thread.
When he presses the button, he gets the "Access dienied" page, which is fine.
Ez claims to have fixed the bug so many times but can't find the fix.
Please help.
Cheers.
Smith
Claudia Kosny
Monday 26 February 2007 4:47:04 am
Hi John
The latest news I heard about this was that there was no good fix available. The reason for this problem is that the views are cached based on the role, not on the single user. So if user A and user B share the same role, they will see the same view. If you would cache by user this would be solved, but you would have quite a lot of cache files.
Check also here: http://ez.no/community/forum/general/do_you_see_the_edit_button/re_do_you_see_the_edit_button__10and the bug report in the last post in this thread.
Claudia
Monday 26 February 2007 4:57:16 am
Hi Claudia,
Thanks for your kind help. Would it be possible for you to help me in writting the template code for caching by user please.
Xavier Dutoit
Monday 26 February 2007 5:48:38 am
And don't forget to disable the cache view on the template level (TTL=0)
Otherwise, might be easier to have a bit of javascript that hides the buttons when current user != owner than doing that on the server.
X+
P.S. The problem is still present on the forums on ez too,
http://www.sydesy.com
Monday 26 February 2007 5:56:26 am
hi there,
I am using the code in the template named as /design/news/templates/full/forum_topic.tpl
{set-block scope=root variable=cache_ttl}0{/set-block}{cache-block keys=array($uri_string,$current_user.contentobject_id)}
... tpl code
{/cache-block}
It is not doing anything.
Moreover i am not too good at javascript, can you please help me in that.
Cheers