Topic-icon System - JFBCSystem Content - JFBCContent Stop my site working

Active Subscriptions:

None
Hi all...

we are having the exact same issue.

Fatal error if JFB Connect - System plugin is enabled

And admin JFBC gives this:
Notice: Trying to get property of non-object in /home/opgroeig/opgroeigids.nl/administrator/components/com_jfbconnect/views/jfbconnect/view.html.php on line 54

Notice: Trying to get property of non-object in /home/opgroeig/opgroeigids.nl/administrator/components/com_jfbconnect/views/jfbconnect/view.html.php on line 54

This is the front end error:
Fatal error: Call to a member function onAfterInitialise() on a non-object in /home/opgroeig/opgroeigids.nl/plugins/system/jfbcsystem/jfbcsystem.php on line 61


Cheers,

Andrew
The topic has been locked.
Active Subscriptions:

None
Just noticed another error on frontend:

Fatal error: Class 'JFBCFactory' not found in /home/opgroeig/opgroeigids.nl/plugins/content/jfbccontent/jfbccontent.php on line 59


I hope that we can find a solution quick.


Thanks,


Andrew
The topic has been locked.
Active Subscriptions:

None
Could it be the PHP version or anything like this? Have you recently moved hosts imnlimited?
The topic has been locked.
Active Subscriptions:

None
12 years 3 days ago - 12 years 3 days ago #44575 by Ludwig von Mises
I might add that Andrew and I also upgraded from J2.5.20 to J3.3 today.

PHP Version is 5.3.28. Also on SiteGround

Maybe we should try un-installing JFBC instead of just re-installing?
Last edit: 12 years 3 days ago by Ludwig von Mises.
The topic has been locked.
Support Specialist
Ludwig,
This is your first post. What errors are you seeing?

All,
The errors above all have JFBConnect and Siteground in common. I'd definitely recommend contacting them to see if they can provide some assistance.

From what I can tell:
* Andrew and Ludwig are using existing sites. It sounds like you both upgraded to Joomla 3.3.0 today though, correct? Were there any issues before you upgraded, or did they all occur only after the upgrade?
* Eoin is moving an existing site to Siteground. That site remains on 2.5.20
Were there any other changes that have happened? JFBConnect v6.0.6 has been out for more than a month at this point. We haven't changed anything, so if you were on 6.0.6 before today then something else changed. We need to narrow down what. Obviously, switching servers and Joomla versions is a big change, but we need to find the commonality between your individual sites.. which right now is only Siteground.

Andrew,
The JFBCFactory error on the front-end is likely because you have the content plugin enabled, but not the JFBCSystem plugin. You'll need to enable both. That's an error on our part, as described above.

Eoin/All,

Fatal error: Class 'JFactory' not found in /home/kepplewr/public_html/libraries/joomla/session/storage/database.php on line 71

That error is coming from a Joomla core class (the database class) calling JFactory, which is the main call of Joomla in general. If JFactory is not loading, that absolutely indicates a Joomla installation/configuration issue. That right there is where I'd start with Siteground to let them know there is an issue as that's not related to JFBConnect in any way.

Keep me posted on any response you get from them. We're looking into our code to see anything that could be wrong, but this hasn't been reported before and (again) 6.0.6 has been out a while.

Alex
The topic has been locked.
Active Subscriptions:

None
12 years 3 days ago - 12 years 3 days ago #44580 by Ludwig von Mises
Alex, I am helping Andrew with the upgrade. I don't have another site with this problem.

I used to be on SiteGround and migrated a site that started with J1.7 all the way to J3.1 a few months ago. I have since left them and am on another host. I didn't experience any problems with JFBC during the two migrations 1.7->2.5->3.1.

And we don't have problems with the Content plugin. Only the system plugin.

I think we might try an FTP of a J3.3 package to see if we are missing a file. Will report back.
Last edit: 12 years 3 days ago by Ludwig von Mises.
The topic has been locked.
Support Specialist
It can't hurt to FTP things since all the database changes should have been done when 6.0.6 was actually installed. However, I honestly don't think that's going to improve anything. From the JLoader and JFactory errors that are being reported, it sounds like something lower-level than a file issue with JFBConnect itself. Again, the content plugin issue is our fault, which is annoying because it's clouding the issue. The other errors, while coming from calls JFBConnect are making, don't really make sense.. and again, are specific to Siteground, as far as we can tell.

I know Siteground does some optimizations to Joomla itself, which may be causing the problems if they've changed some core functionality in some way.

Looking at our code some more, I have one suggestion to try, but I have no clue if it will fix things. From the errors being reported though, it may. To try, please edit the /plugins/system/jfbcsystem/jfbcsystem.php file. At the top, there's a __construct class. Move all of that code except for the parent::_ call at the bottom into the onAfterInitialise() function below it and delete that function. When done, the top of that file should look like:
static $cssIncluded = false;

    public function onAfterInitialise()
    {
        $factoryFile = JPATH_ROOT . '/components/com_jfbconnect/libraries/factory.php';
        if (!JFile::exists($factoryFile))
        {
            JFactory::getApplication()->enqueueMessage("File missing: " . $factoryFile . "<br/>Please re-install JFBConnect or disable the JFBCSystem Plugin", 'error');
            return; // Don't finish loading this plugin to prevent other errors
        }
        require_once($factoryFile);
        // Need to load this as some custom developers expect this file to already be loaded and using the old JFBCFacebookLibrary classname
        // Doing this for backward compatibility in v5.1. Remove in the future
        require_once(JPATH_SITE . '/components/com_jfbconnect/libraries/provider/facebook.php');

        $this->buildListOfTagsToReplace();

        $app = JFactory::getApplication();
        if (!$app->isAdmin())
        {
            .....
That will change the loading order of some things, which could fix the issue. Again though, this is a guess as I'm clueless as to why basic core Joomla functions aren't working.

Keep me posted,
Alex
The topic has been locked.
Active Subscriptions:

None
Alex,

See this:

joxi.ru/ewaSUxjKTJASH_4nUQ8

Is that what you meant?

BTW, we are not using any of the SiteGround Joomla special tricks and tweaks on our sites or hosting account. We struggled enough with it before.


Thanks
The topic has been locked.
Active Subscriptions:

None
12 years 3 days ago - 12 years 3 days ago #44586 by Ludwig von Mises
Sorry, Alex, not sure if I understand 100% your instructions. Could you please post a copy of jfbcsystem.php with your code re-arrangement suggestion?

BTW, I am also seeing Error: 0 JForm::getInstance could not load file when trying to click on "Configuration" in JFBC admin. Firebug shows a 500 error for a GET to the following file: /administrator/index.php?option=com_jfbconnect&view=config

If this is a hosting issue, do you have ANY idea what the problem might be? It's wierd, the ONLY part of Joomla having problems here is JFBC. I see in the cookies a whole lot of references to some JoomlART stuff which was un-installed. Could that have anything to do with it?
Last edit: 12 years 3 days ago by Ludwig von Mises.
The topic has been locked.
Support Specialist
Yes, take all of that code, except for the function__construct and { (the first 2 lines) and move them into the function below it. The code should look like what I posted above from the $cssIncluded line down to the !app->isAdmin().. after that, it should be the same as the onAfterInitialise function was.

If you had Siteground install Joomla for you, I believe there are still 'tweaks' they do to the code for their servers. That's absolutely fine to tweak things for performance benefits, but in this case, if that's the cause, it seems to be a problem.

Again, let me know what the above does. If you still get errors about JLoader or JFactory, it's more a Joomla related error than JFBConnect.

Alex
The topic has been locked.