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.
See #2411143-3: Change LinkItem schema to store URIs rather than URLs/paths/routes.1.
Need to add description column (or otherwise handle description translation) on the link field, right now while it supports options/attributes there's no UI for them.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2413029-8.patch | 7.96 KB | Wim Leers |
#4 | interdiff-3-4.txt | 3.79 KB | hussainweb |
Comments
Comment #1
Wim LeersComment #2
webchickAFAIK this is required in order to not lose translatability, which makes it a hard blocker for #2407505: [meta] Finalize the menu links (and other user-entered paths) system, so adjusting some metadata.
Comment #3
benjy CreditAttribution: benjy commentedI added it to the widget, did we want that? If so, do we want a setting to disable it similar to "Link text"?
Comment #4
hussainwebI think so.
I agree. It doesn't make sense to have title optional but not description. I am implementing that in my patch.
I also attempted to use the description in the formatter to show up as the link's title attribute.
Comment #5
hussainwebFixing minor misses. Basically, making the setting to disable link description actually work.
Comment #8
Wim LeersPatch looks great to me. With this reroll, it should pass tests.
Comment #9
dawehnerAre we sure 255 is enough? I could easilly expect this to be quite long ... but well, this is what menu_link_content is doing.
$this->t() is available from here ... so let's use it for new code.
Comment #10
Wim LeersActually, the
Shortcut
entity's patch to use the link field just landed (#2235457: Use link field for shortcut entity) and it continues to use its own (entity-level) title base field rather than using the link base field's title property.A similar discussion is now going on for the
MenuLinkContent
entity at #2406749-17: Use a link field for custom menu link.Which means that this
description
property would only ever be used by link fields used as configurable fields, and never by link fields used as base fields.Does that mean that we don't have to do this issue since it doesn't change the upgrade path?
And does that mean that this issue is not worth doing at all?
Comment #11
hussainwebJust for reference, this was the discussion that originally started the need for a description field.
From #2407505-20: [meta] Finalize the menu links (and other user-entered paths) system
I am documenting it here because I had to trace this through a couple of issues. This should probably be in the issue summary.
Comment #12
joelpittet@Wim Leers @dawehner re #9.1 Title attribute has a limit in IE of 512 charaters, maybe that would be a reasonable limit here, as it seems the description is often used for the link title?
https://msdn.microsoft.com/en-us/library/ie/ms534683%28v=vs.85%29.aspx
Comment #13
Gábor HojtsyComment #14
Gábor HojtsyUpdated the issue summary as per suggestion in #11. I am not sure how adding the description is required to support translatability? I mean if there is no description, there is no need to translate it either? We don't need to add it so we can translate it if we don't have it in the first place. Not sure what justifies this being critical?
Comment #15
Wim LeersI raised similar concerns in #10, see the last two sentences.
Comment #16
dawehnerWe (xjm, wim, tim, dawehner) discussed that a bit and decided that this is not critical.
a) Moving description later would be a pretty forward in terms of an upgrade path (just rename the column and be done)
b) We think description is not required to be changed, because the description is already part of menu link content and is working fine there.
It would just addition effort we would not strictly needed, especially if we decide that the title does not belong on the link item but rather the menu link content.
c) it makes things harder in terms of creating the UI, because a LinkWidget itself could be not mixed with some of the other fields.
Given that we don't think this would be required.
Comment #17
Wim LeersPer #16: downgrading to major.
Before closing this (also per #16), let's give some time for people to comment why we still do want to do this.
Comment #18
Wim LeersClarifying further: this is not necessary for any of the menu links/routing work, so this is now solely a feature request for the link field. Note that even the D7 contrib link field didn't support this.
Comment #19
Wim LeersAnd hence this belongs in 8.1.
Comment #20
webchickGreat!
Comment #22
Mac_Weber CreditAttribution: Mac_Weber as a volunteer commentedReactivating, patch no longer applies
Comment #23
Mac_Weber CreditAttribution: Mac_Weber as a volunteer commentedneeds work
might be a better issue status