Hello,
We received the message today in the admin interface, there is a new OpneGraph version available.
We updated and after that certain pages were broken, primarily a page that only contained a Jumi plugin, no further content.
Error message was:
Call to a member function get()
Activating Joomly debug and error modes yielded no further details, probably because the plugin disables it.
Any idea what might be wrong?
Best regards
Carsten
OpenGraph plugin breaks
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph plugin breaks
Hi, plugin does not have any tool to somehow disable debug information.
Do you really have any more information about the problem? What is the screenshot. In Joomla! any error message should display debug information including the tree of called functions
What plugin do you use? Content or System? Which version?
Jan
Do you really have any more information about the problem? What is the screenshot. In Joomla! any error message should display debug information including the tree of called functions
What plugin do you use? Content or System? Which version?
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 22 Apr 2020, 12:18
Re: OpenGraph plugin breaks
I had the same problem using content plugin after the last update.
call to a member function get() on null
Changed line 447 of phocaopengraph.php to:
} else if ($active->params && $active->params->get('menu-meta_description') != '') { // menu link meta description
And now it's working again.
call to a member function get() on null
Changed line 447 of phocaopengraph.php to:
} else if ($active->params && $active->params->get('menu-meta_description') != '') { // menu link meta description
And now it's working again.
-
- Phoca Newbie
- Posts: 4
- Joined: 01 Jun 2016, 12:15
Re: OpenGraph plugin breaks
Thank you! That solution fixed it for me, too.
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Aug 2019, 14:34
Re: OpenGraph plugin breaks
jmartinr > Excellent! I had the same issue and spend a few hours on finding the cause. Thanks. I changed the code in line 447 and problem solved.
I have two sites which use this plugin and only one had the "call to a member function get() on null" error. Other site worked fine.
Jan > I can set up a testsite with this error if you want to do more investigation.
I have two sites which use this plugin and only one had the "call to a member function get() on null" error. Other site worked fine.
Jan > I can set up a testsite with this error if you want to do more investigation.
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph plugin breaks
Hi, no, thank you, I don't need to test it, the solution is right.
I only changed it from:
to
so it does not throw a warning in PHP7.4
Please, test to upgrade to version 3.1.12
https://github.com/PhocaCz/PhocaOpenGra ... 3.1.12.zip
and if it will be all OK, than I will officially release it.
Anyway thank you very much to all for testing and reporting.
Jan
I only changed it from:
Code: Select all
} else if ($active->params && $active->params->get('menu-meta_description') != '') { // menu link meta description
Code: Select all
} else if (!empty($active->params->get('menu-meta_description')) && $active->params->get('menu-meta_description') != '') { // menu link meta description
Please, test to upgrade to version 3.1.12
https://github.com/PhocaCz/PhocaOpenGra ... 3.1.12.zip
and if it will be all OK, than I will officially release it.
Anyway thank you very much to all for testing and reporting.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Aug 2019, 14:34
Re: OpenGraph plugin breaks
Just did the upgrade to 3.1.12. Works fine.
But in admin backend when you set the error reporting in global configuration to option "Maximum" I see this error on my pages:
Notice: Trying to get property 'params' of non-object in /www/plugins/content/phocaopengraph/phocaopengraph.php on line 447.
If you keep error reporting on option "System Default" everything looks ok on all pages.
But in admin backend when you set the error reporting in global configuration to option "Maximum" I see this error on my pages:
Notice: Trying to get property 'params' of non-object in /www/plugins/content/phocaopengraph/phocaopengraph.php on line 447.
If you keep error reporting on option "System Default" everything looks ok on all pages.
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph plugin breaks
Hmmm, which PHP version do you run?
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph plugin breaks
Try to test it now, the version is the same:
https://github.com/PhocaCz/PhocaOpenGra ... 3.1.12.zip
(but I have added some isset there). Just upgrade on your site with the same version and let me know (be sure the zip file is the one download now).
Jan
https://github.com/PhocaCz/PhocaOpenGra ... 3.1.12.zip
(but I have added some isset there). Just upgrade on your site with the same version and let me know (be sure the zip file is the one download now).
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 22 Aug 2019, 14:34
Re: OpenGraph plugin breaks
ok downloaded that file, did the upgrade and now the error message is gone. I am on php 7.2.28 btw.
Thanks!
Thanks!