By LAC Webadmin on Thursday, 18 June 2015
Posted in Groups
Replies 5
Likes 0
Views 835
Votes 0
Hi There,

I just tried to enable a Groups Module in ES and when I click on Join Group button a popup appear with a message:

"Error: You are not allowed here."

Our ES setup is in Lock down mode. I am expecting the module to redirect me to the login page instead of telling me that I am not allowed here. That is rude! The groups that are showing up in the module are all open groups by the way.

Is there a work around to the Join Group link? What code do I have to change it to so it redirects me to login?

Thanks,

Jackson
Hello Jackson,

I am sorry for the delay of this reply.

The error is coming from the ajax function itself where it will check if easysocial is in lockdown mode, the error will be thrown. If you want to alter the behavior of the checking you can go to /administrator/components/com_easysocial/includes/ajax/ajax.php file and go to the line 283,
if( $config->get( 'general.site.lockdown.enabled' ) && !JFactory::getUser()->id )
{
if( method_exists( $obj , 'lockdown' ) && $obj->lockdown() )
{
$ajax->reject( JText::_( 'You are not allowed here.' ) );
return $ajax->send();
}
}


Hope these help.
·
Thursday, 18 June 2015 15:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

Thanks for the code but are you guys planning to update the core code in the later version? I don't want to modify my install code but I will have to keep track of it everytime I upgrade ES to the latest version.

I think the issue I mentioned here is a valid one. ES actions should always check the configuration settings for lockdown mode.

Thank you,

Jackson
·
Friday, 19 June 2015 00:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jackson,

Thank you for your valuable input. I will inform our developers for the improvement of this feature during the lockdown mode. In the meantime I've made a quick modification so that when user try to click on the join group button during lockdown mode, they will be redirected to the login page instead. Download the attachment below and place it inside your /modules/mod_easysocial_groups/tmpl/ folder.

Hope these help.
·
Friday, 19 June 2015 15:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

Thanks for the patch but I guess the module action design needs to go back to the drawing board In my case the user will be redirected to the Dashboard after log in. With that action, users will feel lost and would ask now what happened? I clicked on Join Group but I was asked to login then I was redirected to the Dashboard but am I joined to the group? Or I'm lost? :P

I guess I will have to wait until you guys modify the behavior or ajax action checking on lockdown mode and redirecting properly. It's a bummer that I can't use it right now, it will be a good tool giving users an idea that they can join groups.

Thanks for your help,

Jackson
·
Saturday, 20 June 2015 06:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jackson,

I am sorry for the delay of this reply.

Thanks for the heads up. I will create a ticket for the developers to alter the redirection properly during lockdown mode.
·
Monday, 22 June 2015 12:03
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post