By Julius de Kempenaer on Tuesday, 05 December 2017
Posted in Technical Issues
Replies 3
Likes 0
Views 549
Votes 0
I have a category on my forum which is restricted to specific user groups. When I provide the direct link to a user it leads to a 404 error if clicked when he is not logged in. If he is logged in the link works fine and points to the restricted area.
Is it possible to serve a login page if the user is not logged in? I think it is a bit more friendly and causes less confusion. Now people think that the link is wrong .....
Maybe make it generic. When people try to access a category for which they are not enabled show a login page with some message saying that they have no access to that area?
Hi Julius,

By right if you are using Joomla error it will shows as this: http://take.ms/93Q2e indicate that the user do not have permission to access the category. I believe your server has masked the exact error so, user did not get the exact error
However, if do you want change it to redirect to login, you can change the code in the file:
.../components/com_easydiscuss/views/categories/view.html.php LINE 119
from
return JError::raiseError(404, JText::_('COM_EASYDISCUSS_CATEGORY_NOT_ALLOWED'));

to
ED::getErrorRedirection(JText::_('COM_EASYDISCUSS_CATEGORY_NOT_ALLOWED'));
·
Tuesday, 05 December 2017 17:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hmmm, you're probably right. I believe that my 404 errors are caught by the template which could cause this to happen. Let me check this further. Thanks for quick reply.
·
Wednesday, 06 December 2017 18:14
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Julius

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.

Have a nice day ahead
·
Wednesday, 06 December 2017 18:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post