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:
- 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.
- 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!