Support

Akeeba Backup for Joomla!

#36363 Class "FOF40\Container\Container" not found in frontend+backend after upgrading Akeeba Backup in J4 having Engage

Posted in ‘Akeeba Backup for Joomla!’
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
n/a
PHP version
n/a
Akeeba Backup version
n/a

woluweb

Hi Nicholas,

I already noticed the same issue on another J4 website having both Akeeba Backup (and Admin Tools) and Akeeba Engage.

The summary is in the Subject of this ticket.

Here is the longer version :

At 9:06 this morning I receive the update notification of mySites.guru

We have successfully upgraded the extension Akeeba Backup Professional for Joomla! 4 on the site https://www.___.eu/ because you have this configured in your mySites.guru account.
We have upgraded to version 9.0.11.

At 9:09 I receive a notification that the site is down

[mySites] YOUR SITE MAY BE OFFLINE!! - https://www.___.eu/

And indeed, both in frontend and in backend login screen I get the following error :

Class "FOF40\Container\Container" not found

So (after setting Debug to True in configuration.php to see which file(s) were causing the error) I renamed

  • /public_html/plugins/system/engagecache
  • /public_html/plugins/content/engage

Now the site is up and I can access the backend.

Additional note : on the other site yesterday I made another test : I reinstalled Akeeba Engage and everything went fine again. Then the site was asking to update FOF, which I did. Then again I got

Class "FOF40\Container\Container" not found

So I am not sure if the issue is more on the side of FOF, Akeeba Engage or Akeeba Backup but I wanted to share it with you.

And I'll be happy to test any fix/workaround of course.

nicholas
Akeeba Staff
Manager

Akeeba Backup 9 DOES NOT use FOF. Same goes for all of our native Joomla 4 only extensions. Updating Akeeba Backup 9 does not make any changes to FOF.

FOF 4.1 will indeed uninstall itself on Joomla 4 on update if it's not actively marked as being used by any extension. My best guess is that Engage was not marked as using FOF, hence your problem. On my blog site which is also Joomla 4 and uses Engage (the reason I wrote Engage in the first place) this doesn't happen.

In any case, this is a rather moot point :) I will be releasing a Joomla 4–only version of Engage either today or tomorrow. Engage 3.0 does not use FOF, it's using the Joomla 4 MVC like all of our Joomla 4–only extensions.

I am still finalising a few things with Akeeba Ticket System 5, the upcoming Joomla 4–only version. Once that's released we will no longer have any actively supported Joomla 4 software using FOF, exactly as we had announced in August 2021.

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!

woluweb

Txs for the explanations Nicholas.

I was just explaning the symptoms as I could see them as a simple user, I don't know the details of FOF :)

Don't investigate further since, as you say, Engage 3 for J4 should be released this week.

Txs a lot for the follow-up and all your contributions (your paid extensions, your free extensions... and to the core ;) )

nicholas
Akeeba Staff
Manager

Thank you :)

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!

woluweb

Hi Nicholas,

I see that Akeeba Engage 3.0.1 is already released. Txs! :)

I use it with Cassiopeia but there is a weird side-effect after the update.

See https://www.whatt.eu/en/blogs-podcasts/welcome :

  • (only) on the pages where Engage is enabled, the "component area" (the article) is "moved" before the Header and put in full width
  • besides, the "Leave your comment" button does not trigger anything

Do you see any reason for this bug?

PS : independently of this, when looking in the console I discover a little error msg. Is this caused by something wrong in my .htaccess or does it come from darkmagic?

Refused to apply style from 'https://www.whatt.eu/en/media/plg_system_darkmagic/css/skin.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

woluweb

ohoh, here is some additional information after more testing :)

  • actually, when not logged in
    • the layout is OK
    • but the "leave your comment" button does not work (the button disappears but the commenting zone does not appear)
  • and when logged in
    • then the layout is broken (see screenshot in attachment)
    • and same issue for the "leave your comment" button

woluweb

and here is the screenshot:

nicholas
Akeeba Staff
Manager

The missing comment area seems to be an issue with the “Comment area hidden by default” option. Try disabling it for now. It's a really bad idea anyway — it's bad UX and doesn't actually save page rendering or loading time for the reasons I explain in the documentation.

Regarding the layout, nothing actually changes between logged in and Guest users as far as the HTML output and the CSS being loaded. However, you should note that Akeeba Engage 3 requires you to redo any template overrides and CSS overrides / customisations you have made.

