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

PHP8 issue #291

Closed
sparkktv opened this issue Jul 31, 2022 · 2 comments
Closed

PHP8 issue #291

sparkktv opened this issue Jul 31, 2022 · 2 comments

Comments

@sparkktv
Copy link

sparkktv commented Jul 31, 2022

Testing PHP 8 in my localhost using MAMP. And running the latest version of Helix Ultimate and Helix Ultimate Template on Joomla 4.1.5. When I use PHP 8, it get the error 0
mb_strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)
on every page of my site, but if I downgrade back to PHP 7.4 then the site works without issues. It is indeed a Helix issue as I switched over the the Joomla 4 default template Cassiopeia template and the site worked fine in PHP8.
I'm just wondering when this will be fixed because the release notes say the latest version has PHP8 support but this doesn't seem to be the case.

@sparkktv
Copy link
Author

Here is the call stack... It is related to Widgetkit, however it only occurs when using a Helix Ultimate template. I tested with J4 default template Cassiopeia & Joomlart T4 Framework and the error does not occur, so it is something in Helix Framework causing the error.
`Call stack

Function Location

1 () JROOT/administrator/components/com_widgetkit/src/Content/Content.php:185
2 mb_strpos() JROOT/administrator/components/com_widgetkit/src/Content/Content.php:185
3 YOOtheme\Widgetkit\Content\Content::truncate() JROOT/administrator/components/com_widgetkit/plugins/widgets/list/views/widget.php:62
4 require() JROOT/administrator/components/com_widgetkit/vendor/yootheme/framework/src/View/View.php:198
5 YOOtheme\Framework\View\View->evaluate() JROOT/administrator/components/com_widgetkit/vendor/yootheme/framework/src/View/View.php:177
6 YOOtheme\Framework\View\View->render() JROOT/administrator/components/com_widgetkit/src/Widget/Widget.php:49
7 YOOtheme\Widgetkit\Widget\Widget->render() JROOT/administrator/components/com_widgetkit/src/Application.php:174
8 YOOtheme\Widgetkit\Application->renderWidget() JROOT/plugins/content/widgetkit/widgetkit.php:20
9 plgContentWidgetkit->{closure}()
10 call_user_func() JROOT/administrator/components/com_widgetkit/src/Helper/Shortcode.php:35
11 YOOtheme\Widgetkit\Helper\Shortcode->YOOtheme\Widgetkit\Helper{closure}()
12 preg_replace_callback() JROOT/administrator/components/com_widgetkit/src/Helper/Shortcode.php:23
13 YOOtheme\Widgetkit\Helper\Shortcode->parse() JROOT/plugins/content/widgetkit/widgetkit.php:21
14 plgContentWidgetkit->onContentPrepare() JROOT/libraries/src/Plugin/CMSPlugin.php:285
15 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
16 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
17 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/HTML/Helpers/Content.php:48
18 Joomla\CMS\HTML\Helpers\Content::prepare() JROOT/libraries/src/HTML/HTMLHelper.php:297
19 Joomla\CMS\HTML\HTMLHelper::call() JROOT/libraries/src/HTML/HTMLHelper.php:125
20 Joomla\CMS\HTML\HTMLHelper::_() JROOT/modules/mod_custom/mod_custom.php:19
21 include() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:54
22 Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher{closure}() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:57
23 Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() JROOT/libraries/src/Helper/ModuleHelper.php:295
24 Joomla\CMS\Helper\ModuleHelper::renderRawModule() JROOT/libraries/src/Helper/ModuleHelper.php:167
25 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:102
26 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT/libraries/src/Document/Renderer/Html/ModulesRenderer.php:48
27 Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render() JROOT/libraries/src/Document/HtmlDocument.php:597
28 Joomla\CMS\Document\HtmlDocument->getBuffer() JROOT/libraries/src/Document/HtmlDocument.php:903
29 Joomla\CMS\Document\HtmlDocument->_renderTemplate() JROOT/libraries/src/Document/HtmlDocument.php:668
30 Joomla\CMS\Document\HtmlDocument->render() JROOT/libraries/src/Application/CMSApplication.php:1039
31 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:802
32 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:284
33 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
34 require_once() JROOT/index.php:32`

@sparkktv
Copy link
Author

Found the issue, you can close this. It's now working. It was a single widgetkit module causing the issue and it was due to a typo on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant