No Code Attached Yet
avatar dbrezina
dbrezina
30 Jan 2018

Steps to reproduce the issue

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.

Expected result

Tag filtering should work and list all articles with tag.

Actual result

Blank screen with Call to a member function get() on string error

System information (as much as possible)

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

Additional comments

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.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar dbrezina dbrezina - open - 30 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jan 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jan 2018
Status New Discussion
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jan 2018

Can't confirm. Click on Tag works as expected.

System information

  • 3.8.4-rc2
  • Multilanguage Site (4 Lang.) & Test English (GB) Sample Data
  • Template: Protostar
  • macOS Sierra, 10.12.6
  • Firefox 58 (64-bit)

MAMP 4.2

  • Apache-Server
  • PHP 7.0.22
  • MySQLi 5.6.35
avatar brianteeman
brianteeman - comment - 30 Jan 2018

Perhaps its a php 7.2 issue?

avatar dbrezina
dbrezina - comment - 30 Jan 2018

Well, I tried 7.1.13, 7.0.2 and nothing changed. Probably not a PHP related issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jan 2018

(7.1.13 didn´t change a thing)

also 7.1 issue possible.

avatar brianteeman
brianteeman - comment - 30 Jan 2018

Looking at your site it would appear not to be using joomla article or joomla tags but K2 instead

avatar dbrezina
dbrezina - comment - 30 Jan 2018

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar dbrezina
dbrezina - comment - 30 Jan 2018

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar mbabker
mbabker - comment - 30 Jan 2018

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).

avatar dbrezina
dbrezina - comment - 30 Jan 2018

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar csthomas
csthomas - comment - 30 Jan 2018

Do you have error_log file in your joomla folder?

avatar mbabker
mbabker - comment - 30 Jan 2018

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.

avatar csthomas
csthomas - comment - 30 Jan 2018

Please disable plugin System Fields for a while and check again.

avatar dbrezina
dbrezina - comment - 30 Jan 2018

Disabling the System - Field plugin made it all work again.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar csthomas
csthomas - comment - 30 Jan 2018

I'm not familiar with this plugin, I probably can not help more.

avatar mbabker
mbabker - comment - 30 Jan 2018

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

avatar ReLater
ReLater - comment - 30 Jan 2018

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.

avatar laoneo
laoneo - comment - 31 Jan 2018

Can you add some instructions how we can reproduce the issue by our own?

avatar dbrezina
dbrezina - comment - 31 Jan 2018

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).

avatar Quy
Quy - comment - 7 Feb 2018

@dbrezina Please upgrade/test with v3.8.5 and enable the System - Field plugin.

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Feb 2018
Status Discussion Information Required
avatar dbrezina
dbrezina - comment - 7 Feb 2018

@Quy Hi - after update to 3.8.5 I can confirm that the error is still the same. WIth System - Field plugin enabled a I get the very same error with very same behaviour.

avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Feb 2018
Status Information Required Discussion
avatar butlerps
butlerps - comment - 7 Feb 2018

@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.

avatar DJBenz
DJBenz - comment - 12 Feb 2018

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar Quy
Quy - comment - 12 Feb 2018

@DJBenz Are you using custom code? Please provide steps/setup to reproduce.

avatar DJBenz
DJBenz - comment - 12 Feb 2018

@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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar mbabker
mbabker - comment - 12 Feb 2018

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).

avatar DJBenz
DJBenz - comment - 12 Feb 2018

@mbabker

Call to a member function get() on string
/home/mgfred1/public_html/plugins/content/jw_disqus/jw_disqus.php:108
Call stack

Function Location

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar Quy
Quy - comment - 12 Feb 2018

Both @dbrezina @dbrezina have the Disqus plugin installed. Please disable Disqus plugin and not System - Field plugin and test again.

avatar mbabker
mbabker - comment - 12 Feb 2018

So in your case the JoomlaWorks Disqus plugin is triggering the error when it's receiving the onContentPrepare event.

avatar DJBenz
DJBenz - comment - 12 Feb 2018

@Quy

With System - Field = enabled and Disqus Content Plugin = disabled, I can confirm the error no longer occurs.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar Quy Quy - change - 12 Feb 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-02-12 16:52:12
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2018
Closed_Date 2018-02-12 16:52:12 2018-02-12 16:52:13
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 12 Feb 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 12 Feb 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19487

avatar Quy
Quy - comment - 12 Feb 2018

@DJBenz Thanks for confirming. Closing as it is a plugin issue. Please report it to JoomlaWorks.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19487.

avatar laoneo
laoneo - comment - 12 Feb 2018

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.

avatar joomla-cms-bot joomla-cms-bot - change - 12 Feb 2018
Status Closed New
Closed_Date 2018-02-12 16:52:13
Closed_By joomla-cms-bot
avatar Quy Quy - change - 12 Feb 2018
Status New Pending
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 12 Feb 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 12 Feb 2018

Set to "open" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19487

avatar brianteeman
brianteeman - comment - 12 Feb 2018

beat me to it ;)

avatar Quy
Quy - comment - 13 Feb 2018

@dbrezina @DJBenz There is a report @ Joomlaworks regarding this issue that you may want to add/follow.

avatar fcoulter
fcoulter - comment - 13 Feb 2018

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.

avatar laoneo
laoneo - comment - 14 Feb 2018

Agree, the params should be a Registry object.

avatar Quy
Quy - comment - 14 Feb 2018

@fcoulter Can you please submit a PR? Thanks.

avatar fcoulter
fcoulter - comment - 14 Feb 2018

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

avatar Quy
Quy - comment - 14 Feb 2018

I don't know either. @laoneo Your input, please.

avatar fcoulter
fcoulter - comment - 14 Feb 2018

I have made the pull request anyway, I think it can do no harm to include this.

avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Feb 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-02-14 19:27:19
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 14 Feb 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 14 Feb 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Feb 2018

closed as having Pull Request #19680

avatar Salgrev
Salgrev - comment - 17 Oct 2018

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 ?

Add a Comment

Login with GitHub to post a comment