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 have a few custom markers and a custom marker field on a taxonomy. Whenever I save the taxonomy the marker is saved correctly, and works in all displays. This is a non-issue. HOWEVER, when I go to edit the term, the marker list always shows "-None-" instead of my custom marker. Any help is appreciated. I can make changes in the module myself but a little direction is always helpful! Thanks!
Comment | File | Size | Author |
---|---|---|---|
#3 | gmap-default-value-2651206-3-d7.patch | 633 bytes | tnathanjames |
|
Comments
Comment #2
joegl CreditAttribution: joegl commentedI'm not sure if this is the correct way to do it and in fact, it probably isn't. HOWEVER, I have modified the code in the file gmap/gmap_fields/gmap_fields.module starting at line 69:
It works for me but that's only when the field is limited to one value, but that's solving my issue at the moment. I will probably have to alter it later.
Comment #3
tnathanjames CreditAttribution: tnathanjames at Mediacurrent commentedJoegl, thanks for the issue and the code example.
I looked at a couple other examples of contrib modules implementing hook_field_widget_form_alter. It looks like it is more common to use a ternary operator instead of a separate function. Here is a patch that does the same as the code above.
Comment #4
tnathanjames CreditAttribution: tnathanjames at Mediacurrent commentedComment #5
joegl CreditAttribution: joegl commentedThanks Nathan!
Comment #6
00trav CreditAttribution: 00trav commentedI had the same issue. I can confirm the patch works correctly.
Comment #7
TommyChris#3 works!
Comment #8
l0keThanks, pretty obvious patch. RTBC
Comment #9
serpforge CreditAttribution: serpforge commented#3 help for me, thanks!
But, why the module is not patched?
Comment #10
TommyChrisPlease commit #3!
Comment #12
podarok#3 is merged
thnx