“0 Missing field in database: Joomla\CMS\Table\Extension extension_id” Error on Joomla Website

Note: This post partly assumes that your server is running WHM/cPanel. Solutions may differ if your server is running a different platform.

About a week ago, a client approached us and told us that they were having a problem on their corporate website, where they are seeing the following error:

0 Missing field in database: Joomla\CMS\Table\Extension extension_id

Fortunately for that client, we did see this exact problem before, and we know what causes it: it is a combination of PHP update (to PHP 8.1.x), as well as an old Joomla website (<= Joomla 3.10.3). We quickly confirmed our theory after checking the website and the hosting platform.

But how did the problem happen?

Some hosts are over anxious to update their clients to the latest version of anything – unfortunately, many of these hosts do not fully test the applications that their clients have before proceeding with the update (some do not test at all). In the case of our client, the host performed the update on the dedicated server without even telling the client.

So, how did we solve the problem?

Well, there are there three ways to solve the problem:

  1. Manually updating the Joomla website (through FTP/sFTP/shell) to the latest Joomla 3 version: This is the most dangerous method and must be used as a very last resort, simply because a manual update typically causes more problems that it usually solves; one can end up with a much bigger mess if they are not very careful. It is also very important to make a backup of the filesystem and the database before proceeding with such (again, very dangerous) move.
  2. Reverting to a previous version of PHP: This can be done by adding the following lines to the .htaccess file:

    <IfModule mime_module>
      AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
    </IfModule>

    The above code forces the website to use PHP 7.4 (we are assuming that the previous version that the website was using was PHP 7.4 and that this PHP version is still installed).

    You can also revert back to a previous version of PHP at the server level, this can be done by logging in to WHM, and then going to the MultiPHP Manager page, and then selecting the immediately previous PHP version from the drop down next to PHP version. Note that after doing this, you must restart Apache, by going to the Restart Services page, and then clicking on HTTP Server (Apache), and finally clicking on “Yes” to restart the Apache server (it is important that you do this only during off-peak hours).

  3. Copying the “Table.php” file from the most recent version of Joomla 3: This is by far the easiest and most straightforward solution. All you need to do is to download the latest version of Joomla 3 (which is Joomla 3.10.11 at the time of writing this article), extract the folder, and then copy the file libraries/src/Table/Table.php to the corresponding location on your Joomla website. We recommend that, after doing this, you update your Joomla website to the latest Joomla 3 version (this is not necessary, and it is super important that you backup your website [table + database] before proceeding with the update).

As mentioned above, the last solution is the best solution, and, unless you have a problem with it, then we recommend that you try the second solution, and, as a very last resort, try the first solution. If you’re a bit scared of implementing any of the solutions, or if you got stuck while implementing a solution, then you can always contact us. We will be able to fix your website quickly, affordably, and reliably.

No comments yet.

Leave a comment