Clicking on any tag at https://www.hifi-voice.com/ will give you Call to a member function get() on string error and blank screen. Worked in 3.8.3. Changed also the typ of tag list and still the same error.
Tag filtering should work and list all articles with tag.
Blank screen with Call to a member function get() on string error
PHP 7.2.1 (7.1.13 didn´t change a thing)
MySQL 10.1.26
Linux uvirt64 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64
There was no update in components / plugin / modules, there isn´t any strange extension used, everything should be from well-known providers. Hosted at www.active24.cz.
Status | New | ⇒ | Discussion |
Perhaps its a php 7.2 issue?
Well, I tried 7.1.13, 7.0.2 and nothing changed. Probably not a PHP related issue.
(7.1.13 didn´t change a thing)
also 7.1 issue possible.
Looking at your site it would appear not to be using joomla article or joomla tags but K2 instead
With ALL 7.x.x PHP version was everything working with J! 3.8.3. Right after update whichever version of PHP i use, tags don´t seem to work. Still doing a template check to be sure this ain´t the issue.
And I am using the Component > Tags solution, not the tags from K2. The K2 tag system is applied only in here https://www.hifi-voice.com/kde-nakoupit/itemlist/category/2-dovozci, for standard articles the standard Joomla tag system is used.
Please enable debug mode and set error reporting to maximum. With any luck, a stack trace should be printed showing the exact path to that error message, that will help in determining where any issue may lie.
If your template has an error.php
file, you may need to temporarily rename this if it doesn't support printing extra error info like a stack trace (core's default error template will do this).
So I enabled maximum error reporting and renamed the error.php in my template. The only message I get is stil the same. Only one line of error Call to a member function get() on string. No details. Only the default error.php comes with more messages around the error. Trying to find another way.
Do you have error_log file in your joomla folder?
The fact there isn't the word "error" before the message means the error template isn't correctly being rendered at all, that's not a good sign.
If you don't have an error_log
file, try enabling the logging plugin and have it log all messages (or at a minimum the "error" category), our error handler has logic to log errors there which will include the stack trace info. If that still doesn't get anything useful, the only other thing I can think of as a quick measure to get the extra info is a print_r($error);die;
in the error handler.
Please disable plugin System Fields for a while and check again.
Disabling the System - Field plugin made it all work again.
I'm not familiar with this plugin, I probably can not help more.
If it's indeed the plugin that's emitting the error and not something it's calling, https://github.com/joomla/joomla-cms/blob/3.8.4/plugins/system/fields/fields.php#L370 would be the problematic line (and looks logical) as it seems the params would still be a string and not converted to (presumably) a Registry instance. The question is why.
//cc @laoneo
So I enabled maximum error reporting and renamed the error.php in my template. The only message I get is stil the same. Only one line of error Call to a member function get() on string. No details. Only the default error.php comes with more messages around the error. Trying to find another way.
@dbrezina : You should enable debug mode, too. Like mbabker recommended.
Can you add some instructions how we can reproduce the issue by our own?
I haven´t done anything special actually. I am using about 200 tags on the website, there´s nothing special, the temlate is basicaly constructed like this:
<?php if($this->countModules('breadcrumbs')) : ?> <div id="breadcrumbs" class="wrapper"> <jdoc:include type="modules" name="breadcrumbs" style="xhtml" /> </div> <?php endif; ?>
I simply updated the website from 3.8.3. to 3.8.4 with the online update. Right after that everything was alright despite when you clicked on the tag listed in every article, as a menu item, simply anywhere the tag was used - and you got a blank page with the message of "Call to...". Simple disabling of the plugin recommended by csthomas helped and didn´t break any function used on the website (I do not use any custom fields anywhere).
Status | Discussion | ⇒ | Information Required |
Status | Information Required | ⇒ | Discussion |
@dbrezina - I've just experienced the same problem and eventually found the (well at least my) cause. Mine was a custom module that I created which used the active menu item object $active = JFactory::getApplication()->getMenu()->getActive();
I then stored the active page heading into a variable $pageHeading = $active->params->get('page_heading');
This worked fine until I tried to click on one of the article tags to bring up a list of all articles with that tag. Bottom line: the tag page, because it was not associated with a menu item didn't have a $active object so the get() warning made sense. surrounding my get() in an if statement solved my problem.
$pageHeading = ''; if (is_object($active)){ $pageHeading = $active->params->get('page_heading'); }
Your issue may be something similar. Do you have a menu item for the tag component? I didn't and On hindsight If I had created a menu item (on a 'hidden' menu so it wasn't visible) of type: 'tag' this will have solved my problem as there would then be an active menu item for me to get the heading. It's worth a shot if you don't have the tag component as a menu item.
Can confirm I've had the same issue on my site http://www.horrortalk.com/
PHP 7.0.27
Joomla! 3.8.5 Stable [ Amani ] 6-February-2018 15:00 GMT
Linux a2ss45.a2hosting.com 2.6.32-773.26.1.lve1.4.43.el6.x86_64 #1 SMP Mon Oct 30 02:31:47 EDT 2017 x86_64
MySQLi 5.6.23
Disabling the System - Field plugin also fixed the issue for me.
@Quy No custom code that I'm aware of. I have exactly the same issue as @dbrezina in that after 3.8.5 update, clicking on any tag gives the 'Call to a member function get() on string' error.
Assigning tags to a hidden menu, as suggested by @butlerps didn't work for me.
I've re-enabled the System - Field plugin to manifest the issue, you can see the error by clicking any tag, e.g. https://www.horrortalk.com/component/tags/tag/kealan-patrick-burke.html
To properly diagnose the issue we need a stack trace to the error. Set error reporting to maximum and enable debug mode. You may need to temporarily rename your template's error.php
file if your template does not support printing a stack trace.
This will help to find the exact location in the code the error is being triggered from, information that has been missing since this item was opened (right now all we can see is that the error exists but without knowing where to trace the error to it is difficult to fix).
Call to a member function get() on string
/home/mgfred1/public_html/plugins/content/jw_disqus/jw_disqus.php:108
Call stack
1 () JROOT/plugins/content/jw_disqus/jw_disqus.php:108
2 plgContentJw_disqus->renderDisqus() JROOT/plugins/content/jw_disqus/jw_disqus.php:47
3 plgContentJw_disqus->onContentPrepare() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/components/com_tags/views/tag/view.html.php:99
6 TagsViewTag->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
7 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_tags/controller.php:52
8 TagsController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_tags/tags.php:15
10 require_once() JROOT/libraries/src/Component/ComponentHelper.php:382
11 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:357
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:303
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
So in your case the JoomlaWorks Disqus plugin is triggering the error when it's receiving the onContentPrepare
event.
With System - Field = enabled and Disqus Content Plugin = disabled, I can confirm the error no longer occurs.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-12 16:52:12 |
Closed_By | ⇒ | Quy |
Closed_Date | 2018-02-12 16:52:12 | ⇒ | 2018-02-12 16:52:13 |
Closed_By | Quy | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19487
@DJBenz Thanks for confirming. Closing as it is a plugin issue. Please report it to JoomlaWorks.
Is the code publicly available? If yes, can somebody please point to the code. Just want to make sure we didn't introduce a BC break.
Please reopen till I could confirm.
Status | Closed | ⇒ | New |
Closed_Date | 2018-02-12 16:52:13 | ⇒ | |
Closed_By | joomla-cms-bot | ⇒ |
Status | New | ⇒ | Pending |
Closed_Date | 0000-00-00 00:00:00 | ⇒ |
Set to "open" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19487
beat me to it ;)
@dbrezina @DJBenz There is a report @ Joomlaworks regarding this issue that you may want to add/follow.
It seems to be that the issue is happening in the plugin apparently because com_tags is passing the parameters to the disqus content plugin onContentPrepare event handler as a string, ie
function onContentPrepare($context, &$row, &$params, $page = 0)
so possibly this is a Joomla bug after all, since presumably the params should be an object of type Registry
Or not, as the case may be, depending on whether this is intentional or not.
Agree, the params should be a Registry object.
I can do, I found in my tests that you can fix the issue by forcing the params to be a Registry object before calling the content plugin events in components/com_tags/views/tag/view.html.php, eg insert on line 98
if (is_string($itemElement->core_params))
{
$itemElement->core_params = new Registry($itemElement->core_params);
}
But what is puzzling is why this is now necessary, it doesn't seem to be due to a change in com_tags
I have made the pull request anyway, I think it can do no harm to include this.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-14 19:27:19 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/19487
I have encountered the error with com_tags/views/tag/view.html.php, when trying to select in a menu an existing tag.
The correction proposed by fcoulter on feb 14th works fine up to now. The line nbr changes on every new version of Joomla. Could it be corrected in the official version of tag/view.html.php ?
Can't confirm. Click on Tag works as expected.
System information
MAMP 4.2