No Code Attached Yet
avatar RedDustSnow
RedDustSnow
4 Oct 2021

Steps to reproduce the issue

Migrated my site to J4.03 successfully.
Once up, Changed PHP from 7.4 to php8

Expected result

The site would run as expected, without error.

Actual result

Got a fatal error on the frontend on certain pages (eg https://reddustsnow.com.au/outback-nsw-touring-watershed-loop.html)

File: ../libraries/vendor/joomla/string/src/phputf8/mbstring/core.php
Line: 24
Error: mb_strlen(): Argument #1 ($string) must be of type string, array given

System information (as much as possible)

Joomla! 4.0.3 Stable
Web Server: LiteSpeed

Additional comments

DEBUG STACK:

Function Location

1 () JROOT/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php:24
2 mb_strlen() JROOT/libraries/vendor/joomla/string/src/phputf8/mbstring/core.php:24
3 utf8_strlen() JROOT/libraries/vendor/joomla/string/src/StringHelper.php:262
4 Joomla\String\StringHelper::strlen() JROOT/libraries/src/Cache/Cache.php:694
5 Joomla\CMS\Cache\Cache::setWorkarounds() JROOT/libraries/src/Cache/Controller/CallbackController.php:131
6 Joomla\CMS\Cache\Controller\CallbackController->get() JROOT/libraries/src/Helper/ModuleHelper.php:670
7 Joomla\CMS\Helper\ModuleHelper::moduleCache() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:96
8 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT/plugins/content/loadmodule/loadmodule.php:179
9 PlgContentLoadmodule->_load() JROOT/plugins/content/loadmodule/loadmodule.php:85
10 PlgContentLoadmodule->onContentPrepare() JROOT/libraries/src/Plugin/CMSPlugin.php:285
11 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
12 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
13 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/components/com_content/src/View/Article/HtmlView.php:240
14 Joomla\Component\Content\Site\View\Article\HtmlView->display() JROOT/libraries/src/Cache/Controller/ViewController.php:102
15 Joomla\CMS\Cache\Controller\ViewController->get() JROOT/libraries/src/MVC/Controller/BaseController.php:683
16 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/src/Controller/DisplayController.php:125
17 Joomla\Component\Content\Site\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:730
18 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
19 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/components/com_content/src/Dispatcher/Dispatcher.php:55
20 Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
21 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:206
22 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:245
23 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
24 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
25 require_once() JROOT/index.php:32

Note {closure} in #11... Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}()

Joomla forum told me it is a core issue.
First time I have done this so hoping all there. Please note this is a live (production) site it is currently running php7.4

Regards
Simon B

avatar RedDustSnow RedDustSnow - open - 4 Oct 2021
avatar RedDustSnow RedDustSnow - change - 4 Oct 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Oct 2021
avatar carlitorweb
carlitorweb - comment - 4 Oct 2021

Following the link: https://reddustsnow.com.au/outback-nsw-touring-watershed-loop.html did not thrown any error.

Also, is 4.02 or 4.0.3?

avatar RedDustSnow
RedDustSnow - comment - 4 Oct 2021

Hi carlitorweb, no it won't as it is my production site, so had to revert to php7.4. Creates a fatal error.

J4.03 . Sorry for confusion


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35744.
avatar RedDustSnow RedDustSnow - change - 4 Oct 2021
The description was changed
avatar RedDustSnow RedDustSnow - edited - 4 Oct 2021
avatar RedDustSnow
RedDustSnow - comment - 26 Oct 2021

Hi guys, I thought I might have seen some update on the reported issue with the release of 4.0.4. Non listed.

So I thought I would update and try with 4.0.4 to see if any of the updates inadvertently fixed the issue.

It didn't.
error-cache-on

BUT, I discovered that it is related to the system cache. If the cache is off, the page/s display without the mentioned error.
page-cache-off

  • Browser cache was cleared *

Any clues?

Regards

Simon

avatar brianteeman
brianteeman - comment - 27 Oct 2021

I am guessing that the problem is occurring on pages where you have loaded a module in the content item?

If that guess is correct what module is it and what are the contents of that module

avatar RedDustSnow
RedDustSnow - comment - 27 Oct 2021

Hi Brian, thanks for your reply.

Yes, there are several modules, custom content modules. Each contains an image, some text, but also a link to a banner in the form <a href="component/banners/click/39.html....

Could that be the issue?

avatar brianteeman
brianteeman - comment - 27 Oct 2021

I dont know but the more information the better to try and find the problem

avatar RedDustSnow
RedDustSnow - comment - 27 Oct 2021

Ok, also running sliders/tabs on that page.

When the problem presents, it is across most, but not all of the (Joomla) content; those custom modules are probably across a similar amount of pages.
I will strip down the mentioned page and do some testing. I will need to do it in the morning AUS time, As it is a production site.

Gives me something to work with though. I will check back tomorrow.

avatar RedDustSnow
RedDustSnow - comment - 27 Oct 2021

Ok, found it.

It was the OS Download link at the bottom of the page.

But, why would it only creates the issue when the system cache is on.

Simon
PS, a relief to discover the conflict as php8 was the main reason I went to J4 early (Love it by the way!)

avatar brianteeman
brianteeman - comment - 27 Oct 2021

Sorry I don't know the code in os downloads so you will do best speaking to the developers. Glad you found the source

avatar RedDustSnow
RedDustSnow - comment - 27 Oct 2021

A bit more...

If I put the link to the download (that is in the custom module) directly in the article, it works fine.
BUT... if I put that same code into a new custom module... the error happens.

So it appears to be a conflict between the custom module and the download button {osdownloads download_button 04 "Download"}, when the page is built.

I will let them know.

avatar RedDustSnow
RedDustSnow - comment - 27 Oct 2021

PS... thanks for helping me pinpoint the issue @brianteeman, appreciated!

avatar chmst chmst - change - 28 Oct 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-10-28 06:30:08
Closed_By chmst
avatar chmst chmst - close - 28 Oct 2021
avatar chmst
chmst - comment - 28 Oct 2021

Then I close this issue for now. Thanks @ALL for help and feedback.

Add a Comment

Login with GitHub to post a comment