jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => Bugs! => Topic started by: thilo2621 on 04.10.2023 10:24:32

Title: content plugin - [Fixed in 4.0.35]
Post by: thilo2621 on 04.10.2023 10:24:32
joomla 4.3.4
jdownloads 4.0.34

Hi,

The content plugin is enable and working fine in an article i.e. {jd_file file==6379}, the same in not working when place it in the short description of a download - the page can't be displayed and this error is shown:
array_replace(): Argument #1 ($array) must be of type array, string given
Thank you for your help solving this issue

Title: Re: content plugin
Post by: ColinM on 04.10.2023 12:39:48
Hi
I confirm this problem. Tested using jD4.0.34 - Set error reporting to Maximum and set Debug System in Global Config

Got two  initial warnings:
Warning: Undefined array key 146 in \components\com_jdownloads\src\Helper\LegacyRouter.php on line 162
Warning: Trying to access array offset on value of type null in \components\com_jdownloads\src\Helper\LegacyRouter.php on line 162

Error Details
array_replace(): Argument #1 ($array) must be of type array, string given

Error Trace
Call stack
#    Function                                        Location
1    ()                                     JROOT\libraries\src\Document\Document.php:619
2    array_replace()                            JROOT\libraries\src\Document\Document.php:619
3    Joomla\CMS\Document\Document->addStyleSheet()          JROOT\plugins\content\jdownloads\jdownloads.php:154
4    PlgContentJDownloads->onContentPrepare()             JROOT\libraries\src\Plugin\CMSPlugin.php:284
5    Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()    JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:486
6    Joomla\Event\Dispatcher->dispatch()                   JROOT\libraries\src\MVC\View\AbstractView.php:249
7    Joomla\CMS\MVC\View\AbstractView->dispatchEvent()       JROOT\components\com_jdownloads\src\View\Category\HtmlView.php:258
8    JDownloads\Component\JDownloads\Site\View\Category\HtmlView->display()    JROOT\libraries\src\MVC\Controller\BaseController.php:645
9    Joomla\CMS\MVC\Controller\BaseController->display()    JROOT\components\com_jdownloads\src\Controller\DisplayController.php:123
10    JDownloads\Component\JDownloads\Site\Controller\DisplayController->display()    JROOT\libraries\src\MVC\Controller\BaseController.php:678
11    Joomla\CMS\MVC\Controller\BaseController->execute()       JROOT\libraries\src\Dispatcher\ComponentDispatcher.php:143
12    Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()       JROOT\components\com_jdownloads\src\Dispatcher\Dispatcher.php:60
13    JDownloads\Component\JDownloads\Site\Dispatcher\Dispatcher->dispatch()    JROOT\libraries\src\Component\ComponentHelper.php:361
14    Joomla\CMS\Component\ComponentHelper::renderComponent()    JROOT\libraries\src\Application\SiteApplication.php:208
15    Joomla\CMS\Application\SiteApplication->dispatch()          JROOT\libraries\src\Application\SiteApplication.php:249
16    Joomla\CMS\Application\SiteApplication->doExecute()       JROOT\libraries\src\Application\CMSApplication.php:293
17    Joomla\CMS\Application\CMSApplication->execute()          JROOT\includes\app.php:61
18    require_once()                               JROOT\index.php:32
Title: Re: content plugin
Post by: thilo2621 on 04.10.2023 17:08:34
for your information and to be complete: in Joomla 3.10.12 and jdownloads 3.9.8.7 it's just working fine
Title: Re: content plugin
Post by: Arno on 09.10.2023 13:15:05
Hi,
QuoteGot two  initial warnings:
Warning: Undefined array key 146 in \components\com_jdownloads\src\Helper\LegacyRouter.php on line 162
Warning: Trying to access array offset on value of type null in \components\com_jdownloads\src\Helper\LegacyRouter.php on line 162
Okay, will be fixed in next release. Coming soon.
Title: Re: content plugin
Post by: Arno on 09.10.2023 15:33:11
Hi,
please try the fix in this topic:
https://www.jdownloads.com/forum/index.php?topic=14085.msg50246#msg50246