No Code Attached Yet bug
avatar HLeithner
HLeithner
6 Sep 2023

@angieradtke reported

com_tags view tagged items 0, Event onContentBeforeDisplay only accepts String results.

() JROOT\libraries\src\Event\Result\ResultTypeStringAware.php:67
2 Joomla\CMS\Event\Content\BeforeDisplayEvent->typeCheckResult() JROOT\libraries\src\Event\Result\ResultAware.php:64
3 Joomla\CMS\Event\Content\BeforeDisplayEvent->addResult() JROOT\libraries\src\Plugin\CMSPlugin.php:297
4 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:454
5 Joomla\Event\Dispatcher->dispatch() JROOT\libraries\src\Application\EventAware.php:111
6 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT\components\com_tags\src\View\Tag\HtmlView.php:207
7 Joomla\Component\Tags\Site\View\Tag\HtmlView->display() JROOT\libraries\src\MVC\Controller\BaseController.php:697
8 Joomla\CMS\MVC\Controller\BaseController->display() JROOT\components\com_tags\src\Controller\DisplayController.php:68
9 Joomla\Component\Tags\Site\Controller\DisplayController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:730
10 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\libraries\src\Dispatcher\ComponentDispatcher.php:143
11 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT\libraries\src\Component\ComponentHelper.php:361
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\SiteApplication.php:218
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT\libraries\src\Application\SiteApplication.php:261
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:306
15 Joomla\CMS\Application\CMSApplication->execute() JROOT\includes\app.php:58
16 require_once() JROOT\index.php:32

avatar HLeithner HLeithner - open - 6 Sep 2023
avatar joomla-cms-bot joomla-cms-bot - change - 6 Sep 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Sep 2023
avatar Fedik
Fedik - comment - 6 Sep 2023

I suspect one of legacy plugin do return false or return true for this event.
That does not make sense for this event.

avatar Fedik Fedik - change - 6 Sep 2023
Labels Added: bug
avatar Fedik Fedik - labeled - 6 Sep 2023
avatar Fedik
Fedik - comment - 6 Sep 2023

This one

public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
{
$app = $this->getApplication();
$view = $app->getInput()->get('view');
$print = $app->getInput()->getBool('print');
if ($print) {
return false;
}

Should be just return; or return '';
I will do PR later

avatar angieradtke
angieradtke - comment - 6 Sep 2023

I disable plugins/content/vote and the issue is gone

avatar Fedik Fedik - close - 6 Sep 2023
avatar Fedik
Fedik - comment - 6 Sep 2023

Please test #41616

avatar Fedik Fedik - change - 6 Sep 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-09-06 13:22:23
Closed_By Fedik

Add a Comment

Login with GitHub to post a comment