Topic-icon Open Graph - Content" plugin with jreviews component

Active Subscriptions:

None
Hi,
joomla 3.65
with jreviews component
if editing listing or new listing ,
error from "Open Graph - Content" plugin:
Warning: get_class() expects parameter 1 to be object, array given in /srv/users/serverpilot/apps/nowshare/public/plugins/opengraph/content/content.php on line 322

help, please suggestion for know what causes this error (give them the above error message).
Thank you
The topic has been locked.
Support Specialist
7 years 6 days ago #61439 by mel
Have you tried disabling the "Open Graph - Content" plugin and just leaving the "Open Graph - JReviews" plugin enabled? If you don't have any normal Joomla content on the page and just have JReviews listings, then a quick fix would be to disable the "Open Graph - Content" plugin.

However, If you need to keep the plugin enabled, you could make a small code change to see if it helps.
In /plugins/opengraph/content/content.php at line 322, try replacing:
if(get_class($article) == 'JTableContent')
with
if(!is_array($article) && get_class($article) == 'JTableContent')

I can't reproduce the error you're having on my test site with JReviews, so that code snippet is untested. What version of JReviews are you using?

-Melissa
The topic has been locked.
Active Subscriptions:

None
7 years 3 days ago - 7 years 3 days ago #61482 by bsnlin
Hi,

I have replace with
if(!is_array($article) && get_class($article) == 'JTableContent')
and now work !!
I can Overrides the file ? "templates/YOUR_TEMPLATE/html"
Last edit: 7 years 3 days ago by bsnlin.
The topic has been locked.
Support Specialist
7 years 3 days ago #61484 by mel
Thanks for letting me know. Overriding plugin files in the template override is not standard with Joomla, so you can't do that. However, this is a relatively straightforward change that I should be able to get this into the next release. I've already checked in the change for the next version.

-Melissa
The topic has been locked.