backdrop-contrib / geofield

Stores geographic and location data (points, lines, and polygons).
GNU General Public License v2.0
0 stars 7 forks source link

Make geofield Rules-ready #35

Closed argiepiano closed 6 months ago

argiepiano commented 1 year ago

Currently, geofield properties such as longitud etc, can't be set or read by Rules. Doing so throws errors such as Error: Call to undefined function entity_metadata_field_verbatim_get()

Rules uses Entity Plus to get and set fields. In order to do that, contrib modules must define callbacks for their fields and properties. Geofield uses faulty callbacks that are not available in Entity Plus. Rather, those were available in Entity Metadata Wrapper, an old module that has been deprecated.

The faulty callbacks are:

All that's needed is to insert _plus_ after entity

jenlampton commented 1 year ago

Does that mean that the current callbacks don't do anything at all? These are just left over from Drupal 7 entity API support? If so then I would commit a PR changing all the names :)

argiepiano commented 1 year ago

Does that mean that the current callbacks don't do anything at all? These are just left over from Drupal 7 entity API support? If so then I would commit a PR changing all the names :)

Yup. That's all that's needed! Changing the names. The callbacks are strings that define what function must be called. Right now they point at inexistent functions.

argiepiano commented 1 year ago

@jenlampton here's a PR that fixes the callback names. #43

herbdool commented 6 months ago

Thanks @argiepiano. Merged.