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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | easy_breadcrumb_breaks_the_form_for_removing_module_content_entities_data_before_uninstallation-3164758-003.patch | 887 bytes | stefan.korn |
Comments
Comment #2
stefan.kornComment #3
stefan.kornThis is patch which should fix it
Comment #4
stefan.kornComment #5
greg boggsLooks good. :)
Comment #6
ankit agrawal commentedI have tried the patch in #3 and it works well for the issue reported (for removing module content entities data before uninstallation).
Comment #7
ankit agrawal commentedComment #8
neslee canil pinto+1, #3 solves the issue, after doing the steps to reproduce.
Comment #10
neslee canil pintoCommitted to dev. Thanks