Problem/Motivation

Easy breadcrumb breaks the form for removing module content entities data before uninstallation of an module, which is called when trying to uninstall a module that has content entities data created, the path is /admin/modules/uninstall/entity/{entity_type_id}.

The error message is
InvalidArgumentException: The controller for URI "" is not callable. in Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition() (line 75 of core\lib\Drupal\Core\Controller\ControllerResolver.php)

This is referenced in [#3071782/#18]. And there is also a core issue #2862702: PrepareModulesEntityUninstallForm::formTitle does not exist about that. While imho there is something wrong in core here too and fixing the core issue would also fix this issue, I would propose to fix this in Easy Breadcrumb too. Because although there is something wrong in core, core is not breaking the form like Easy Breadcrumb does (because core does not seem to call the title resolver here). And fixing in Easy Breadcrumb would have the benefit to asure that wrong implementations of title callback from anywhere else would also not break the page.

Setting Priority to "Major" because this is breaking drupal core functionality.

Steps to reproduce

  • Enable Easy Breadcrumb with setting "Include the current page as a segment in the breadcrumb" true (default on installation)
  • Enable taxonomy module
  • Create a taxonomy vocabulary
  • Create a taxonomy term in that vocubary
  • Try to uninstall taxonomy module
  • You are pointed to delete taxonomy terms first before been able to uninstall
  • Follow the link given to delete the taxonomy terms
  • Exception is given like described above

Note: This happens on uninstall for any other module that has content entities data created.

Proposed resolution

Fix this by catching the exception resulting from not existing title callback.

Remaining tasks

Create a patch

User interface changes

None

API changes

None

Data model changes

None

Comments

stefan.korn created an issue. See original summary.

stefan.korn’s picture

Issue summary: View changes
stefan.korn’s picture

Assigned: stefan.korn » Unassigned
Status: Active » Needs review
StatusFileSize
new887 bytes

This is patch which should fix it

stefan.korn’s picture

Issue summary: View changes
greg boggs’s picture

Looks good. :)

ankit agrawal’s picture

I have tried the patch in #3 and it works well for the issue reported (for removing module content entities data before uninstallation).

ankit agrawal’s picture

Status: Needs review » Reviewed & tested by the community
neslee canil pinto’s picture

+1, #3 solves the issue, after doing the steps to reproduce.

neslee canil pinto’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev. Thanks

Status: Fixed » Closed (fixed)

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