No Code Attached Yet
avatar roscofil
roscofil
13 Sep 2022

Steps to reproduce the issue

Have a website using a std Login module which is working just fine with Joomla 4.2.2 and php 7.4.x
Activated php 8.0: website crashes with "count(): Argument #1 ($value) must be of type Countable|array, null given" error message on frontend.
Go to admin panel, turn off the login panel module: the site gets back to life without problems.

Expected result

Login panel should be working ok.

Actual result

Crash as seen on the attached image (crash.jpg)

System information (as much as possible)

Joomla 4.2.2
php running on Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
MySQL 5.7.38-log
PHP version: 8.0.22
Template by Smartaddons (SJ TopDeal)
Joomshopping 5.0.7 (declared by Joomshopping as compatible with php 8screen shot 2022-09-13 at 10 18 23

Additional comments

No additional error message when turning debug to maximum

Thanks and best regards

Philippe

avatar roscofil roscofil - open - 13 Sep 2022
avatar roscofil roscofil - change - 13 Sep 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 13 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Sep 2022
avatar brianteeman
brianteeman - comment - 13 Sep 2022
  1. Please enable debug in the global configuration and repeat. That should give more verbose error messages
  2. Please switch to cassiopeia and repeat step 1
avatar roscofil
roscofil - comment - 13 Sep 2022

Hello,

Thx for your reply:

  1. Switched debug to on and error reporting to maximum, login module enabled.
    Got the following error:

Uncaught Throwable of type TypeError thrown with message "count(): Argument #1 ($value) must be of type Countable|array, null given". Stack trace: #0 [ROOT]/modules/mod_login/mod_login.php(34): require() #1 [ROOT]/libraries/src/Dispatcher/ModuleDispatcher.php(52): include('/homepages/5/d6...') #2 [ROOT]/libraries/src/Dispatcher/ModuleDispatcher.php(55): Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher{closure}('/homepages/5/d6...', NULL) #3 [ROOT]/libraries/src/Helper/ModuleHelper.php(276): Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() #4 [ROOT]/libraries/src/Helper/ModuleHelper.php(161): Joomla\CMS\Helper\ModuleHelper::renderRawModule(Object(stdClass), Object(Joomla\Registry\Registry), Array) #5 [ROOT]/libraries/src/Document/Renderer/Html/ModuleRenderer.php(99): Joomla\CMS\Helper\ModuleHelper::renderModule(Object(stdClass), Array) #6 [ROOT]/libraries/src/Document/Renderer/Html/ModulesRenderer.php(50): Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render(Object(stdClass), Array, NULL) #7 [ROOT]/libraries/src/Document/HtmlDocument.php(565): Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render('cart', Array, NULL) #8 [ROOT]/libraries/src/Document/HtmlDocument.php(847): Joomla\CMS\Document\HtmlDocument->getBuffer('modules', 'cart', Array) #9 [ROOT]/libraries/src/Document/HtmlDocument.php(633): Joomla\CMS\Document\HtmlDocument->_renderTemplate() #10 [ROOT]/libraries/src/Application/CMSApplication.php(1017): Joomla\CMS\Document\HtmlDocument->render(false, Array) #11 [ROOT]/libraries/src/Application/SiteApplication.php(714): Joomla\CMS\Application\CMSApplication->render() #12 [ROOT]/libraries/src/Application/CMSApplication.php(299): Joomla\CMS\Application\SiteApplication->render() #13 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute() #14 [ROOT]/index.php(32): require_once('/homepages/5/d6...') #15 {main}

  1. Switched template to Cassiopeia and restarted: got the same message when the login module is enabled.

Thx

Philippe


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

avatar roscofil
roscofil - comment - 13 Sep 2022

It seems to clearly be coming from the login component/module: I unpublished the faulty module, tried to recreate one from scratch, using any position of the template and it always fail...


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

avatar brianteeman
brianteeman - comment - 13 Sep 2022

please post the stack trace from when you are using cassiopeia

(also accodring to the smartaddons site you are not alone in having issues with their templates and 4.2 - have you contacted them for support?)

avatar roscofil
roscofil - comment - 13 Sep 2022

Yes, I did contact them but they indicated that this was probably due to the Joomla Login module and that I should contact the Joomla team :-)

