Support

Admin Tools

#30022 FOF30?

Posted in ‘Admin Tools 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
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Friday, 31 August 2018 17:17 CDT

jjst135
Hi!

I run a cronjob on one of our sites to index the Smart Search periodically.

I get these PHP notices in the mail I receive after the cron / indexing is finished:

PHP Notice: Undefined index: REMOTE_ADDR in /home/intradef01/domains/intranet.defonteinzwolle.nl/public_html/libraries/fof30/Utils/Ip.php on line 490

Notice: Undefined index: REMOTE_ADDR in /home/intradef01/domains/intranet.defonteinzwolle.nl/public_html/libraries/fof30/Utils/Ip.php on line 490
PHP Notice: Undefined index: REMOTE_ADDR in /home/intradef01/domains/intranet.defonteinzwolle.nl/public_html/libraries/fof30/Utils/Ip.php on line 383

Notice: Undefined index: REMOTE_ADDR in /home/intradef01/domains/intranet.defonteinzwolle.nl/public_html/libraries/fof30/Utils/Ip.php on line 383

I have not seen this notice before. But maybe this is because we started using PHP 7.2 in stead of 7.0? Or is this something else?

A more general question:

What exactly is and does the fof30 library in the CMS? Is this use only by Akeeba extensions? Or also by the CMS itself?

And how may versions of fof30 do we need on a CMS installation? In this particular site I have two:

FOF30 3.3.4 (2018-05-22) and FOF30 3.3.5 (14-06-14)

Can I remove one of them without any consequenses?

How does FOF30 relate to the FOF library that is (i think) shipped with Joomla by default?

Kind regards,
Jip

jjst135
I found this on your site:
https://www.akeebabackup.com/news/1558-info-about-fof-and-f0f.html

I think FOF30 is a later version of F0F (F-zero-F) and is the library you guys install when we use one of your extensions?



tampe125
Akeeba Staff
Hello,

I have not seen this notice before. But maybe this is because we started using PHP 7.2 in stead of 7.0? Or is this something else?

No, that's unrelated. The global supervariable $_SERVER should be always have the REMOTE_ADDR key, and this is something set by your webserver. If you didn't touch anything (ie installing any new extension), you should talk with your host and report the issue.

I think FOF30 is a later version of F0F (F-zero-F) and is the library you guys install when we use one of your extensions?
Yes, you are right. You can safely remove version 3.3.4 from your site and only use version 3.3.5, however before doing that please take a backup, in case anything goes wrong.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jjst135
Hi Davide, thank for getting back to me on this.

1) When I execute this code on the site where the cron is triggered: $_SERVER['REMOTE_ADDR'] then I do see the IP in my browser. So I guess the value is there. Maybe the cli script does not get any value because it's triggered by the server itself? If the the code did not produce any IP then it would probably be a server thing. But in this case it is maybe something else? Or should I take this up with my server provider?

2) I am not sure why the FOF is 'double' on the site, but I believe this happened on all of our sites... Is this something what maybe happend during the upgrade from 3.3.4 to 3.3.5? Is it possible to correct this in a next update of Admin Tools or Akeeba backup so we don;t have to manually remove the library? I think maybe more users will have a double library now? If that is not possible we'll have to do it manually for all our sites (about 100...).

Kind regards,
Jip

tampe125
Akeeba Staff
1) mhm... that's a different thing. Which scripts are you invoking and how? Can you paste the command you are running (remove any sensitive info, since this is a public ticket)

2) Updates are handled by Joomla itself. We only tell it "Hey, this is the new version of library FOF to install" and then Joomla does its work.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jjst135
1) We use a cron to trigger the finder_indexer.php script to index the content for the 'Smart Search' aka 'Finder'. Like this:

/usr/local/bin/php /home/USER/domains/DOMAIN/public_html/cli/finder_indexer.php

The script still does the job, but in the mail we receive we get the errors mentioned in the first post of this topic.

These errors only started to show up a while back. Not sure exactly when and what changed...

2) Ok, so this is somehow cause by the Joomla updater? We will remove the older version manually. Hope this causes no issues..




tampe125
Akeeba Staff
mhm... I suspect the finder script is loading system plugins, including Admin Tools, that will load the FOF library, hence the error.
I'll take a look at it just to be sure about that and try to apply a workaround

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jjst135
Ok, thanks. Can you let me know what you find?

