Is there a chance that https://www.drupal.org/project/menu_link_attributes will be merged for D8 in this project -- so that issues can easily be tracked?

At the moment it has an error on the latest Drupal 8.2.x version.

Fatal error: Call to a member function first() on null in /var/www/sites/sfwmd.dev/docroot/modules/contrib/menu_link_attributes/menu_link_attributes.module on line 161

The menu_link_content has a 3 part plugin ID already: [plugin-type]:[uuid]:[menu-id]. In the above module

it limits the emplode to 2 parts only: list($entity_type, $uuid) = explode(':', $plugin_id, 2);

Thus when this is called: $entity = \Drupal::entityManager()->loadEntityByUuid($entity_type, $uuid); it returns to null sicne there is an extra [menu-id] in the $uuid variable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnrosswvsu created an issue. See original summary.

johnrosswvsu’s picture

This patch would probably fix it.