• Resolved Mastafu Design

    (@mastafu)


    Hi i got this problem, suddenly my cf7 form with a map from your plugin stopped working .I get this error, any idea ?

    
    [17-Feb-2023 12:46:46 UTC] PHP Fatal error:  Uncaught ValueError: Path cannot be empty in /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:58
    Stack trace:
    #0 /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php(58): get_headers('')
    #1 /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/class-cf7-googleMap-public.php(188): include('/home/veojhiyyp...')
    #2 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(551): Cf7_GoogleMap_Public->googleMap_shortcode_handler(Object(WPCF7_FormTag))
    #3 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(460): WPCF7_FormTagsManager->scan_callback(Array, true)
    #4 [internal function]: WPCF7_FormTagsManager->replace_callback(Array)
    #5 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(356): preg_replace_callback('/(\\[?)\\[(group|...', Array, '<div id="formBo...')
    #6 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(328): WPCF7_FormTagsManager->scan('<div id="formBo...', true)
    #7 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(861): WPCF7_FormTagsManager->replace_all('<div id="formBo...')
    #8 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(927): WPCF7_ContactForm->replace_all_form_tags()
    #9 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form.php(627): WPCF7_ContactForm->form_elements()
    #10 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(229): WPCF7_ContactForm->form_html(Array)
    #11 [internal function]: {closure}(Object(WPCF7_ContactForm), Array)
    #12 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/l10n.php(147): call_user_func(Object(Closure), Object(WPCF7_ContactForm), Array)
    #13 /home/.../domains/www.....pl/public_html/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(233): wpcf7_switch_locale('pl_PL', Object(Closure), Object(WPCF7_ContactForm), Array)
    #14 /home/.../domains/www.....pl/public_html/wp-includes/shortcodes.php(355): wpcf7_contact_form_tag_func(Array, '', 'contact-form-7')
    #15 [internal function]: do_shortcode_tag(Array)
    #16 /home/.../domains/www.....pl/public_html/wp-includes/shortcodes.php(227): preg_replace_callback('/\\[(\\[?)(contac...', 'do_shortcode_ta...', '[contact-form-7...')
    #17 /home/.../domains/www.....pl/public_html/wp-includes/class-wp-hook.php(308): do_shortcode('[contact-form-7...')
    #18 /home/.../domains/www.....pl/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters('[contact-form-7...', Array)
    #19 /home/.../domains/www.....pl/public_html/wp-includes/post-template.php(255): apply_filters('the_content', '[contact-form-7...')
    #20 /home/.../domains/www.....pl/public_html/wp-content/themes/theissue/page.php(35): the_content()
    #21 /home/.../domains/www.....pl/public_html/wp-includes/template-loader.php(106): include('/home/veojhiyyp...')
    #22 /home/.../domains/www.....pl/public_html/wp-blog-header.php(19): require_once('/home/veojhiyyp...')
    #23 /home/.../domains/www.....pl/public_html/index.php(17): require('/home/veojhiyyp...')
    #24 {main}
      thrown in /home/.../domains/www.....pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php on line 58
    
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    Are you using a custom icon for the map marker? Looks like the URL path to the icon is no longer available.

    Thread Starter Mastafu Design

    (@mastafu)

    Hi,

    No, i don’t. Not in this project. Just your plugin. One thing that happened is that we did a migration from one server to other a month ago. I used Akeeba to rewrite urls.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Then it could be a permission issue. Can you make sure the the following asset is accessible to the server php process,

    wp-content/plugins/cf7-google-map/assets/red-marker.png

    Thread Starter Mastafu Design

    (@mastafu)

    It’s not that.
    Fatal error: Uncaught ValueError: Path cannot be empty in /home/xxx/domains/www.xxx.pl/public_html/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:58 

    Line 58 ($headers = @get_headers($robots);)

    Once commented, works fine … but why ?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Line 58 ($headers = @get_headers($robots);)

    This line looks suspicious, it should be,

    $headers = @get_headers($marker_settings['icon']);

    was your code modified by someone?

    Thread Starter Mastafu Design

    (@mastafu)

    I will check it.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    try to re-install the plugin!

    Thread Starter Mastafu Design

    (@mastafu)

    will do

    Thread Starter Mastafu Design

    (@mastafu)

    i just installed fresh and it has the same code

    $zoom = explode(':',$map_values[0]); //zoom:
    $clat = explode(':',$map_values[1]); //lat:
    $clng = explode(':',$map_values[2]); //lng:
    $lat = explode(':',$map_values[3]); //lat:
    $lng = explode(':',$map_values[4]); //lng:
    //check that the file actually exists
    $exists = false;
    if ( in_array('curl', get_loaded_extensions()) ) {
    $ch = curl_init($marker_settings['icon']);
    curl_setopt($ch, CURLOPT_NOBODY, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_exec($ch);
    $response = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    if ($response === 200) $exists = true;
    curl_close($ch);
    }
    if (!$exists && function_exists('get_headers')) {
    $headers = @get_headers($robots);
    if ($headers) {
    if (strpos($headers[0], '404') !== false) {
    $exists = true;
    }
    }
    }
    Thread Starter Mastafu Design

    (@mastafu)

    So what’s going on 🙂 ?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    so turns out that curl_init doesn’t always work. This part of the code has been modified to make use of WP core functionality which is more reliable. This should now work for you. Have you upgraded and tried again?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Internal error 500’ is closed to new replies.