FOF30 library: I removed the 3.3.4 version form one of our site, but after doing so I got this error:


An error occured:
Class 'FOF30\Container\Container' not found

And also this removed the 3.3.5 version of the library as well...

After downloading the 3.3.5 version form the Akeeba website and installing it, it was back OK. I think...

So we will need to do this like this for all sites I guess... There is no other / better way to do this? Is this not just a database table issue somewhere we can fix? Are both version actually installed (files) or is this more of a database issue?

Kind regards,
Jip

jjst135
I just checked another site of ours and on this one there is only one FOF30 library. So maybe this issue of double FOF30 is not on al sites...

But... On this site we do see an old FOF library: revC1A6D5A-1378494129 (2013-09-06)

Can this one also be removed safely?

So we only need the CMS FOF (can not be uninstalled) and the latest FOF30?

Or can older versions of the FOF also be used by other extensions? I mean other then Akeeba extensions?

Kind regards,
Jip

jjst135
Screenshot URL

Here's another one. With two FOF3 and two FOF...

We can remove the FOF 2.2.1 and FOF30 3.3.4?


jjst135
Sorry about spamming this topic...

I just removed an older FOF library (not CMS version) on one of our websites. This resulted in an error:

0 Class 'FOFModel' not found

PGP error log:
[Mon Jul 30 18:51:33.746214 2018] [lsapi:notice] [pid 66843:tid 140570311747328] [client ******] [host******] Backend log: PHP Warning: include_once(): Failed opening '/home/******/domains/******.nl/public_html/libraries/fof/include.php' for inclusion (include_path='.:/opt/alt/php70/usr/share/pear') in /home/******/domains/******/public_html/libraries/cms.php on line 48\n, referer: https://******/administrator/index.php?option=com_akeeba

I download a Joomla install file and uploaded the libraries/fof folder to my site and this seems do work. So removing the FOF (not FOF30) that was NOT the default CMS FOF also resulted in the deletion of the whole fof folder. Something to be aware off...

I do also see a folder 'libraries/f0f' on this site. (With the zero...). But in the backend no F0F (zero) library. Can we remove the F0F folder safely from a Joomla CMS when there is no such library in the extension management component?

Just trying to figure this all out...

UPDATE:
I just removed the libraries/f0f (zero) folder. Seems to cause no problems...
Hope this doesn't mess up anything else?

Kind regards,
Jip

jjst135
Just to make sure:

In the extention manager in the backend we should only see the CMS FOF (non deletable) and the latest FOF30. So no F0F (zero) or older FOF30 versions or older FOF versions. Just:

- FOF 2.4.3 (CMS default FOF, not deletable)
- FOF30 3.3.5 (Installed by Akeeba with their extensions)

And in the libraries folder there should be also these two folders:
libraries/fof (Joomla CMS)
libraries/fof30

A libraries/f0f (zero) is not needed and can be removed. Right?

If the are not there (after deleting older FOF version in the backend), we need to upload the fof from the Joomla install package and the FOF30 library from Akeeba.

Am I getting this right?

dlb
Jip,

Davide is gone for today. Yes, you are correct. The f-alpha O-f library is the Joomla! core library. The f-zero-f version is an older Akeeba library no longer used by current Akeeba software. The fof30 is the current version of the Akeeba library. There is a story behind all the similar names and how they came about.

It is my understanding that there are some third party extensions that use the Akeeba version of the library and may need those older versions if they haven't been updated, but I don't know the names of the extensions. It may be safer to rename any library folders that look obsolete and test the site to make sure it really is unnecessary. If everything checks out, then you can delete. As always, make a backup, paranoia is your friend.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

jjst135
Thanks Dale!

We always make periodic backups. Of course ;-) For most sites weekly.

I believe we have no extensions that use the F-zero-F library, but you never know. So I will keep a local folder with these files somewhere.

When there is an issue with one of our sites I will also ask / encourage the extension developer to change to FOF30. Or maybe even better, use a framework of there own?

I do feel I need to keep the sites as 'clean' as possible. So no old unnecessary extensions and files if possible...

@Davide: Will you get back to me (no hurry) on the cron error in the earlier posts in this thread? Thanks!


nicholas
Akeeba Staff
Manager
Just popping in to clarify FOF vs F0F vs FOF 3.

