Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello
On any menu item edit page, the Menu link attributes settings appears twice (in french and english)
I have unabled modules :
i18n_node
i18n_menu
Screenshot attached
Comment | File | Size | Author |
---|---|---|---|
#13 | menu_attribute_appears-2752153-13.patch | 2.77 KB | jalpesh |
#12 | interdiff.txt | 2.5 KB | joelpittet |
#12 | menu_attributes_appears-2752153-12.patch | 2.76 KB | joelpittet |
#11 | menu-attribute-description-change_2752153_3.patch | 3.56 KB | jalpesh |
#7 | menu-attribute-description-change_2752153_2.patch | 2.91 KB | jalpesh |
Comments
Comment #2
joelpittetOne is for the menu element (li tag) and one for the menu link (a tag). There is no duplication but the help text is duplicated. We should make the help text more generic.
should be something like:
The field group they are in is what they can be applied to.
Would you mind making a patch for this? And does that make sense as a way to improve this?
Comment #3
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedI think if we change description of Class then it is require to change description of ID and Style as well. The description of three attribute(ID, Class and Style)is same because they are share by menu link and item. We need to write some code to handle description of attribute.
Let me know your thought. Thanks.
Comment #4
joelpittetYes that sounds good. Anywhere it ends with 'to the link' or 'for the link' needs to be rewritten to make it generic applying to the element that is noted by the fieldset.
Comment #5
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedI have add a patch to change description of attribute. It may possible that the solution will not look good to you, so let me know your thoughts, will work on it.
Also let me know any change in new description message. Thanks.
Comment #6
joelpittetClever idea but you probably want to use
isset()
here and check$group
. Also we probably want to update thehook_menu_attribute_info()
in /menu_attributes.api.php to indicate this is a thing.Comment #7
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedHere is the new path with changes mention in your above comment.
Let me know if i misunderstand something in your above suggestion. Thanks.
Comment #8
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedPlease ignore above path.
Comment #9
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedI think none of the patch will not solve the problem. I am working on other solution. Thanks.
Comment #10
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedComment #11
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedHere we go with new solution.
Let me know you thoughts so we can work accordingly. Thanks.
Comment #12
joelpittetThat looks good, fixed some typos and think we can get away without inventing a form api property to pass along the value because that may cause issues and we have the value later anyway. Does that work for you?
EDIT: probably a better comment above the condition would be
Comment #13
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedThanks for review.
Yes, you are right. we can easily get away with following unnecessary condition.
'#item_description' => isset($info['item_description']) ? $info['item_description'] : '',
I have just change comment as per your suggestion. Thanks.
Comment #16
joelpittetThanks I've committed the changes to the 7.x and 8.x branches