Показаны сообщения с ярлыком error. Показать все сообщения
Показаны сообщения с ярлыком error. Показать все сообщения

пятница, 8 сентября 2023 г.

How to setup your 404 error page in Joomla 3 and Joomla 4


For each error in Joomla CMS, a "Joomla error detail page" or "404 error page" is displayed.

When the "Show Errors" setting is turned off in "Joomla's Global Settings" → "Show Errors" and some error occurs or the user enters the wrong URL in the browser, the user will see a "404 error page".

More about: How to "turn on" or "turn off" the Error report in Joomla.


How to setup your Joomla 404 error page


1. With the help of FTP or cPanel or Joomla File mnager, go to {your-website}/templates/{your-template}/ and open file: error.php.

1.a If you don't have  error.php file, Please go to {your-website}/templates/system/ or {your-website}/templates/cassiopeia/ and copy error.php file from there to your template folder.


2. In error.php file, at the file begin after row:

defined('_JEXEC') or die;


add code:


 if (($this->error->getCode()) == '404') {

  header('Location: your-wedsite-URL');

  exit;

 }


where: {your-wedsite-URL}, any correct URL on your website which you need for show users when 404 error happened.


3. If you "website developer" and know PHP, you may change {your-website}/templates/{your-template}/error.php file exactly as you need for any errors types or set this page any design.


4. For Website developers: If your website - will have real error, and you will need to debug it. Please go to {your-website}/templates/{your-template}/error.php and remove code from for 404 error page redirect which you added at steps before.


More about Joomla Errors show settings:

How to setup your 404 error page in Joomla 3 and Joomla 4


вторник, 29 августа 2023 г.

How to "turn on" or "turn off" the Error report in Joomla


Read More


For each error, the Joomla CMS displays a Joomla error detail page or "404 error page".

But sometimes situations occur on the site that the Joomla developer did not foresee, and a lot of warnings and notifications appeared on your site.


How to "turn off" the Error report in Joomla

Please check: you can't fix real errors with this method - only to hide them. To hide all Errors, Warrings and Notices please:


 1. Go to Joomla Admin → System → Global Configuration.

 2. Tab "System" and turn off "Debug System".

3. Tab "Server" and set "Error Reporting" to "Default" or "None".



How to "turn on" the Error report in Joomla

To show all errors - you need to do the same as before, only vice versa.


 1. Go to Joomla Admin →  System → Global Configuration.

 2. Tab "System" and turn on "Debug System".

3. Tab "Server" and set "Error Reporting" to "Maximum" or "Development" (Joomla 3).




How to "turn on" the Error report in Joomla, for developers

If your site doesn't work correctly, but you don't see any errors and you "turn on" error report in Joomla global settings:


1. Check if you have error.php file on your template folder: {website}/templates/{your-template}/

2. Copy error.php file from {website}/templates/system/ to your template folder: {website}/templates/{yuor-template}/ 

3. Turn off Joomla cache. Go to Joomla Admin → System → Global Configuration → System, and turn off System Cache.

4. Turn off all joomla cache and optimization plugins. Go to Joomla Admin → System → Manage → Plugins. In Joomla 3 you need go to Joomla Admin → Extensions → Plugins


5. Clear all cache.

 - In Joomla 3: System → Clear Cache and System → Clear Expired Cache.

 - In Joomla 4: System → Maintenance → Clear Cache.

6. Turn off cache on your hosting and any optimization and speed up tools.

7. In Browser for refresh cache, please press: Ctrl + F5. 

In Browser (chrome), please press F12, select tab "Network" and there select "Disable cache" checkbox, reload page.

8. Reload your page.