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.
I'm not sure if it is a feature or a bug, as it is a very basic issue:
Create a content type with geofield, select Openlayers Map widget for it, enter a label and a help text for the field.
Add a new node of the content type.
Issue:
The field label and help text is not shown in the node edit form. Only the map with the generic hardcoded help text is shown:
Remarks:
If other widget (e.g. Lat/Lon) is used, then the field has a nice frame, label and help text:
Location + Gmap input field is presented with such a frame, label and user help text.
Comment | File | Size | Author |
---|---|---|---|
#8 | openlayers-widget-show-title-description-2045325-8.patch | 1.77 KB | sano |
#6 | openlayers-widget-show-title-description-2045325-5.patch | 1.75 KB | squarecandy |
gfht2.jpg | 85.71 KB | pczech | |
gfht1.jpg | 13.84 KB | pczech |
Comments
Comment #1
dan_man CreditAttribution: dan_man commentedIf it is of any help - I ended up hacking the function openlayers_geofield_widget_afterbuild:
Not ideal though....
Comment #2
gagarine CreditAttribution: gagarine commentedThe element #title is their in the afterbuild function. I don't get why is not rendered. Perhaps the used theme function is wrong...
Comment #3
arx-e CreditAttribution: arx-e commentedI met this issue today and I implemented the hack offered by dan_man in #1 and it is working.
I just pasted the code after line 294 in the geofield.widgets.openlayers.inc file.
Any chance of this issue being addressed?
Comment #4
squarecandy CreditAttribution: squarecandy commented+1
I'm also experiencing this. Will try to make a patch after I explore more...
Comment #5
squarecandy CreditAttribution: squarecandy commentedHere's what i came up with, based on @dan_man's edits…
will roll into a patch in a moment.
Comment #6
squarecandy CreditAttribution: squarecandy commentedHere is a patch for this issue.
Comment #7
genebobmiller CreditAttribution: genebobmiller commentedPatch in #6 solved this issue for me,
also solves issue https://www.drupal.org/node/1791984.
Comment #8
sano CreditAttribution: sano commentedThe patch was failing on the latest dev. build. Attached is a re-roll, that includes a minor change where html tags were extracted from a translatable string.