Forums / Setup & design / [FIXED] Forum Bug on my eZ 3.9.1
Lukasz Piech
Friday 10 August 2007 6:48:23 am
Hi,
When the logged in user would like to create a forum topic or forum reply all is OK.
But when you first click on create a forum topic or reply and then login (as it forces you to log in - only members can post on forum on my site) , after loggin in it gives you:
Object is unavailable The object you requested is not currently available. Possible reasons for this are: The id or name of the object was misspelled, try changing it. The object is no longer available on the site.
The page redirects to a wrong URL as it goes to http://mysite/index.php/intranet/content/action
When you clear Cookies and reopen IE and log in first and only then try to create a forum reply all is OK.
Has anyone experienced that before??
Lukasz
Greg McAvoy-Jensen
Friday 10 August 2007 7:40:10 am
I wonder if it's related to the bug I posted last night: http://issues.ez.no/IssueView.php?Id=11249&activeItem=1.
Granite Horizon, Certified Developer of eZ Publish Web Solutions Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg Blog: http://granitehorizon.com/blog
Saturday 11 August 2007 6:59:54 am
Dont think so. It also happens to any other class just noticed
Monday 13 August 2007 11:54:26 pm
It either looks like cache problem or some Apache setup. It never happened before though. Can anyone help?Lukasz
Bruce Morrison
Tuesday 14 August 2007 2:04:33 am
Hi Lukasz
Do you have a URL that we can look at? It might help. I will have a stab in the dark :)
It sounds like you have the create topic/reply buttons displayed even though the user is not able to create the content (not logged in and/or no permissions)
When the user clicks on one of these buttons they will get the "access denied" page with the login form. The login form remembers the previous url. In this case the previous url is /content/action (the url used for creating objects). So when the user successfully logs in they are redirected to the previous URL - /content/action but now the form POST variable are no longer present and the code doesn't know what action it should take and the error message is displayed.
Actually there is a similar issue on the eZ forums. (This <b>is</b> Gregs bug)
What I usually do is either disable the buttons or replace them with a message - "you must be logged in to post" if the current user is not logged in and/or doesn't have permissions to create a topic or reply.
Apologies to kracker for any long sentences ;)
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
Tuesday 14 August 2007 2:32:37 am
Hi This is exactly what is happening. Too bad I cannot give you the URL as this is on clients network will no external access.
Call me ignorant - how would I disable the buttons ONLY for users that are not logged in?
Tuesday 14 August 2007 5:39:48 am
This should do the trick:
{if $current_user.is_logged_in} {* buttons here *} {else} {* login link here *} {/if}
Tuesday 14 August 2007 6:28:10 am
OK Thanks
This worked
{let current_user=fetch('user','current_user')} {if $current_user.is_logged_in} {* buttons here *} {else} {* login link here *} {/if} {/let}
However this is just a workaround - this should not be like that I believe :)
Fabricio Guerrero
Friday 14 December 2007 1:08:34 am
I have a pretty similar problem but on 3.9.2
The idea is to allow Anonymous users to be able to comment on Forums and Blogs without having to login.. Which was doable on eZ 2.2 but can't get it to work on 3.9
I've even assigned complete access rights to Anonymous users and they still can't post replies nor comments on forums or blogs.
The {$node.object.can_create} comes back empty or in other words the template can't properly grab the Anonymous permissions.
Any clues to what I'm doing wrong?
Fabricio
http://www.solobromasychistes.com <<Joomla Site :P http://www.recipesforhealthyfood.com/ <<Drupal Site :P http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...