No Code Attached Yet
avatar hmed95
hmed95
30 Oct 2023

Steps to reproduce the issue

Migrated from j4.4 to 5

Expected result

Actual result

error msg

System information (as much as possible)

Call Stack

Function Location

1 () 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/components/com_content/src/View/Article/HtmlView.php:248
6 Joomla\Component\Content\Site\View\Article\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
7 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/src/Controller/DisplayController.php:122
8 Joomla\Component\Content\Site\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
10 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/components/com_content/src/Dispatcher/Dispatcher.php:56
11 Joomla\Component\Content\Site\Dispatcher\Dispatcher->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

Additional comments

avatar hmed95 hmed95 - open - 30 Oct 2023
avatar hmed95 hmed95 - change - 30 Oct 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Oct 2023
avatar Fedik
Fedik - comment - 30 Oct 2023

This happens because one of installed plugin is returning a wrong result.
I suspect it something like:

function onContentBeforeDisplay()
{
  return false;
}

However in Joomla 5 only a string value is allowed for this event.
You need to find that plugin and update to compatible version.

avatar hmed95
hmed95 - comment - 30 Oct 2023

thanks! any idea how to get the plugin name ?


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

avatar Fedik
Fedik - comment - 30 Oct 2023

Change this line

$event->addResult($result);

To:

try {
    $event->addResult($result);
} catch (\Throwable $e) {
    dd(sprintf('Group: %s, Name: %s', $this->_type, $this->_name));
}

It should show you plugin group and plugin name.

And revert this changes afterward.

avatar hmed95
hmed95 - comment - 30 Oct 2023

awesome, its coming from komento !!


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

avatar Fedik Fedik - close - 30 Oct 2023
avatar Fedik Fedik - change - 30 Oct 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-10-30 10:27:55
Closed_By Fedik
avatar Fedik
Fedik - comment - 30 Oct 2023

Good that you found it. If you need more help you always can ask on joomla forum https://forum.joomla.org/

Add a Comment

Login with GitHub to post a comment