Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ydahi created an issue. See original summary.

anzcar’s picture

Hey, you are correct, these two modules do cause fatal error and break a site. Problem is they both alter "menu.active_trail" service by applying own class and adding different arguments.

Here is a quick fix that solves fatal error and gives Menu Trail by Path ability to manipulate Menus and warns users that Context Menu reactions are handled by Menu Trail by Path module instead of Context module. (Added two checks - one in ContextServiceProvider and one in .module.)

anzcar’s picture

Status: Active » Needs review
anzcar’s picture

Corrected a typo.

bzoks’s picture

Title: Install fails if module Menu Trail by Path is install » Install fails if module Menu Trail by Path is installed
Status: Needs review » Reviewed & tested by the community

Reviewed patch in #4, tested and works as expected.

Stephen Ollman’s picture

Tested patch against a Drupal GovCMS 8 distribution and works as advertised,

Thanks!

Stephen Ollman’s picture

Will this patch be rolled out soon?

A number of sites are waiting for it to become part of the stable release.

maticb’s picture

I think this is being held back by the fact that there is a hardcoded reference to another module. If this patch would go through, I think it should be on a more general level, e.g.: "If you are using a different menu service provider, this may not work", and the purpose of this patch should be to catch any such examples, not just one specific module.

How exactly to implement this, is a different question. We would need to somehow figure out if any of the installed modules overrides this, and then show this warning (dynamic - not with hardcoded values to only 1 module)

paulocs’s picture

Status: Reviewed & tested by the community » Needs work

I agree with @maticb.
Let's see if we find a better solution.

paulocs’s picture

Status: Needs work » Needs review
FileSize
3.26 KB

Hello @all,
here is a new patch.
I don't know if the best approach but what I did is that I verified if the core service were changed before. If so, it will display a warning like patch #4 telling the user that this reaction will not work.

Thanks.

paulocs’s picture

Status: Needs review » Needs work

The last submitted patch, 11: context-Install_fails-3018331-d8-11.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

paulocs’s picture

Status: Needs work » Needs review
FileSize
3.23 KB

Fix code standard.

Status: Needs review » Needs work

The last submitted patch, 13: context-Install_fails-3018331-d8-13.patch, failed testing. View results

paulocs’s picture

Status: Needs work » Needs review

  • paulocs committed 634c801 on 8.x-4.x
    Issue #3018331 by paulocs, anzcar, Stephen Ollman, ydahi, bzoks, maticb...
paulocs’s picture

Status: Needs review » Fixed

Fixed in dev branch.

AaronBauman’s picture

cross-posting #3170929: ContainerNotInitializedException: \Drupal::$container is not initialized yet.

looks like this change is causing a fatal error during bootstrap

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.