J4.x

FatalError: Difference between revisions

From Joomla! Documentation

Wilsonge (talk | contribs)
Initial placeholder
 
m More white space
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{review|copyedit|This page needs to be expanded to cover how to uncover the underlying error easier and also potential resolutions.}}
<noinclude><languages /></noinclude>
{{incomplete}}
<translate>== Introduction == <!--T:1--></translate>
<translate><!--T:2--> From time to time Joomla may display an error page instead of the page you were expecting. There are two types of error pages:</translate>
* <translate><!--T:3--> The system error page has a red background. It is invoked if there is a serious error before the site or administrator template is rendered. </translate>
* <translate><!--T:4--> The template error page looks like the normal site or administrator template but the content area is replaced with an error message. This is invoked when the error occurs in content code.</translate>


[[File:Joomla-j4-fatal.png|thumb]]
<translate>
=== System Error Page === <!--T:5--></translate>


You're likely reading this because your Joomla site has had some sort of fatal error and given you a message similar to the above.
[[File:Joomla-j4-fatal.png|border|800px]]


There are two likely reason for this:
<translate>
* A system plugin is causing failures on your site
=== Template Error Page === <!--T:6--></translate>
* A change has been made to your host (e.g. a PHP version upgrade that isn't compatible with an extension or Joomla itself if you are running an old version)


== How to resolve ==
[[File:j4x-template-error.png|border|800px]]
If you've made any recent changes to your system plugins disable the system plugins one by one in the database until you find which one is responsible (remember you should not need to disable any core Joomla system plugins).
 
<translate>
== How to Resolve == <!--T:7--></translate>
 
<translate><!--T:8--> There are a number of possible reasons for fatal errors to occur. Here are just a few:</translate>
* <translate><!--T:9--> A change in your host, for example an updated PHP version that is not compatible with Joomla or one of your Extensions.</translate>
* <translate><!--T:10--> A problem with disk space, memory usage or script time-out.</translate>
* <translate><!--T:11--> A newly installed or enabled Extension that is not compatible with Joomla. A bad plugin may disable Administrator login!</translate>
 
<translate>
=== Enable Debug === <!--T:12--></translate>
 
<translate><!--T:13--> If your Administrator interface '''is''' still working go to {{rarr|Home Dashboard,System panel,Global Configuration}}. In the System tab set ''Debug System'' to ''Yes'' and in the Server tab set ''Error Reporting'' to ''Maximum''. Then ''Save & Close''.</translate>
 
<translate><!--T:14-->
If your Administrator interface is '''not''' working, edit the ''configuration.php'' file in the root folder of your Joomla website.
# Change the permissions from ''444'' or ''-r--r--r--'' (no one has permission to write to the file) to ''644'' or ''-rw-r--r--'' (only the Owner has permission to write).
# Inside the file, set ''$debug'' to ''true'' and ''$error_reporting'' to ''maximum''.
# ''Save'' the file.</translate>
 
<translate><!--T:15--> With the changes made, reload the page that was causing the error. Now you should see a stack trace. Example:</translate>
 
[[File:j4x-template-error-stack-trace.png|border|800px]]
 
<translate><!--T:16--> The first item in the stack trace indicates where the error was triggered. Sometimes that is enough to identify the faulty Extension. Sometimes the faulty Extension is farther down the stack trace. It may not mean much to you but the stack trace is invaluable to the experts who answer questions in the Joomla Forums.</translate>
 
<translate><!--T:17--> If you can identify the faulty Extension, disable it. You can do that using the Administrator interface if it is working. Otherwise, use phpMyAdmin to find the Extension in the ''#__extensions'' database table and set its ''enabled'' value to ''0''. You should not need to disable any core Joomla Extensions.</translate>
 
<translate>
== Forum Post Assistant == <!--T:18--></translate>
 
<translate><!--T:19--> To help resolve problems you should download the [https://forumpostassistant.github.io/docs/ Forum Post Assistant] (FPA) and load it in the root of your Joomla website. The link to find it is also near the top of each Joomla Forum page. The FPA is a stand-alone PHP script that analyses your Joomla installation and tells you what might be wrong. Again, it might not mean much to you but the experts who answer questions in the Forums may ask to see it.</translate>
 
<translate>
== Cleaning Up == <!--T:20--></translate>
 
<translate><!--T:21-->
When your problem is resolved:
# Go to {{rarr|Administrator,Dashboard,System panel,Global Configuration}}
# Select the System tab and set ''Debug System'' to ''No''.
# Select the Server tab and set ''Error Reporting'' to ''System Default''.
# ''Save & Close''.
# Remove the Forum Post Assistant.</translate>
 
{{warning|<translate><!--T:22--> Do not forget to set the ''configuration.php'' file back to read-only (444 or ''r--r--r--''). That is an important part of the Joomla! security concept. All you need to do is load and save the Global Configuration form. Joomla will reset the permissions to ''444''. </translate>}}

Latest revision as of 08:40, 13 March 2023

Introduction

From time to time Joomla may display an error page instead of the page you were expecting. There are two types of error pages:

  • The system error page has a red background. It is invoked if there is a serious error before the site or administrator template is rendered.
  • The template error page looks like the normal site or administrator template but the content area is replaced with an error message. This is invoked when the error occurs in content code.

System Error Page

Template Error Page

How to Resolve

There are a number of possible reasons for fatal errors to occur. Here are just a few:

  • A change in your host, for example an updated PHP version that is not compatible with Joomla or one of your Extensions.
  • A problem with disk space, memory usage or script time-out.
  • A newly installed or enabled Extension that is not compatible with Joomla. A bad plugin may disable Administrator login!

Enable Debug

If your Administrator interface is still working go to Home Dashboard  System panel  Global Configuration. In the System tab set Debug System to Yes and in the Server tab set Error Reporting to Maximum. Then Save & Close.

If your Administrator interface is not working, edit the configuration.php file in the root folder of your Joomla website.

  1. Change the permissions from 444 or -r--r--r-- (no one has permission to write to the file) to 644 or -rw-r--r-- (only the Owner has permission to write).
  2. Inside the file, set $debug to true and $error_reporting to maximum.
  3. Save the file.

With the changes made, reload the page that was causing the error. Now you should see a stack trace. Example:

The first item in the stack trace indicates where the error was triggered. Sometimes that is enough to identify the faulty Extension. Sometimes the faulty Extension is farther down the stack trace. It may not mean much to you but the stack trace is invaluable to the experts who answer questions in the Joomla Forums.

If you can identify the faulty Extension, disable it. You can do that using the Administrator interface if it is working. Otherwise, use phpMyAdmin to find the Extension in the #__extensions database table and set its enabled value to 0. You should not need to disable any core Joomla Extensions.

Forum Post Assistant

To help resolve problems you should download the Forum Post Assistant (FPA) and load it in the root of your Joomla website. The link to find it is also near the top of each Joomla Forum page. The FPA is a stand-alone PHP script that analyses your Joomla installation and tells you what might be wrong. Again, it might not mean much to you but the experts who answer questions in the Forums may ask to see it.

Cleaning Up

When your problem is resolved:

  1. Go to Administrator  Dashboard  System panel  Global Configuration
  2. Select the System tab and set Debug System to No.
  3. Select the Server tab and set Error Reporting to System Default.
  4. Save & Close.
  5. Remove the Forum Post Assistant.
Warning!

Do not forget to set the configuration.php file back to read-only (444 or r--r--r--). That is an important part of the Joomla! security concept. All you need to do is load and save the Global Configuration form. Joomla will reset the permissions to 444.