No Code Attached Yet
avatar ariesmitskamp
ariesmitskamp
14 Jan 2022

Steps to reproduce the issue

Change article category and save

Expected result

Change gets saved

Actual result

An error has occurred.
0 array_count_values(): Argument #1 ($array) must be of type array, string given

System information (as much as possible)

php 8.0.14
Joomla 4.0.5
MariaDB 10.5.13

Additional comments

avatar ariesmitskamp ariesmitskamp - open - 14 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Jan 2022
avatar ariesmitskamp
ariesmitskamp - comment - 14 Jan 2022

Website was migrated from Joomla3.10. We cannot reproduce the issue under fresh Joomla4 installs. Could it be that old php code is touched on the update?

avatar richard67
richard67 - comment - 14 Jan 2022

@ariesmitskamp If you switch on "Debug System" in Global Configuration in backend then you would get a stack trace with this error. Can you do that and report back? We could know then if it is one of the PHP 8 issues which we already fixed and which will be available with the next 4.0.6 release, or if it is something different and if so, if we already have a report for that or not.

Thanks in advance.

avatar ariesmitskamp
ariesmitskamp - comment - 14 Jan 2022

Hi @richard67 hereby the stack trace. It could be that a 3rd party plugin is the problem. If so, sorry for disturbing you. Just want to help in testing and this is the first time in 12 years Joomla that I report an issue...

`Call stack

Function Location

1 () JROOT/plugins/system/sywautoreset/sywautoreset.php:205
2 array_count_values() JROOT/plugins/system/sywautoreset/sywautoreset.php:205
3 plgSystemSYWAutoReset->onContentBeforeSave() JROOT/libraries/src/Plugin/CMSPlugin.php:285
4 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
5 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
6 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/MVC/Model/AdminModel.php:1391
7 Joomla\CMS\MVC\Model\AdminModel->save() JROOT/administrator/components/com_content/src/Model/ArticleModel.php:832
8 Joomla\Component\Content\Administrator\Model\ArticleModel->save() JROOT/libraries/src/MVC/Controller/FormController.php:705
9 Joomla\CMS\MVC\Controller\FormController->save() JROOT/libraries/src/MVC/Controller/BaseController.php:730
10 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
11 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
13 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
14 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
16 require_once() JROOT/administrator/index.php:32`

avatar richard67
richard67 - comment - 14 Jan 2022

If you unpublish disable the system plugin "sywautoreset", does the error still happen?

avatar ariesmitskamp
ariesmitskamp - comment - 14 Jan 2022

No it doesn't, so this was a false alarm sorry. Thank you for your help. I'll report it to the extension developer.

avatar richard67 richard67 - change - 14 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-14 14:50:54
Closed_By richard67
avatar richard67 richard67 - close - 14 Jan 2022
avatar richard67
richard67 - comment - 14 Jan 2022

Closing as not a core issue.

Add a Comment

Login with GitHub to post a comment