Home Forums Plugin Support WP User Frontend (Free Version) Conflict WPUF Pro and ACF Google Map

This topic is: resolved

Tagged: ,

This topic contains 9 replies, has 2 voices, and was last updated by  hartlrobert 5 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #14873

    hartlrobert
    Participant
    Post count: 8

    Hello,

    we are using both WPUF and ACF and up to now everything worked smoothly. Just that now a custom field Google Map doesn´t work (it shows up, but no autocomplete, search, set marker…). That is, if WPUF is active. If I deactivate WPUF, everything works as far as ACF is concerned.

    Seems to be a script incompability? Maybe it´s not good that the google-API is loaded twice in the backend – even if we don´t have any WPUF forms active on the edit post pages?

    Any help / suggestions greatly appreciated! Thank you!

    Peter

    #14876

    Tareq Hasan
    Keymaster
    Post count: 2831

    May be we can quickly check in your site? In that case, please provide your site url, user login and password so we can check it. Also mark your reply as Private reply to keep it safe.

    #14897

    hartlrobert
    Participant
    Post count: 8
    This reply has been marked as private.
    #14911

    Tareq Hasan
    Keymaster
    Post count: 2831

    I am not sure why, but I am seeing lots of JavaScript error on the page.
    js error

    Somehow it's not finding jQuery which is a must for every plugin, may be some plugin conflict?

    #14957

    hartlrobert
    Participant
    Post count: 8

    Hi Tareq,

    thanks for your kind help so far!

    From what page did you take that screenshot? The only error I get in my chrome console (apart from a notice that the Gmaps-API is loaded twice) is this:

    Uncaught TypeError: Cannot read property 'Autocomplete' of undefined input.min.js?ver=4.3.4:13
    acf.fields.google_map.render input.min.js?ver=4.3.4:13
    acf.fields.google_map.init input.min.js?ver=4.3.4:13
    (anonymous function) input.min.js?ver=4.3.4:13
    x.extend.each load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:3
    x.fn.x.each load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:3
    (anonymous function) input.min.js?ver=4.3.4:13
    x.event.dispatch load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:4
    v.handle load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:4
    x.event.trigger load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:4
    e.event.trigger load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:9
    (anonymous function) load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:4
    x.extend.each load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:3
    x.fn.x.each load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:3
    x.fn.extend.trigger load-scripts.php?c=gzip&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,pluploa…:4
    (anonymous function)

    I also think it might be a JS/plugin incompability. Only that, if I deactivate all plugins but ACF and WPUF the Google Maps Custom Field still doesn´t work…

    Do you have any idea?

    Thank you again!

    #14963

    Tareq Hasan
    Keymaster
    Post count: 2831

    I got the errors on adding a company post type.

    May be the problem occurs with the version of google maps. ACF is using version 3, where WPUF is using version 2 of google maps. May be thats creating a conflict.

    #14964

    hartlrobert
    Participant
    Post count: 8

    Sounds interesting. Is there a way for me to change that?
    Or maybe to deactivate the WPUF Google Map code if I in fact don´t use it?

    You were right – on that page I get similar messages. Strange…

    #14967

    Tareq Hasan
    Keymaster
    Post count: 2831

    Delete this line from wpuf.php, line 167.
    wp_enqueue_script( 'google-maps', $scheme . '://maps.google.com/maps/api/js?sensor=true' );

    #14971

    hartlrobert
    Participant
    Post count: 8

    Ok, that solved the issue with double API.

    Still, I can´t make the field work. Seems, though, that others have a similar problem: http://support.advancedcustomfields.com/forums/topic/new-googlemap-field-doesnt-work

    May be there is an issue with ACF. I just wonder why everything works if I deactivate WPUF.

    Thank you for your help in this. If you have another idea please tell me. If I find a solution I´ll post it here…

    Peter

    #14976

    hartlrobert
    Participant
    Post count: 8

    I looked closely now at the ACF Google Maps Field. Seems they changed they way they load the Google Maps API with their last update.

    I activated the lines 58 in google-map.php wp_enqueue_script('acf-googlemaps'); and the lines 503-510 $scripts[] = array( ... in acf.php and now it works again.

    Thank you for your help!
    I wish you a nice weekend!

    Peter

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Conflict WPUF Pro and ACF Google Map’ is closed to new replies.