You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
after upgrading to 5.5, one of my menu items of a custom component (that is not providing a router), it doesn't produce a clean SEF URL, based on the alias of the menu item, but it also appends various query parameters based on the options set on the menu item.
After researching, I ended up checking the Gantry\Framework\Menu and comparing it to the mod_menu Helper.
There is some difference between Gantry and Joomla mod_menu for the menu items.
In Joomla, when there is a menu item - Joomla transforms the menu item link to something like: $link = 'index.php?Itemid=' . $menuItem->id;
Then, later on it produces the SEF URL with JRoute::_($link);
Gantry on the other hand, inside the createMenuItem() just uses the link of the menu item like so: $link = $menuItem->link; and that's what it sends to the JRoute...
So, this in general produces an inconsistency on how a Joomla menu item SEF URL will be generated when using a core Joomla module or Gantry Menu.
I didn't check any < 5.4 versions of Gantry... but in Gantry\Framework\Menu::createMenuItem() it mentions that it has been copied from Joomla 3.4 and that "We should keep the contents of the function similar to Joomla in order to review it against any changes."
So, I am not sure how this works in Gantry 5.4 or earlier - and if there have been any changes there ... also I don't know if there are any changes and when in Joomla menu module.
But in this particular site, that specific menu item starts to produce a not very nice SEF URL, right after updating to Gantry5.5
The text was updated successfully, but these errors were encountered:
@mahagr
I didn't have the time to test it... Most likely during the weekend or on Monday.
By the way, I just noticed this #2938... is it related with this one?
Hello,
after upgrading to 5.5, one of my menu items of a custom component (that is not providing a router), it doesn't produce a clean SEF URL, based on the alias of the menu item, but it also appends various query parameters based on the options set on the menu item.
After researching, I ended up checking the
Gantry\Framework\Menu
and comparing it to the mod_menu Helper.There is some difference between Gantry and Joomla mod_menu for the menu items.
In Joomla, when there is a menu item - Joomla transforms the menu item link to something like:
$link = 'index.php?Itemid=' . $menuItem->id;
Then, later on it produces the SEF URL with
JRoute::_($link);
Gantry on the other hand, inside the
createMenuItem()
just uses the link of the menu item like so:$link = $menuItem->link;
and that's what it sends to theJRoute
...So, this in general produces an inconsistency on how a Joomla menu item SEF URL will be generated when using a core Joomla module or Gantry Menu.
I didn't check any < 5.4 versions of Gantry... but in
Gantry\Framework\Menu::createMenuItem()
it mentions that it has been copied from Joomla 3.4 and that "We should keep the contents of the function similar to Joomla in order to review it against any changes."So, I am not sure how this works in Gantry 5.4 or earlier - and if there have been any changes there ... also I don't know if there are any changes and when in Joomla menu module.
But in this particular site, that specific menu item starts to produce a not very nice SEF URL, right after updating to Gantry5.5
The text was updated successfully, but these errors were encountered: