He System Plugin Writes `helix_id` Into The Request Input On Every Page Load, Which Silently Switches Off Joomla's "Strict Routing" 301 Redirects - Question | JoomShaper

is live, now with multi-currency selling.

He System Plugin Writes `helix_id` Into The Request Input On Every Page Load, Which Silently Switches Off Joomla's "Strict Routing" 301 Redirects

Goran

Goran

Helix Framework 2 weeks ago

Hello,

on: plugins/system/helixultimate/helixultimate.php, onAfterRoute(), line 426:

// Legacy framework identifier consumed by downstream Helix scripts.
$this->app->input->set('helix_id', 9);

This runs unconditionally, on every site and administrator request. The value is read back in plugins/system/helixultimate/src/Platform/Helper.php:276 as a fallback template style id.

Joomla's System - SEF plugin has the option "Strict Routing" ("Prevent the router from accepting a lot of URLs which are deemed as duplicates and will automatically redirect to the correct URL with a 301"). Its implementation, plugins/system/sef/src/Extension/Sef.php, enforceSEF() (lines 528-549), takes the whole request input, builds the SEF URL from it and redirects only if nothing is left in the query string:

$parsedVars = $app->getInput()->getArray();
...
$newRoute = Route::_($parsedVars, false);
$newUri   = new Uri($newRoute);

if (!\count($newUri->getQuery(true)) && $route !== $newRoute) {
    $app->redirect($newRoute, 301);
}

On our site the Helix listener runs before Sef::onAfterRoute() (we listed the listeners of the event during a request), so by that time the input already contains helix_id. The router does not know that variable, leaves it in the query string, and the condition above is never true. Strict Routing therefore never redirects a non-SEF URL on a site that uses Helix Ultimate.

We messuared:

Request: /?option=com_content&view=article&id=45 (an article that has its own menu item), Strict Routing = Yes, URL rewriting on.

  • With Helix Ultimate enabled: status 200. The URL Joomla builds at that point is /skadarlija/uslovi-koriscenja?helix_id=9, so the leftover parameter blocks the redirect and the article stays reachable under the non-SEF address.
  • With only the Helix Ultimate system plugin excluded from the same run: status 301, Location: localhost/skadarlija/uslovi-koriscenja.

We have not tried this on a clean installation; we expect the same result there, because both pieces of code are unconditional.

If it is possible please:

  1. Do not store the identifier in the request input. A property on the plugin or helper, or $app->set(), would keep it away from the router; or set it only for the Helix com_ajax requests that need it.
  2. A question: is the constant 9 intended? Helper.php:276 uses it as a template style id whenever no other id was resolved.

Thank you!

0
1 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 week ago #234152

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. I’ve informed our development team about the issue. Once I receive an update from them, I’ll let you know.

Best regards,

Toufiqur Rahman (Team Lead, Support)

0