Since we moved from FOF to core Joomla MVC the view template files have changed to use the different MVC framework.

There were also minor changes in the HTML structure to let me write more modern CSS using CSS Flexbox instead of the unholy mess of paddings, margins and floats previously used. Akeeba Engage 1.x and 2.x had to use that crappy CSS because that's all I could reliably use with AMP pages. Now that we no longer support AMP (since AMP has been pronounced dead by publishers and even people on its governance board) I could upgrade the CSS to something more modern. Of course if you were targeting the old classes and wrote custom CSS based on how the old CSS worked you will get something broken. Well, this is the last layout rewrite — barring any changes in Joomla itself which necessitate adapting the HTML output and/or CSS.

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!

woluweb
1. “Comment area hidden by default” option

Yes indeed. I had read the warning saying it was a bad idea to enable but I could not resist the temptation :D

Now I have disabled that option and the issue is of course solved (since there is no button "leave comment", there is no issue any more).

2. issue with the page being "scrambled" (article content coming even before the Header)

I have investigated futher following your comment that it could not be linked to logged-in vs not-logged-in.

And indeed I was too hasty in my conclusion: I had the illusion that the difference was between logged-in vs not-logged-in bc actually the root cause is related to caching (and as you know there is no caching when logged in, hence my confusion).

And btw, this is a standard Cassiopeia, I have made no customization.

See the animated gif attached showing the following steps (never logged in in front-end)

1. page is "scrambled" in the front-end

2. refresh the page and it comes OK

3. go to backend and "clean cache"

4. refresh front-end => page is "scrambled" again

5. (I do the cycle again, same behaviour)

PS : besides this, another weird issue: on https://www.whatt.eu/fr/blogs-podcasts (the blog view) I get the following error in FR (but not in EN and NL)

0 Unsatisfied dependency "com_engage.comments#script" for an asset "com_engage.frontend" of type "preset"

Then I enabled Debugging in Global Config. But by doing so, refreshing the page makes it work. And when I disabled Debugging it now keeps working (so I cannot reproduce right now)

nicholas
Akeeba Staff
Manager

1. Already solved in dev release  Version 3.0.2-dev20220106120 

2. Your issue is actually linked to a Joomla bug I was chasing two nights ago and which apparently had another fix submitted for it a month ago by another developer. Joomla 4's caching does not work correctly when a module tries to load stylesheets or scripts or otherwise modifies the document head data.

PS: The unsatisfied dependency is a hosting issue. I assume you are on Rochen or another host using cPanel and Immunify360? It would appear that at random times (I suspect when Immunify360 is scanning files) files already existing in the filesystem are reported as missing. This cases the error message from Joomla's WebAssetManager since it thinks it cannot find the script file which is really there and does exist. Joomla then caches the error page instead of the article and module content. The error appears until you reset the cache.

I actually had to disable caching on my blog because this kept happening with com_tags' JavaScript on my blog's main page. I only found out about this issue because HetrixTools was reporting downtimes early in the morning. So this week I woke up very early in the morning twice and wouldn't you know it, the second day it paid off. I got a notice around 7am that the site was down, brought it up and saw the error message. Clearing the cache “magically” fixed the issue — since the file reported as missing was most definitely there! My suspicion is that this is an artefact of CloudLinux' infamous filesystem cache handling. In older versions of Joomla you'd randomly get a page of your site that didn't load a static resource such as a JS or CSS file. The user would reload it, the site would appear correctly, they'd chalk it up to something weird happening with the network and everybody was none the wiser. Now Joomla will throw an error when a CSS or JS file seems to be missing and the error gets cached, leading to a worse issue.

Sometimes I wish I had followed a professional with less stress, like air traffic controller or bomb squad tech...

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!

nicholas
Akeeba Staff
Manager

I think I found a workaround which works with and without caching. Please install this dev release:  Version 3.0.2-dev20220106133 

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!

woluweb

Excellent!

After installing this very last Dev Release, I can't reproduce any of the errors any more (and I've been trying for 5 minutes :) ).

Even the "leave your comment" button issue is fixed.

Waouw, you made my day :)

Once again, txs for your time and good follow-up!

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

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!

Summer vacations: Our support will be closed for replies and new tickets from August 6th to August 21st, 2022 due to summer vacations.