× Joomla Facebook Connect support forum

Topic-icon Photo uploads with Ignite Gallery

Active Subscriptions:

None
15 years 5 months ago #6538 by fb_1457713054
I just upgraded to the new version today. I went to bulk upload some photos in Ignite Gallery and received the following error.

Error: <br />
<b>Fatal error</b>: Call to undefined method JDocumentRAW::addCustomTag() in <b>/home/girlscou/www/jerseyshoregirlscouts.com/components/com_jfbconnect/libraries/facebook.php</b> on line <b>112</b><br />


It looks like it's trying to tag each photo with my Facebook ID. Is there a way to fix this, or an option to turn it off? It came up for each photo in my bulk upload.
The topic has been locked.
Support Specialist
15 years 5 months ago #6542 by alzander
Congrats! You found our first bug. If you're up for a minor code change, the above should fix your issue, and we'd love to hear if that's the case.

In the /components/libraries/facebook.php file, at line 110 is the following:
$doc = & JFactory::getDocument();
$doc->addScript('components/com_jfbconnect/includes/jfbconnect.js');
$doc->addCustomTag('<script type="text/javascript">' .
                $logoutFacebookJavascript .
                "var jfbcLogoutLink = '" . $logoutLink . "';" .
                "var jfbcOptionsPermsUrl = '" . $optionPermsUrl . "';\n" .
                "</script>");
If you could update it like so, adding the if statement and closing }, that should prevent the code we're trying to put in the head tag if the page is not being rendered as HTML.
$doc = & JFactory::getDocument();
if ($doc->getType() == 'html') {  // ADD THIS LINE
        $doc->addScript('components/com_jfbconnect/includes/jfbconnect.js');
        $doc->addCustomTag('<script type="text/javascript">' .
                $logoutFacebookJavascript .
                "var jfbcLogoutLink = '" . $logoutLink . "';" .
                "var jfbcOptionsPermsUrl = '" . $optionPermsUrl . "';\n" .
                "</script>");
} // ADD THIS LINE

Please let us know, and sorry for the troubles.
The topic has been locked.
Active Subscriptions:

None
15 years 5 months ago #6543 by fb_1457713054
That seems to have solved the problem. I didn't check it with the photos, but I was getting the same error while trying to set up a RSS feed for a podcast. Once I added your fix, the error stopped.

Thank you for the quick fix.
The topic has been locked.
Support Specialist
15 years 5 months ago #6547 by alzander
Glad to hear that worked. We don't like version churn, but there's nothing worse than a Fatal Error, so we're pushing out 3.1.1 in just a few moments. The only change will be this (and a very minor grammar mistake in the admin area). If you see your version is out of date, don't feel required to upgrade.

Thanks for your patience and feedback! Hope everything else goes very smoothly, but if not, you know where to find us!
The topic has been locked.