Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESOLVED] Apparent login module crash when upgrading Joomla 4 website to php 8.0 #38749

Closed
roscofil opened this issue Sep 13, 2022 · 13 comments
Closed

Comments

@roscofil
Copy link

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

@brianteeman
Copy link
Contributor

  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

@roscofil
Copy link
Author

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.

@roscofil
Copy link
Author

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.

@brianteeman
Copy link
Contributor

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?)

@roscofil
Copy link
Author

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.

@brianteeman
Copy link
Contributor

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

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

@roscofil
Copy link
Author

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.

@roscofil
Copy link
Author

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.

@Abernyte-Git
Copy link

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.

@roscofil
Copy link
Author

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.

@roscofil
Copy link
Author

@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.

@brianteeman
Copy link
Contributor

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

@roscofil roscofil changed the 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 Sep 14, 2022
@roscofil
Copy link
Author

Agreed...
Thanks for helping, man!


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

@alikon alikon closed this as completed Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants