× Joomla Facebook Connect support forum

Topic-icon Fatal error: Call to undefined method JDate::format() - JFB 4.3.3

Active Subscriptions:

None
Hi Alex,
Sometime when I click on an article I get the following error:
Fatal error: Call to undefined method JDate::format() in .../libraries/sourcecoast/openGraphPlugin.php on line 190

you can try it in www.kfaryona.com
You will have to try several times until you will get this...
Please help
The topic has been locked.
Active Subscriptions:

None
here is a link to a page that now always fail:
www.google.com/url?q=http://www.kfaryona...EHk-fGmbhqKWiet-mRaQ

not sure if it relates to it but the date of this article is June 17.
The topic has been locked.
Active Subscriptions:

None
Ok I solved it.
I think you need to change the J1.5 code from:

JText::sprintf("COM_JFBCONNECT_OPENGRAPH_ACTION_EXISTS", $date->format(JText::_('DATE_FORMAT_LC4')))."</span>".
to:

JText::sprintf("COM_JFBCONNECT_OPENGRAPH_ACTION_EXISTS", $date->toFormat(JText::_('DATE_FORMAT_LC4')))."</span>".

In j2.5 it is okay as toFormat() is deprecated.
Please verify my fix.
The topic has been locked.
Support Specialist
Ahhh.. Excellent sleuthing. Looking into that solution, but from a quick look, I do think your right. Will keep you posted, and thanks for the report!

Alex
The topic has been locked.
Support Specialist
Amir,
Just wanted to get back to this. You're correct about the fix. We'll be updating our J1.5 code to use the 'toFormat' call and the J2.5+ to use 'format'.

This will be in the upcoming bug-fix release for J1.5.

Thanks again for the report,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi guys, i am just on with working the JFBConnects open-graph into my site and i have the same problem when clicking on some articles. I was just wondering where you made this fix? In what folder? In what file? and which lines of code do i change?

Thanks in advance for help:) And thanks for a really cool extension...

Neil
The topic has been locked.
Active Subscriptions:

None
Hi Alex, just noticed there was an update for JFBConnect! So i went ahead and updated and everything seems to be fine now:) I'll let you know if i find any more errors..
Thanks again Neil
The topic has been locked.
Support Specialist
Neil,
Glad the update worked for you. That was one of the fixes included in that release.

Should you run into anything else, just let us know, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
Thanks for the fast response Alex, Yes i'll let you know if i run into anything else:) Also just about to submit my first og action (join group) and if that goes well i'll be doing my articles next. I'll keep you posted...!

Neil.
The topic has been locked.
Support Specialist
Neil,
Best of luck and thanks for the feedback,
Alex
The topic has been locked.