Problem/Motivation
Enable this module and menu_item_extras
Fatal error: Cannot redeclare template_preprocess_menu_link_content() (previously declared in /var/www/html/docroot/modules/contrib/menu_item_extras/menu_item_extras.theme.inc:20) in /var/www/html/docroot/modules/contrib/menu_link_content_revisions_ui/menu_link_content_revisions_ui.theme.inc on line 17
Steps to reproduce
Enable both modules.
Proposed resolution
Rename the function?
Issue fork menu_link_content_revisions_ui-3556733
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jastraat commentedThis is unfortunately due to the fact that the menu_link_content module doesn't provide a theme template itself. If you want to successfully render for example revisions, it needs to be present. Both this module and menu_item_extras needed that theme template and couldn't build on one provided by the core menu_link_content module and we both used the same logical name for that template function.
Let me a dig a bit.
Comment #4
jastraat commentedI renamed the preprocess function to be module specific and everything continues to work when menu_item_extras is not present.
That said, both modules are using the same theme hook naming which I'm not sure can be avoided, so could you test if simply renaming that preprocess function addresses the issues with using both modules? Thanks!
Comment #5
jastraat commented@agentrickard could you review?
Comment #6
jasongose commented*note* I tested with Drupal 10.5.6 and used the 3.1.0 release of menu_item_extras
With the 1.0.0 release of menu_link_content_revisions_ui, this reproduces the error.
Updating to the merge request resolves the error :)
Looks good to me
Comment #7
jasongose commentedThis passes my review and works with 3.1 of menu_item_extras
Comment #9
jastraat commentedThanks Jason!