-
Notifications
You must be signed in to change notification settings - Fork 57
Menu Trail by Path - ERROR #438
Comments
ahoy drush pm-uninstall menu_trail_by_path |
Can you check if you have |
Hey Si, we certainly do have it enabled. Whilst I found a work around to fix the lack of 'active-trail' of book navigation, it will obviously be good to get this resolved at some point by the module maintainers. Thanks! |
Ok yeah, upstream incompatibility. Ideally the distro would warn or prevent installing both. This upstream ticket for the record. In theory if you have menu_trail_by_path installed then you don't want the Context functionality related to menu_trails, so context module gets out of the way. https://www.drupal.org/project/context/issues/3018331 |
I usually do my own breadcrumbs in the theme layer. The saas tools are generally lacking. |
I wanted this module to see if it would help with book navigation output. The default template does not add any Was able to add 'book-tree.html.twig' to the theme and customise accordingly: {% macro book_links(items, attributes, menu_level) %} {% endif %} {% for item in items %} {% if item.in_active_trail == TRUE %} <li{{ item.attributes }} class="book-list-item active-trail"> {% else %} <li{{ item.attributes }} class="book-list-item"> {% endif %} {{ link(item.title, item.url) }} {% if item.below %} {{ book_tree.book_links(item.below, attributes, menu_level + 1) }} {% endif %} {% endfor %} {% endif %} {% endmacro %} |
A patch for this was released some time ago. https://www.drupal.org/project/context/issues/3018331 I've updated a local GovCMS 8 code base and found it to work as advertised. I can now install both modules without error. |
Thanks for this info. We will need to wait until the patch is rolled into the next stable version of the Menu Trail by Patch module so we keep stable releases in the distribution without patches. |
@Belhendo - The patch was created six months ago, and the last release of Context (that this patch is for) was released 3 years ago... so maybe "wait for release" isn't the best idea when the simple act of enabling a module can white screen and entire site. |
@Belhendo @tobybellwood @simesy What is GovCMS's proposed action for when a module maintainer is not actively monitoring or updating a module that is part of the GovCMS distro? The Context module has a number of maintainers listed, but all bar one seems to have not touched it for quite some time. I've tried to contact the one maintainer that seems to still be around, but I'm not sure if he received my message (need to wait and see). The 'Menu Trail By Path' is a very useful module so it is a shame that another module that is equally very useful isn't being maintained properly and as such causes a WSD. Is it possible that GovCMS can fork either module as part of the distribution so that both module work in parallel? What I'm getting at is how can issues like this be avoided when modules in the distro are not properly maintained? |
On local Dev enable this module and got the following error which has killed the site. Will need to use drush to disable the module. Enabling a module in the disto should never kill a site.
The website encountered an unexpected error. Please try again later.
TypeError: Argument 5 passed to Drupal\menu_trail_by_path\MenuTrailByPathActiveTrail::__construct() must implement interface Drupal\menu_trail_by_path\Path\PathHelperInterface, instance of Drupal\context\ContextManager given, called in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 301 in Drupal\menu_trail_by_path\MenuTrailByPathActiveTrail->__construct() (line 51 of modules/contrib/menu_trail_by_path/src/MenuTrailByPathActiveTrail.php).
The text was updated successfully, but these errors were encountered: