Custom Fields
Re-Envisioned
Support Meta Box AIO Map Field not working

  • Creator
    Topic
  • #24040
    Resolved Beda Schmid
    Participant

    I created a google field and added my google api
    It works but does not save anything.
    I also made sure to add a text field that is mapped to the google field such as described in the doc:
    https://docs.metabox.io/fields/map/

    The Code that AIO generates is this:

    'fields'     => [
                [
                    'id'   => $prefix . 'some_random_field',
                    'type' => 'text',
                    'name' => esc_html__( 'Saved Natively Text', 'text-domain' ),
                ],
                [
                    'id'            => $prefix . 'map_field',
                    'type'          => 'map',
                    'name'          => esc_html__( 'Map', 'text-domain' ),
                    'address_field' => 'address',
                    'api_key'       => 'SECRET',
                ],
                [
                    'id'   => $prefix . 'address',
                    'type' => 'text',
                    'name' => esc_html__( 'Text Field', 'text-domain' ),
                ],
            ],
    

    I use AIO so there is no code in the theme
    But just to be sure I also tried to add it in the theme, which still does not save the address or anything similar to what I see

    Strange enough – this works
    https://docs.metabox.io/extensions/meta-box-geolocation/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #24044
    Long Nguyen
    Moderator

    Hi,

    Please try to deactivate all plugins except Meta Box, MB extensions and switch to the default theme of WordPress (Twenty Twenty One) then check this issue again.

    Follow the step Debugging Information to debug this issue. If it does not show anything, please do the step Private Website Info https://metabox.io/support/topic/how-to-create-a-new-topic/.

    #24054
    Beda Schmid
    Participant

    I found the “issue”
    It actually saves the data, but in the backend, in the map, it defaults still to Dublin after saving.

    Is this expected?

    I use only Metabox here.

    #24063
    Long Nguyen
    Moderator

    Hi,

    Please share your admin site account via this contact form https://metabox.io/contact/. I will check it out.

    #24066
    Beda Schmid
    Participant

    Hi, thanks!
    I have shared the access details in the link/

    I also added explanation to the message how to find the issue.
    I found that this is an issue that was mentioned once here already https://metabox.io/support/topic/map-field-not-working/

    Thanks!

    #24068
    Long Nguyen
    Moderator

    Hi,

    I’ve tested the Google Map field with my API key on your site but not see any issue, screen record https://share.getcloudapp.com/DOuoOJ7P.

    #24069
    Beda Schmid
    Participant

    I confirm that with a valid Google Maps API, the backend also works.

    Interesting is, that the lat and long are saved as well without valid API Key but then the backend won’t reflect the saved settings.

    Issue’s resolved for the Google Map field, but it persists in the OSM Map, but is resolved when we map a address field to it.

    I guess with that we can close this ticket.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.