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
When installing a module having a menu and a template already and using that menu, an error may occur: InvalidArgumentException: The URI '' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 291 of core/lib/Drupal/Core/Url.php).
This is because regular menu templates have items with a title and a link.
But currently the template will not get items with these entries, since after #74 these are replaced with the entries label and path.
Since there is no link entry, fromUri() will break after.
Even without this error, the menu entries won't get displayed correctly, since the template is not getting the expected items title and link.
Steps to reproduce:
This error can be seen following these steps:
Require the contrib module menu_item_extras;
Enable it together with "Menu Item Extras Demo Base";
Place the "Menu Item Extras Demo Menu" block in the section "Navbar branding";
Check the front page, the error will show.
This is because the mentioned menu has already their own templates. When trying to use them, the described problem happens.
The text was updated successfully, but these errors were encountered:
The code for adapting the menu to the templates of oe_bootstrap_theme are better placed in a preprocess for the nav pattern, instead of a preprocess of the menus. Like this, only the menus using the nav pattern will be affected by the changes needed in this theme.
Another possibility is to adapt the preprocess of the menus to not remove the existing items fields (title, url, attributes), but to only add the needed ones for the BCL templates (label, path, attributes).
Description
When installing a module having a menu and a template already and using that menu, an error may occur:
InvalidArgumentException: The URI '' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 291 of core/lib/Drupal/Core/Url.php).
This is because regular menu templates have items with a title and a link.
But currently the template will not get items with these entries, since after #74 these are replaced with the entries label and path.
Since there is no link entry,
fromUri()
will break after.Even without this error, the menu entries won't get displayed correctly, since the template is not getting the expected items title and link.
Steps to reproduce:
This error can be seen following these steps:
menu_item_extras
;This is because the mentioned menu has already their own templates. When trying to use them, the described problem happens.
The text was updated successfully, but these errors were encountered: