This issue has novice tasks. If you are an experienced core developer and have multiple commit mentions, please review novices' work on these tasks rather than doing them yourself. Feedback from experienced contributors is valued.
Problem/Motivation
content_translation.module contains content_translation_menu_alter() - hook_menu_alter no longer exists.
Proposed resolution
Remove content_translation_menu_alter()
Remaining tasks
- Write patch (novice)
- Review patch to check it fixes the issue, the change is properly documented and for coding standards. Provide test evidence (novice)
- Keep issue summary up to date (novice)
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#16 | remove-content-translation-menu-alter-hook-2210077-7.patch | 3.15 KB | pp |
#5 | remove-content-translation-menu-alter-hook-2210077-5.patch | 2.75 KB | andrei.dincu |
Comments
Comment #1
Gábor HojtsyWell, there is a whole lot of code in https://api.drupal.org/api/drupal/core%21modules%21content_translation%2..., did that end up being added elsewhere? Just removing this without maintaining the functionality is probably not a good idea.
Comment #2
Gábor HojtsyLooks like #2177041: Remove all implementations of hook_menu removed a few lines of this, but left it intact. I think this needs to be renamed to content_translation_menu_link_defaults_alter()?
Comment #3
Gábor HojtsyAlso needs tests then.
Comment #4
andrei.dincu CreditAttribution: andrei.dincu commentedComment #5
andrei.dincu CreditAttribution: andrei.dincu commentedI have removed the function that implements hook_menu_alter().
Waiting for your feedback.
Comment #6
andrei.dincu CreditAttribution: andrei.dincu commentedComment #7
Gábor HojtsyAs discussed above, the functionality is still needed. See #1-#3.
Comment #8
alexpottAlso once the function is renamed... this line needs changing since MENU_DEFAULT_LOCAL_TASK no longer exists
Comment #9
BerdirGabor, any idea what is broken? That code has nothing to do with menu links, it's mostly about local tasks from what I see.
Content Translation has a Route Subscriber and there's a Derivate for local tasks, which should be replacing this, based on entity link templates.
The only thing that might still be relevant is the thing that makes sure that translate is shown after edit.
I did a manual check using nodes and custom blocks and all works fine. The only thing I noticed is that the translate operation in the custom block overview does display a "Translate" operation but it's not a link... but the local task is working fine.
So unless we actually know something that is broken, this looks fine to me :)
Comment #10
Gábor HojtsyI don't know of specific things that do not work but I did not check the code. I have not been able to verify that equivalent functionality to this code is present elsewhere and I did not check if it was tested or not.
Comment #11
dawehnerAs far as I understand the code in there, it fulfills two parts:
Comment #12
pp CreditAttribution: pp commentedI am at DrupalDevDays Szeged, and I am working with this issue a little bit. (I try to talk with adrei.dincu, but I can't)
I reroll the patch because it isn't work.
@dawehner #11
If you see my patch, you can found a new thing:
- $items['admin/config/regional/content-language']['title'] = 'Content language and translation';
- $items['admin/config/regional/content-language']['description'] = 'Configure language and translation support for content.';
I talked about this with @Gábor Hojtsy and He said me there was a test which test this functionality (add "... and translation" text to this menu title and description when content translation is turned on). I cant found the test (I searching for the texts)
We needs tests, more tests.
Comment #13
pp CreditAttribution: pp commentedI think this issue waiting for this:
https://drupal.org/node/1987882
Comment #14
andypostNo need to postpone, all menu was converted so this code is not executed.
The task here is to find what's missing and remove dead code
Comment #16
pp CreditAttribution: pp commentedI reroll the patch
Comment #17
andypostComment #18
dawehnerThis looks nice!
Comment #19
catchCommitted/pushed to 8.x, thanks!