Topic-icon Error for new article

Active Subscriptions:

None
14 years 4 months ago #19003 by lollox80
jfbconnect seems to work properly and allows both to find your login with facebook is to place comments, etc.. But if I create a new Article in Joomla or K2 as soon as I try to publish I get this error message:

Fatal error: Call to a member function setupCanvas() on a non-object in /web/htdocs/www.laserball.it/home/plugins/system/jfbcsystem/jfbcsystem.php on line 69

But if I go back the item is successfully created.

What can be
The topic has been locked.
Support Specialist
14 years 4 months ago #19017 by alzander
Replied by alzander on topic Error for new article
Lorenzo,
Is this happening in the front-end or the admin area of the site?

The only time we've heard of something like that happening is if you're in the admin area and you have an extension that's trying to load content from the front-end of your site. While that should work, there are some times that it causes issues.

Let me know if that rings any bells. We should be able to help you get a work around, but we just need to understand a little bit more about the cause.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19065 by lollox80
Replied by lollox80 on topic Error for new article
Hi Alex,
this error happens in admin area.
I use AutoTweet NG Pro and if i ability the plugin i have the error without the Autotweet plugin no error and i can publishing normally new articles
Maybe Jfbconect and autotweet together go wrong?
The topic has been locked.
Support Specialist
14 years 3 months ago #19125 by alzander
Replied by alzander on topic Error for new article
Lorenzo,
If you don't mind a quick code change, hopefully the below will fix your problem. It shouldn't cause any other issues, but I can't say we're certain what's causing the conflict with the Autotweet extensions.. so if you do have other issues, just let us know.

In the /plugins/system/jfbcsystem/jfbcsystem.php file, around line 53, you'll see:
if (!$app->isAdmin())
        {
            $canvasFile = JPATH_ROOT . DS . 'components' . DS . 'com_jfbconnect' . DS . 'libraries' . DS . 'canvas.php';
            if (!JFile::exists($canvasFile))
                JError::raiseError(0, "File missing: " . $canvasFile . "<br/>Please re-install JFBConnect or disable the JFBCSystem Plugin");
            require_once($canvasFile);
            $this->jfbcCanvas = JFBConnectCanvasLibrary::getInstance();
        }
Change that to (adding the 2 forward slashes // to lines 1, 2, and the end):
//if (!$app->isAdmin())
        //{
            $canvasFile = JPATH_ROOT . DS . 'components' . DS . 'com_jfbconnect' . DS . 'libraries' . DS . 'canvas.php';
            if (!JFile::exists($canvasFile))
                JError::raiseError(0, "File missing: " . $canvasFile . "<br/>Please re-install JFBConnect or disable the JFBCSystem Plugin");
            require_once($canvasFile);
            $this->jfbcCanvas = JFBConnectCanvasLibrary::getInstance();
        //}
Please let us know how that goes. There's honestly no reason that's being done there other than a very, very minor speed and memory improvement. It should be safely changed to the bottom block.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
14 years 3 months ago #19175 by lollox80
Replied by lollox80 on topic Error for new article
Perfect with your changing now work correctly.
Thanks a lot,
Lorenzo
The topic has been locked.
Support Specialist
14 years 3 months ago #19191 by alzander
Replied by alzander on topic Error for new article
Glad to hear that got it going! Should you need anything else, let us know.

Finally, if you haven't already, please consider leaving a rating and review for JFBConnect or our support on the Joomla Extension Directory. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks,
Alex
The topic has been locked.