Support

Akeeba Backup for Joomla!

#40882 Files appear to be missing following site restoration

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.4.5
PHP version
8.1.28
Akeeba Backup version
9.9.3

Latest post by nicholas on Monday, 01 July 2024 01:34 CDT

wd5mush

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 10MiB, please upload it on your server and post a link to it.

Done, although not sure if it is the right one.

I've been having problems with my site and have been backing up as a precaution.  I had previously had problems with my .htaccess file being incorrectly configured and resolved that and appeared to have a working backup system in place.

On Thursday I created a backup that appeared to work.  I then made some changes to my site and installed some extension updates.  I expected some problems with one particular update, so after successfully completing the other updates, I created a new backup yesterday.

I then installed the update that I expected problems with and it failed as anticipated.  At that point I restored the backup I had just made.  The problem still existed and I thought perhaps I had not made the backup before the change.  I got my site working by disabling the extension, but of course lost the functionality of the extension (DP Calendar).

This morning I decided to revert to the backup I made on Thursday.  All appeared to work and so far as I could tell the site was as I expected.  I had 8 extension updates, so made a start with Akeeba.  I got an error message:

0 Class "Joomla\Plugin\Installer\Jce\Extension\Jce" not found

This message appeared with any attempt to update.

Before I did restore this function was working properly, now it's not.  The site I restored on Friday did not appear to be identical to the one I thought I had backed up.

Why do I leave it to Friday afternoons to do these jobs when all the support people have gone home for the weekend?!!

nicholas
Akeeba Staff
Manager

Lucky you, I happened to check support on a Saturday morning :) Best though to implement what is known as "read only Friday" i.e. don't make any changes on a Friday.

Try deleting the file administrator/cache/autoload_psr4.php. This is A file Joomla! generates automatically, containing the mapping between folders on your site and PHP namespaces. It appears that Joomla! failed to replace it when JCE was updated, hence the issue. The restoration has nothing to do with it. Failure to update autoload_psr4.php is not very common, but it does happen. As far as I can tell, it's a very timing-sensitive issue, and I don't know of a good workaround since PHP doesn't have any feature which lets the current thread get a lock on the file.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

wd5mush

Thank you, in particular for support when you are supposed to be having a break!  Thank you also as the guy who supports the JCE extension is on holiday until the end of July (lucky man).

What I don't understand is why I was able to do the updates on the original site I backed up, but it didn't work on the restored site.  Presumably, when I did the updates after I backed up, that would be when the autoload_psr4.php file was created, but all those updates worked (and I did them one at a time).  After I restored the backup, I would have expected everything to be as it was at that point and any autoload_psr4.php would be deleted when the files were cleared. (Am I right in believing that all the files and database content are deleted before the restoration?)

I tried renaming the autoload_psr4 file rather than deleting it, but it made no difference.  I'm trying to work out exactly what Class "Joomla\Plugin\Installer\Jce\Extension\Jce" not found means.  I presume it is somewhere in a CSS file.  I looked to see if it referred to a file, but although it is a similar file structure nothing matches.

Fortunately I have managed to salvage a working version of my site to see me over the weekend. 

Incidentally, after I raies this ticket I tried to go back in a nd edit what I had written.  I got an error message telling me it couldn't do it.  Did you know?

nicholas
Akeeba Staff
Manager

So, the problem is not specific to any extension. It can happen pretty much randomly. I can tell you that JCE doesn't have an issue as I've already done this update myself on several sites, development and production, with no problems.

The class here refers to a PHP c lass. Namely, it refers to the file plugins/installer/jce/src/Extension/Jce.php. If you open the file you will see that its namespace is Joomla\Plugin\Installer\Jce\Extension and its class name is Jce, therefore the fully qualified PHP class name is Joomla\Plugin\Installer\Jce\Extension\Jce.

Here's what I would do, knowing it is one of three different possible Joomla! bugs (and I only know it because I've been around long enough to know about all the “nearly impossible” Joomla! issues).

Uninstall the plugin Installer - JCE.

Make sure the folder plugins/installer/jce no longer exists on your site. If it does, stop, and remove the folder. If you can't remove it, ask your host for help (it would also tell us this is a server filesystem issue)

Download the latest package of JCE in ZIP format from its site.

Go to System, Install, Extensions, Upload Package File and install this ZIP file twice in a row, without uninstalling it before or in between.

The three “nigh impossible” Joomla! issues we are addressing are:

  • Joomla! failed to copy the files of the extension correctly upon update
  • Joomla! failed to transcribe the plugin's manifest into the #__extensions table.
  • Joomla! failed to correctly regenerate the autoload_psr4.php file
  • BONUS: we have a filesystem issue which can only be solved by removing the plugin's folder; the solution is the same as the one for the first issue which is uninstaling the plugin :)

If you have a problem after that, check if the file plugins/installer/jce/src/Extension/Jce.php is still there. If not, or if it's renamed it's a hosting issue.

And yes, I have seen all of the above issues. The joys of essentially doing support for thousands of sites :D

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

wd5mush

Thank you, thank you, thank you!

That all worked as you suggested and I have now updated the extensions that were being blocked before.  Installing the latest version of JCE of course meant that was up to date anyway.

I really appreciate your help over the years I have been using Akeeba - and not always Akeeba related. 

Should I report this as a bug to Joomla - and in when case, how do I do it?

Best wishes

Alan

nicholas
Akeeba Staff
Manager

You're welcome!

And yes, please report it. The problem is that on updating an extension, sometimes the files are not copied. In your case, this led to your site breaking since the plugin file Joomla! tried to load was no longer there. You will need a GitHub user account (it's free) and go to https://issues.joomla.org/. Click on Login with GitHub in the top right. Click on New Item in the top left. Fill in the form and click on Submit. That's it.

As a side note, I have reported the same issue several times and have been slandered for it. Having someone else report it formally, on Joomla's GitHub Issues, about an extension that's not mine, is a good thing. Maybe they will pay more attention and focus on improving their product than slandering me and my company.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!