Helix Ultimate System Plugin Overrides Incompatible with Joomla 6.2 (triggerEvent, mod_breadcrumbs JSON Escaping, mod_login Parameters)
- Product: JoomShaper Helix Ultimate (
plg_system_helixultimate/shaper_helixultimate) - Product Version:
2.2.11 - Joomla Version:
6.2.0(PHP8.4) - File:
plugins/system/helixultimate/overrides/(com_content/category/blog.php,mod_breadcrumbs/default.php,mod_login/default.php, andcom_content/form/edit.php)
What the Bug Is
Several template overrides bundled inside plugins/system/helixultimate/overrides/ remain on Joomla 4/5 patterns that break or miss core features on Joomla 6.2:
com_content/category/blog.phpcalls$app->triggerEvent(...)(deprecated/removed in favor of typedDispatcherInterface::dispatch()events) and checks!empty($this->children[$this->category->id])instead of$this->category->hasVisibleChildren(...).mod_breadcrumbs/default.phpencodes JSON-LD schema inside anapplication/ld+jsonscript block withoutJSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT.mod_login/default.phprenders the password reset and username reminder links unconditionally without checking$params->get('showPasswordReset', 1)and$params->get('showUsernameReminder', 1).com_content/form/edit.phpomits the Joomla 6imgclass_introandimgclass_fulltextfields.
How to Reproduce It
- Install Helix Ultimate
2.2.11on Joomla6.2.0. - Run Joomla's Template Overrides Update Check in Administrator -> System -> Templates -> Site Templates, or render a Category Blog view / Login module with
showPasswordResetdisabled.
Fix (Unified Patch Against Clean plg_system_helixultimate 2.2.11)
--- a/plugins/system/helixultimate/overrides/com_content/category/blog.php
+++ b/plugins/system/helixultimate/overrides/com_content/category/blog.php
@@ -17,20 +17,16 @@
HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers');
-$app = Factory::getApplication();
-
-// Content events
+$dispatcher = Factory::getContainer()->get(\Joomla\Event\DispatcherInterface::class);
$this->category->text = $this->category->description;
-$app->triggerEvent('onContentPrepare', array($this->category->extension . '.categories', &$this->category, &$this->params, 0));
+$contentEventArguments = ['context' => $this->category->extension . '.categories', 'subject' => $this->category, 'params' => $this->params, 'page' => 0];
+$dispatcher->dispatch('onContentPrepare', new \Joomla\CMS\Event\Content\ContentPrepareEvent('onContentPrepare', $contentEventArguments));
$this->category->description = $this->category->text;
-
-$results = $app->triggerEvent('onContentAfterTitle', array($this->category->extension . '.categories', &$this->category, &$this->params, 0));
+$results = $dispatcher->dispatch('onContentAfterTitle', new \Joomla\CMS\Event\Content\AfterTitleEvent('onContentAfterTitle', $contentEventArguments))->getArgument('result', []);
$afterDisplayTitle = trim(implode("\n", $results));
-
-$results = $app->triggerEvent('onContentBeforeDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0));
+$results = $dispatcher->dispatch('onContentBeforeDisplay', new \Joomla\CMS\Event\Content\BeforeDisplayEvent('onContentBeforeDisplay', $contentEventArguments))->getArgument('result', []);
$beforeDisplayContent = trim(implode("\n", $results));
-
-$results = $app->triggerEvent('onContentAfterDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0));
+$results = $dispatcher->dispatch('onContentAfterDisplay', new \Joomla\CMS\Event\Content\AfterDisplayEvent('onContentAfterDisplay', $contentEventArguments))->getArgument('result', []);
$afterDisplayContent = trim(implode("\n", $results));
// Columns + Helix blog list type
@@ -188,7 +184,7 @@
</div>
<?php endif; ?>
- <?php if ($this->maxLevel != 0 && !empty($this->children[$this->category->id])) : ?>
+ <?php if ($this->maxLevel != 0 && $this->category->hasVisibleChildren($this->getCurrentUser()->getAuthorisedViewLevels(), (bool) $this->params->get('show_empty_categories', 0))) : ?>
<div class="com-content-category-blog__children cat-children">
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
<h3> <?php echo Text::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
--- a/plugins/system/helixultimate/overrides/mod_breadcrumbs/default.php
+++ b/plugins/system/helixultimate/overrides/mod_breadcrumbs/default.php
@@ -118,7 +118,7 @@
/** @var WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
$prettyPrint = JDEBUG ? JSON_PRETTY_PRINT : 0;
- $wa->addInline('script', json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | $prettyPrint), [], ['type' => 'application/ld+json']);
+ $wa->addInline('script', json_encode($data, JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE | $prettyPrint), [], ['type' => 'application/ld+json']);
}
?>
</nav>
--- a/plugins/system/helixultimate/overrides/mod_login/default.php
+++ b/plugins/system/helixultimate/overrides/mod_login/default.php
@@ -119,12 +119,16 @@
<?php $usersConfig = ComponentHelper::getParams('com_users'); ?>
<div class="mod-login__options list-group">
+ <?php if ($params->get('showPasswordReset', 1)) : ?>
<a class="mod-login__reset list-group-item" href="/<?php echo Route::_('index.php?option=com_users&view=reset'); ?>">
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?>
</a>
+ <?php endif; ?>
+ <?php if ($params->get('showUsernameReminder', 1)) : ?>
<a class="mod-login__remind list-group-item" href="/<?php echo Route::_('index.php?option=com_users&view=remind'); ?>">
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?>
</a>
+ <?php endif; ?>
<?php if ($usersConfig->get('allowUserRegistration')) : ?>
<a class="mod-login__register list-group-item" href="/<?php echo Route::_('index.php?option=com_users&view=registration'); ?>">
<?php echo Text::_('MOD_LOGIN_REGISTER'); ?>
--- a/plugins/system/helixultimate/overrides/com_content/form/edit.php
+++ b/plugins/system/helixultimate/overrides/com_content/form/edit.php
@@ -95,6 +95,7 @@
<?php echo $this->form->renderField('image_intro', 'images'); ?>
<?php echo $this->form->renderField('image_intro_alt', 'images'); ?>
<?php echo $this->form->renderField('image_intro_alt_empty', 'images'); ?>
+ <?php echo $this->form->renderField('imgclass_intro', 'images'); ?>
<?php echo $this->form->renderField('image_intro_caption', 'images'); ?>
<?php echo $this->form->renderField('float_intro', 'images'); ?>
</div>
@@ -103,6 +104,7 @@
<?php echo $this->form->renderField('image_fulltext', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext_alt', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext_alt_empty', 'images'); ?>
+ <?php echo $this->form->renderField('imgclass_fulltext', 'images'); ?>
<?php echo $this->form->renderField('image_fulltext_caption', 'images'); ?>
<?php echo $this->form->renderField('float_fulltext', 'images'); ?>
</div>