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.
To reproduce:
- Set content type multilingual support to "Enabled, with field translation" (
entity_translation
) - add a Link field
- set the "Link Title" to "No Title"
- activate "Field translation"
- create a node → the "Link Title" field is not present (expectedly)
- create a translation for this node → the "Link Title" field is present (undesired)
So it displays the "Link Title" field when translating a source node.
The help text reads (note the missing count because it wasn't set at all):
The link title is limited to characters maximum.
Comments
Comment #1
petros CreditAttribution: petros commentedI fixed it by going to link.module file
and at line 636 I replaced this
$instance = field_widget_instance($element, $form_state);
with this
$instance = field_info_instance($element["#entity_type"], $element['#field_name'], $element['#bundle']);
I dont know if there are any side effects with it..
Comment #1.0
petros CreditAttribution: petros commentedtypo
Comment #2
gcassie CreditAttribution: gcassie commentedSame behavior if you use field_info_instances() to get information about how the field is used on an entity bundle such as a content type - even if the title field is set not to display for that bundle, it shows up anyway after retrieving the field and using it another form.
The change suggested above seems to fix the behavior so the title options are respected.