FOF was the original library (Framework on Framework) I wrote back in 2011. It was based on original work I had done in 2009 to 2011 for my software, improved by a healthy dose of inspiration from Ruby on Rails and other RAD frameworks of that time. It was used on all of our software. Eventually, it was included in Joomla! itself in 2012. The version of FOF included in Joomla! was version 2, a slightly improved version I had written in a mad rush to get it included in Joomla... which got delayed by another 6 months. That mad rush resulted in technical debt which I had to pay later.

Joomla! would not allow me to update FOF in maintenance Joomla! releases (e.g. 3.3.1 going to 3.3.2). This was the direct result of a single person vetoing a sane development practice (backwards compatible bug fixes in FOF in maintenance Joomla releases) because he wanted to peddle his own code in the Joomla! Framework and use it to replace FOF, even though his code was NOT a Rapid Application Development framework i.e. not a replacement. As a result I was not able to address bugs sooner than 6-12 months. I was also forbidden from installing an updated version of FOF on people's sites because that was considered "hacking the core" and came with a penalty of being removed from the Joomla! Extensions Directory for 6 months to forever. A buggy library which cannot be updated made it useless for anyone making components, including me. So I forked my own code and renamed it to F0F (f-zero-f) to avoid naming clashes and avoid the "we will kick you out" condition.

In 2015 I rewrote FOF because of the technical debt in FOF 2 written in 2012. The only way to get rid of the technical debt was to write code that was for the most part incompatible with the existing FOF framework. This meant that I had a new version, version 3, which could be used in parallel with FOF 2. Replacing FOF 2 / F-zero-F with FOF 3 would be wrong as it'd break existing software. FOF 3 is, therefore, installed in the folder fof30. It is now used for all of our extensions.

One thing I had gotten wrong in FOF 2 / F-zero-F was the lack of dependency management. There was no record of which extensions use FOF2/F0F. As a result we never had a way to know when F0F is no longer necessary and could, therefore, not uninstall it automatically. This was fixed in FOF 3. We record in the database which extensions use which version of FOF 3 so we know when we can uninstall FOF itself. Therefore you should never remove FOF 3 manually. You cannot remove FOF 2 either because it's used by Joomla (and being a protected extension it cannot be removed anyway). You only need to remove F-zero-F if nothing on your site uses it.

If all of our extensions installed on your site are versions published after January 2016 you should be able to safely remove F0F (F zero F). It's obsolete and no longer used.



DO NOT remote FOF30, it's used by all of our software. Removing it will break our software.



DO NOT remove FOF (F oh F), it's used by Joomla! itself and some third party extensions. Removing it will definitely break Joomla.


I hope that explains both why you see "multiple" FOF versions. For all your other questions I will let Davide and Dale reply. I am currently on vacation, the DSL line got screwed up and I can only pop into support once every couple of days using a tethered 3G connection.

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!

jjst135
@Nicolas

Thanks for the background info. To bad it's sometimes difficult to get along nice all the time in the Joomla community. I guess that can be on of the downsides of OpenSource development. I hope you still like Joomla enough to keep working on your great extensions ;-)

@all
When uninstalling FOF30 3.3.4 when 3.3.5 is also installed (not sure why there are two versions) both get uninstalled and we need to reinstall FOF30. Not a big deal. Just good to know for others that read this post. FOF30 can be downloaded here:

https://www.akeebabackup.com/download.html under 'PHP Frameworks'.

Also when there are multiple FOF (CMS) versions somehow, deleting the extra one will also delete both and you nee to upload the library again. Download the latest Joomla installation package and extract libraries/fof and upload it to you site. That should fix it.

When there is only one Joomla CMS FOF library I believe you can not uininstall it drom the backend. It is a protected system part.

@Davide:
You mentioned:
"mhm... I suspect the finder script is loading system plugins, including Admin Tools, that will load the FOF library, hence the error. I'll take a look at it just to be sure about that and try to apply a workaround"

Shall we leave this ticket open so you can let me know what you find out or would you prefer I create a new ticket for this?

Kind regards,
Jip

tampe125
Akeeba Staff
Regarding the PHP warning, there was indeed a bug in FOF library, we just fixed it.
At the moment we can't release a new version, I guess you'll have to wait until September, when we will release a new version of everything.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jjst135
OK, thanks Davide. We will wait for the next release of the FOF30 library. I guess this will be installed with a new version of Akeeba Backup or Admin Tools. Right?

Thanks for looking into this!

tampe125
Akeeba Staff
Yep, that's right

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!