Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1490350

    I have been using the Webdirectory 2.0 plugin for years, which has always worked flawlessly with Enfold. When creating a new listing in the Webdirectory under “Directory Listings” -> Create new listing, the Google Map is displayed correctly – up to Enfold version 6.0.9.

    From Enfold version 7.0 and above, this Google Map has disappeared, making the plugin unusable.

    Please let me know what needs to be done – or provide an update so that it continues to work as usual.

    Steps to Reproduce the Issue with Google Maps in w2dc Plugin and Enfold
    Please note: this is a test instance, so no data can be lost; everything has been backed up.
    1.) Log in using the credentials provided in the private section.
    2.) Navigate to Directory Listings → Create new listing and scroll down to view the Google Map. On the current setup (Enfold ≤ 6.0.9), the map displays correctly.
    3.) Update Enfold to version 7.0 or higher.
    4.) Go again to Directory Listings → Create new listing and scroll down. The map is now missing. The following error message appears:
    “Google Geocoder was not loaded. Check Google API keys and enable Google Maps Geocoding API in Google APIs console.”

    We kindly ask you to provide guidance on how to resolve this issue or release an update so that the plugin works as before.

    THANKS!

    #1490385

    Hey SDUS,

    Thank you for the inquiry.

    The latest version of the theme was not available when we checked. Please upload it to your server so we can activate it. We also recommend contacting the plugin developers for additional assistance with this issue.

    Best regards,
    Ismael

    #1490391

    Hi Ismael,

    Version Enfold 7.1.3 is now available, and you can switch back and forth.
    All versions of w2dc work perfectly with other themes and with Enfold—but only up to version 6.X. The described error occurs starting with Enfold version 7.

    #1490441

    Hi,

    Thank you for the update.

    We added the following code in the Code Snippets plugin, which fixed the map display issue in the directory listing. Please note that this will completely disable the map API from the theme.

    function ava_disable_gmap() {
        add_filter('avf_load_google_map_api', '__return_false', 10);
        add_filter('avia_google_maps_widget_load_api', '__return_false', 10);
    }
    
    add_action('admin_init', 'ava_disable_gmap');
    
    add_filter("avf_skip_enqueue_scripts_backend_gmaps", function($skip) {
       return "skip_loading";
    }, 10, 1);
    
    add_filter("avf_load_google_map_api_prohibited", function($prohibit) {
       return true;
    }, 10, 1);
    

    Best regards,
    Ismael

    #1490533

    THANKS, Ismael, I will try to include it in the live-website.

    #1493593

    The solution: Completely disable Enfold Maps (via code)

    In WordPress, open the Code Snippets menu (or WPCode).

    Create a new PHP snippet.

    Name it “Enfold Google Maps Fix”.

    Insert this code:
    /* Enfold Google Maps komplett deaktivieren (Backend & Frontend) */
    add_filter( ‘avf_load_google_map_api’, ‘__return_false’ );
    add_filter( ‘avf_load_google_map_api_prohibited’, ‘__return_true’ );

    /* Sicherheitshalber auch die Skripte entfernen, falls Enfold sie trotzdem lädt */
    add_action(‘init’, ‘remove_enfold_maps_scripts’, 30);
    function remove_enfold_maps_scripts() {
    wp_deregister_script( ‘avia-google-maps-api’ );
    wp_deregister_script( ‘avia_google_maps_front_script’ );
    wp_deregister_script( ‘avia_google_maps_api_script’ );
    wp_deregister_script( ‘avia_google_maps_widget_admin_script’ );
    }

    Make sure you select “Everywhere” (Frontend & Admin) or “Run PHP Snippet everywhere” under “Location”.

    Activate the snippet and save it.

    • This reply was modified 2 days, 9 hours ago by daniels340.
    #1493622

    Hi,

    Thank you for the complete solution! Please feel free to open another thread if you have more questions. Have a great day.

    Best regards,
    Ismael

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