notum-cz / strapi-plugin-location

This plugin allows users to create location inputs and store latitude and longitude values as geometry types in a PostGIS database. It also provides functionality to filter items based on their location.
MIT License
24 stars 13 forks source link

Cannot edit location field when embedded in a Component #13

Closed Chralu closed 1 year ago

Chralu commented 1 year ago

Bug report

Describe the bug

When a component embeds a plugin::location-plugin.location field, its value cannot be set.

This is the logged error :

error: 
        UPDATE components_address_adresses
        SET geopoint_geom = ST_SetSRID(ST_MakePoint(-0.5870622786552258, 44.78683011143263), 4326)
        WHERE id = 1;
    - column "geopoint_geom" of relation "components_address_adresses" does not exist

Steps to reproduce the behavior

  1. In the content type builder, create a component (named address)
  2. Add a custom location field in the component
  3. In the content type builder, create a new collection type (named user-profile)
  4. Add an address component field to user-profile
  5. In the content editor, create a new user-profile, and fill its address field.
  6. Hit save button

Expected behavior

The user profile is created.

Actual behavior

Save fails with the following error

error: 
        UPDATE components_address_adresses
        SET geopoint_geom = ST_SetSRID(ST_MakePoint(-0.5870622786552258, 44.78683011143263), 4326)
        WHERE id = 1;
    - column "geopoint_geom" of relation "components_address_adresses" does not exist
omikulcik commented 1 year ago

Hi @Chralu, thank you for reporting this issue. I have tried to reproduce this bug and it also happens to me. Will try to fix it.

omikulcik commented 1 year ago

Closed by #18