I am using joomla 3.x and have restricted access of some articles to certain user groups. When I am not logged in I get a really ugly message "You are not authorized to view this resource".

I would like that the user sees instead a custom message and a login screen, you know the basic "Thank you for your interest in …………… please register or login" message. Is it possible to change this in the code of joomla or is there even a addon which can do that?


1 Answer 1


From the Joomla! online documentation:

To override the system error results, copy the templates/system/error.php file into your templates/ directory. If it finds one, Joomla! will use the error.php file from the current template, in place of the system file. You can format the page, as desired, to match your template.

So add something like the following to your template's error.php:

<?php if ($this->error->code == '403') : ?>
    <div id="errorboxheader">Not Allowed</div>
        <div id="errorboxbody"><p>Sorry! You are not authorized to view this resource. Please login or register.</p>
        <!-- Copy the code of the login module here! -->
<?php endif; ?>
  • I tried this but it doesn't seem to work, is it maybe because my joomla front-end is using a german language extension?
    – elhombre
    May 20, 2013 at 12:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.