No Code Attached Yet
avatar xhorizont
xhorizont
27 Sep 2021

Loged into backend when selecting Home Dashboard in language other then English I get error:

array_unshift(): Argument #1 ($array) must be of type array, null given

avatar xhorizont xhorizont - open - 27 Sep 2021
avatar joomla-cms-bot joomla-cms-bot - change - 27 Sep 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Sep 2021
avatar brianteeman
brianteeman - comment - 27 Sep 2021

Which language?

avatar xhorizont
xhorizont - comment - 27 Sep 2021

Slovenian

avatar infograf768
infograf768 - comment - 27 Sep 2021

I can't reproduce the error here.

avatar xhorizont
xhorizont - comment - 27 Sep 2021

I'm using PHP8

avatar brianteeman
brianteeman - comment - 27 Sep 2021

Same here and no problem.

Can you enable debug mode and see if there are more details in the error such as a stack trace.

avatar xhorizont
xhorizont - comment - 27 Sep 2021

Is it possible to do something with language file. This is error from RSComment and only happens with Slovenian language:

 **Moji komentarji**  **Naroči se**

0

array_unshift(): Argument #1 ($array) must be of type array, null given

 **Domača stran**

Call stack

| Function | Location

1 | () | JROOT/libraries/src/Language/Text.php:212
2 | array_unshift() | JROOT/libraries/src/Language/Text.php:212
3 | Joomla\CMS\Language\Text::plural() | JROOT/components/com_rscomments/helpers/rscomments.php:1458
4 | RSCommentsHelper::humanReadableDate() | JROOT/components/com_rscomments/views/rscomments/tmpl/default_item.php:53
5 | include() | JROOT/libraries/src/MVC/View/HtmlView.php:429
6 | Joomla\CMS\MVC\View\HtmlView->loadTemplate() | JROOT/components/com_rscomments/views/rscomments/tmpl/default_items.php:13
7 | include() | JROOT/libraries/src/MVC/View/HtmlView.php:429
8 | Joomla\CMS\MVC\View\HtmlView->loadTemplate() | JROOT/components/com_rscomments/views/rscomments/tmpl/default.php:83
9 | include() | JROOT/libraries/src/MVC/View/HtmlView.php:429
10 | Joomla\CMS\MVC\View\HtmlView->loadTemplate() | JROOT/components/com_rscomments/helpers/rscomments.php:1167
11 | RSCommentsHelper::showComments() | JROOT/components/com_rscomments/helpers/rscomments.php:1074
12 | RSCommentsHelper::showRSComments() | JROOT/plugins/content/rscomments/rscomments.php:116
13 | plgContentRSComments->onContentAfterDisplay() | JROOT/libraries/src/Plugin/CMSPlugin.php:285
14 | Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() | JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
15 | Joomla\Event\Dispatcher->dispatch() | JROOT/libraries/src/Application/EventAware.php:111
16 | Joomla\CMS\Application\WebApplication->triggerEvent() | JROOT/components/com_content/src/View/Article/HtmlView.php:249
17 | Joomla\Component\Content\Site\View\Article\HtmlView->display() | JROOT/libraries/src/MVC/Controller/BaseController.php:692
18 | Joomla\CMS\MVC\Controller\BaseController->display() | JROOT/components/com_content/src/Controller/DisplayController.php:125
19 | Joomla\Component\Content\Site\Controller\DisplayController->display() | JROOT/libraries/src/MVC/Controller/BaseController.php:730
20 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
21 | Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() | JROOT/components/com_content/src/Dispatcher/Dispatcher.php:55
22 | Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch() | JROOT/libraries/src/Component/ComponentHelper.php:389
23 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT/libraries/src/Application/SiteApplication.php:206
24 | Joomla\CMS\Application\SiteApplication->dispatch() | JROOT/libraries/src/Application/SiteApplication.php:245
25 | Joomla\CMS\Application\SiteApplication->doExecute() | JROOT/libraries/src/Application/CMSApplication.php:278
26 | Joomla\CMS\Application\CMSApplication->execute() | JROOT/includes/app.php:63
27 | require_once() | JROOT/index.php:32

avatar brianteeman
brianteeman - comment - 27 Sep 2021

From the stack trace you have provided the problem is 100% coming from rscomments and as you say it works fine in english then yes you are almost certainly correct that its an issue with the language file for rscomments.

I've never used rscomments but I am guessing you have a module on your home dashboard to display the latest comments. If so you could try and unpublish that admin module.

avatar xhorizont
xhorizont - comment - 28 Sep 2021

IS it posible that it has something to do with my server setup.
I have PHP 8.0.10, mysql Ver 15.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 and Server version: Apache/2.4.41 (Ubuntu)
Server built: 2021-09-23T16:58:57

avatar brianteeman
brianteeman - comment - 3 Oct 2021

I doubt it very much but as I have not seen the code from rscomments I cannot say 100%

What I can say 100% is that this is not an issue with the core of joomla

avatar chmst chmst - change - 3 Oct 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-10-03 08:10:57
Closed_By chmst
avatar chmst
chmst - comment - 3 Oct 2021

Closing this as it is not Joomla core. @xhorizont the forum.joomla.org is is a better place for such questions.

avatar chmst chmst - close - 3 Oct 2021

Add a Comment

Login with GitHub to post a comment