• Resolved mswarm

    (@mswarm)


    Hi,

    I’ve set everything up to the point of adding a map in to a form on a page but get a fatal error when I either try to save the page within the page editor or when I try to view the page directly.

    Page URL: Form test – Swarm

    I turned on debug and can see the below error:

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:59 
    Stack trace:
     #0 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/cf7-google-map/public/class-cf7-googlemap-public.php(196): include()
     #1 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(551): Cf7_GoogleMap_Public->googleMap_shortcode_handler()
     #2 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(460): WPCF7_FormTagsManager->scan_callback()
     #3 [internal function]: WPCF7_FormTagsManager->replace_callback()
     #4 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(356): preg_replace_callback()
     #5 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/form-tags-manager.php(328): WPCF7_FormTagsManager->scan()
     #6 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form.php(867): WPCF7_FormTagsManager->replace_all()
     #7 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form.php(933): WPCF7_ContactForm->replace_all_form_tags()
     #8 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form.php(633): WPCF7_ContactForm->form_elements()
     #9 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(235): WPCF7_ContactForm->form_html()
     #10 [internal function]: {closure}()
     #11 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/l10n.php(147): call_user_func()
     #12 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/contact-form-7/includes/contact-form-functions.php(239): wpcf7_switch_locale()
     #13 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/shortcodes.php(355): wpcf7_contact_form_tag_func()
     #14 [internal function]: do_shortcode_tag()
     #15 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/shortcodes.php(227): preg_replace_callback()
     #16 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/class-wp-hook.php(308): do_shortcode()
     #17 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/plugin.php(205): WP_Hook->apply_filters()
     #18 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/post-template.php(255): apply_filters()
     #19 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/themes/understrap/loop-templates/content-page.php(28): the_content()
     #20 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/template.php(785): require('/home/li26yuh0q...')
     #21 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/template.php(718): load_template()
     #22 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/general-template.php(204): locate_template()
     #23 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/themes/understrap/page.php(38): get_template_part()
     #24 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-includes/template-loader.php(106): include('/home/li26yuh0q...')
     #25 /home/li26yuh0q757/public_html/dev.swarm.eco/wp-blog-header.php(19): require_once('/home/li26yuh0q...')
     #26 /home/li26yuh0q757/public_html/dev.swarm.eco/index.php(17): require('/home/li26yuh0q...')
     #27 {main} thrown in /home/li26yuh0q757/public_html/dev.swarm.eco/wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php on line 59
    

    When I check line 59 I see:

    require plugin_dir_path( __FILE__ ) . 'includes/class-cf7-googlemap.php';
    

    Any idea? I’ve tried turning all other plugins off but had no luck.

    Thanks ??

    • This topic was modified 1 year, 5 months ago by mswarm.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    So the error you are getting is not related to the plugin but rather to your server setup I reckon. The line on which you are getting the error reported is,

    require plugin_dir_path( __FILE__ ) . 'includes/class-cf7-googlemap.php';

    it is expecting a directory path input from the function plugin_dir_path( __FILE__ ) and this is likely the source of the error, returning an error while accessing the current file details. Is it possible you have manually installed this plugin and its file access permissions are restricted for the PHP server process?

    Thread Starter mswarm

    (@mswarm)

    Hi,

    Thanks for the reply!

    I installed it normal way (via the WordPress dashboard), contacting my host to see if their setup is unusual and may be causing the error.

    Cheers,

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Did you manage to resolve the issue?

    Thread Starter mswarm

    (@mswarm)

    Hey, I checked with our webhost, they asked me to try with different versions of php/some other unrelated changes. Nothing worked, but having since had other issues with their hosting setup its almost certainly them – moving when we find time.

    Thanks for your help!

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Ok, thanks for letting me know. What is the hosting provider you’re using? I use DigitalOcean and have been very happy with them.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘“Fatal error” when using plugin’ is closed to new replies.