Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Update on my issue
    ACFE form is available on frontend form only as Admin uses Field group location. I used “if ( !is_admin()) {}” in form template.

    ACF OpenStreetMap Field plugin version 1.4.3 – later versions produce errors

    The meta_value’s – as saved in “wp_postmeta” table for same map location

    ADMIN

    a:7:{s:3:”lat”;d:-21.3840324;s:3:”lng”;d:149.225235;s:4:”zoom”;i:10;s:7:”markers”;a:1:{i:0;a:6:{s:5:”label”;s:36:”J Pitcher Road, Queensland Australia”;s:13:”default_label”;s:36:”J Pitcher Road, Queensland Australia”;s:3:”lat”;d:-21.3834102;s:3:”lng”;d:149.2239913;s:7:”geocode”;a:0:{}s:4:”uuid”;s:20:”marker_65a0abf96ea7a”;}}s:7:”address”;s:36:”J Pitcher Road, Queensland Australia”;s:6:”layers”;a:1:{i:0;s:13:”OpenStreetMap”;}s:7:”version”;s:5:”1.4.3″;}

    Frontend Form

    {“lat”:-21.3840324,”lng”:149.225235,”zoom”:10,”markers”:[{“label”:”J Pitcher Road, Queensland Australia”,”default_label”:”J Pitcher Road, Queensland Australia”,”lat”:-21.3834102,”lng”:149.2239913,”geocode”:[],”uuid”:”marker_65a0abf96ea7a”}],”address”:”J Pitcher Road, Queensland Australia”,”layers”:[“OpenStreetMap”],”version”:”1.4.3″}

    If I edit the "wp_postmeta" table and replace the "Frontend Form" meta_value with the "ADMIN" meta_value, I can edit the event in Admin, and on frontend as permitted user, with all fields populated and displayed with no errors.
    However, if the event is updated on the frontend, and, even without changing any field values, the meta_value changes back and the error returns. The event is then not editable in Admin or Frontend.

    The “Fatal Error” is caused by the incorrect format of the meta_value.

    How do I modify how the values are saved for the field on the frontend form submission?

    Thanks for this

    jonmojo

    (@jonmojo)

    I am trying to do the same. I have set up the form as above, included the code snippet and modified the template (event-editor.php). The values save in “wp_postmeta” table. When I edit the event on the frontend I get a fatal error. “PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /my-site/wp-content/plugins/acf-openstreetmap-field/include/ACFFieldOpenstreetmap/Field/OpenStreetMap.php:565”.

    The form saves the values in “wp_postmeta” table but I noticed a difference between the values saved for ACF OpenStreetMap Field for events created by admin and frontend events.
    Example values.
    Admin a:7:{s:3:”lat”;d:-21.4530686;s:3:”lng”;d:149.23759.etc
    Frontend {“lat”:-24.9401487,”lng”:152.4928951,”zoom”:13,etc

    I do not know how to fix this and any help would be accepted gratefully. Thank You.

    I have Version 3.3.41 and Pro and have just tried to use “Edit trash/delete post” button on a new cpt. It only shows as “update”. I can edit the field in Elementor sidebar, but nothing changes on the page. I have checked previous instances (6) on other custom post types and the same behaviour applies. Clicking the button does not delete the post, either. I really need a solution as my frontend users need to be able to edit or delete their posts.

Viewing 3 replies - 1 through 3 (of 3 total)