Map Field not working

Support Meta Box AIO Map Field not workingResolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #24040
    Beda SchmidBeda 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/

    #24044
    Long NguyenLong 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://support.metabox.io/topic/how-to-create-a-new-topic/.

    #24054
    Beda SchmidBeda 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 NguyenLong Nguyen
    Moderator

    Hi,

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

    #24066
    Beda SchmidBeda 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://support.metabox.io/topic/map-field-not-working/

    Thanks!

    #24068
    Long NguyenLong 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 SchmidBeda 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!

    #41178
    Igor JakubowskiIgor Jakubowski
    Participant

    I have the same issue. And re-assigning address field doesn't work. Any solution for that?

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