Stack trace with Cassiopeia below...Looks the same to me...

error - Uncaught Throwable of type TypeError thrown with message "count(): Argument #1 ($value) must be of type Countable|array, null given". Stack trace: #0 [ROOT]/modules/mod_login/mod_login.php(34): require()\n#1 [ROOT]/libraries/src/Dispatcher/ModuleDispatcher.php(52): include('/homepages/5/d6...')\n#2 [ROOT]/libraries/src/Dispatcher/ModuleDispatcher.php(55): Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher\{closure}('/homepages/5/d6...', NULL)\n#3 [ROOT]/libraries/src/Helper/ModuleHelper.php(276): Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch()\n#4 [ROOT]/libraries/src/Helper/ModuleHelper.php(161): Joomla\CMS\Helper\ModuleHelper::renderRawModule(Object(stdClass), Object(Joomla\Registry\Registry), Array)\n#5 [ROOT]/libraries/src/Document/Renderer/Html/ModuleRenderer.php(99): Joomla\CMS\Helper\ModuleHelper::renderModule(Object(stdClass), Array)\n#6 [ROOT]/libraries/src/Document/Renderer/Html/ModulesRenderer.php(50): Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render(Object(stdClass), Array, NULL)\n#7 [ROOT]/libraries/src/Document/HtmlDocument.php(565): Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render('cart', Array, NULL)\n#8 [ROOT]/libraries/src/Document/HtmlDocument.php(847): Joomla\CMS\Document\HtmlDocument->getBuffer('modules', 'cart', Array)\n#9 [ROOT]/libraries/src/Document/HtmlDocument.php(633): Joomla\CMS\Document\HtmlDocument->_renderTemplate()\n#10 [ROOT]/libraries/src/Application/CMSApplication.php(1017): Joomla\CMS\Document\HtmlDocument->render(false, Array)\n#11 [ROOT]/libraries/src/Application/SiteApplication.php(714): Joomla\CMS\Application\CMSApplication->render()\n#12 [ROOT]/libraries/src/Application/CMSApplication.php(299): Joomla\CMS\Application\SiteApplication->render()\n#13 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()\n#14 [ROOT]/index.php(32): require_once('/homepages/5/d6...')\n#15 {main}


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

avatar brianteeman
brianteeman - comment - 13 Sep 2022

include('/homepages/5/d6...')

This tells me that something connected with the template is still running

avatar roscofil
roscofil - comment - 13 Sep 2022

HmmmmProblem is I am not sure I can see what the thing is...I'll try again...


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

avatar roscofil
roscofil - comment - 13 Sep 2022

Is there any way to expand the path in this stack trace or to find it elsewhere? Dump?


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

avatar Abernyte-Git
Abernyte-Git - comment - 14 Sep 2022

Does the template have a mod_login override?


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

avatar roscofil
roscofil - comment - 14 Sep 2022

You may be right. Am not near my system but I’ll check when back. Should I then just simply remove it?
Thx for the heads up.

avatar roscofil
roscofil - comment - 14 Sep 2022

@Abernyte-Git:

You were right! Thisis what causes the issue!
Didn't think about checking this...Thanks so much for pointing it. Will now have to have smartaddons figure how to fix it...

Cheers

Philippe


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

avatar brianteeman
brianteeman - comment - 14 Sep 2022

That's what I thought it would be but you said it had the same error when using cassiopeia and that should not have been using the template override. weird

avatar roscofil roscofil - change - 14 Sep 2022
Title
Apparent login module crash when upgrading Joomla 4 website to php 8.0
[RESOLVED] Apparent login module crash when upgrading Joomla 4 website to php 8.0
avatar roscofil roscofil - edited - 14 Sep 2022
avatar roscofil
roscofil - comment - 14 Sep 2022

Agreed...
Thanks for helping, man!


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

avatar alikon alikon - change - 14 Sep 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-09-14 17:41:55
Closed_By alikon
avatar alikon alikon - close - 14 Sep 2022

Add a Comment

Login with GitHub to post a comment