Error Pages in General Topic is solved

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
chadduck
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Jan 10, 2020 2:58 pm

Error Pages in General

Post by chadduck » Thu May 02, 2024 4:17 pm

Well after some struggles, I finally have a working 404 error page in Joomla 4. It took some research and some combining of tutorials and Joomla documentation BUT it is accomplished.

As I was looking at the <domain>/errors directory I am wondering if I need to create/convert these remaining files for Joomla 4/5
401 (Unauthorized Access),
403 (Forbidden Access),
and 500 (Internal Server Error)

Is there any real reason to do so?

Having figured out the 404 I don't "think" it should be that difficult if needed.

Any insight/recommendations are welcome.

BJ

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9874
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Error Pages in General

Post by AMurray » Thu May 02, 2024 9:53 pm

Even if you don't have any of those, you will receive Apache's standard 40x or 50x server error messages (usually plain black text on a white screen).

What files are in your "errors directory" that you mention? Is that where your web host has ready-made custom error document files? If so I don't think there's any need to create them in Joomla. Just use the ones that are already provided.

If you want to customise them you can do so external to Joomla. Design the pages (use Notepad++ to create basic HTML pages) for each of the 40x or 50x error pages you need. Reference them in your .htaccess file like

Code: Select all

ErrorDocument 404 /errors/not_found.html
ErrorDocument 500 / errors/server_error.html
(for each of the required 40x or 500x errors you need an error page).

If you search the web for "server error templates" you might find some HTML templates to get you started. Again, this would be outside of Joomla, so you would be raw-coding. I also expect your web host would have documentation on how to create custom HTTP error messages

Ultimately, of course, the aim is never to need any of those error pages and always have a smoothly operating website. :)
Regards - A Murray
General Support Moderator

chadduck
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Jan 10, 2020 2:58 pm

Re: Error Pages in General

Post by chadduck » Fri May 03, 2024 12:46 am

AMurray wrote:
Thu May 02, 2024 9:53 pm
What files are in your "errors directory" that you mention?

Design the pages (use Notepad++ to create basic HTML pages) for each of the 40x or 50x error pages you need.
Mr Murray

Thank you for your response. Regarding the questions that you asked...

The error directory DOES already contains my customized pages that I identified. I was just curious if it was desirable to have them coded as a internal Joomla page.

Based upon you answer - I guess it is either not a necessity nor needed.

Thank you again.

BJ

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9874
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Error Pages in General

Post by AMurray » Fri May 03, 2024 9:54 am

In closing, in my own experience, I've only tried to create the 404 Error page in Joomla itself (as that ist he one that was documented at the time).

It may be possible to do the other error page types, but I have never tried it.

If you already have external error pages that you can reference with ErrorDOcument directives in your .htaccess, I would say stick with that method.
Regards - A Murray
General Support Moderator

chadduck
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Jan 10, 2020 2:58 pm

Re: Error Pages in General

Post by chadduck » Fri May 03, 2024 2:08 pm

AMurray wrote:
Fri May 03, 2024 9:54 am
If you already have external error pages that you can reference with ErrorDOcument directives in your .htaccess, I would say stick with that method.
THANK YOU again...

BJ


Post Reply

Return to “General Questions/New to Joomla! 4.x”