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.
If one chooses a entity translatable field as field for tooltip
then tooltip appears with NID
on the other hand on the newest dev version the bubble text on similar situation displays the appropriatte translation of the field
Comment | File | Size | Author |
---|---|---|---|
#8 | gmap_1326176_8_tooltip_field.patch | 1.62 KB | johnv |
#7 | gmap_1326176_6_tooltip_field.patch | 1.34 KB | johnv |
#6 | gmap_1326176_1_tooltip_field.patch | 1.72 KB | johnv |
#1 | gmap_tooltip_display_with_translatable_field.1326176_1.patch | 1.39 KB | GiorgosK |
Comments
Comment #1
GiorgosKthe problem with the code is field_alias always gets the NID as described by merlinofchaos in #5 #1160706: Views 3 and $row->{$view->field['field_id']->field_alias}
I created a patch using borrowed code from the bubble text since it behaves correctly
I have tested and it works correctly
PS
other possible solutions would involve extracting one of the following variables (+ additional code down the function call
Comment #2
GiorgosKrelated issue on 6.x version #914108: Tooltip and Marker should use rendered field, not raw field from the database.
Comment #3
PasqualleI would call strip_tags() on tooltip as it can not display html tags.
Comment #4
Pasquallenote: the "Rewrite results" views functionality (for the tooltip) does not work without this patch..
Comment #5
podarok#1
this needs rerol against latest dev
Comment #6
johnvIMO this is about all Entity fields.
Please find a new patch, containing #1 and #3. It is against latest 7.x-1.x.
The strip_tags() removes all newlines, too. That can be better.
Comment #7
johnvOTOH, strip_tagging can already be done by the default Views field rewrite option.
Attached patch is rerolling #1.
Comment #8
johnvAnd, ofcourse, enabling fields should leave the 'properties' (title, author) unharmed.
Comment #9
podarok#8 thanks!
commited pushed to 7.x-2.x-dev
backported to 7.x-1.x-dev