WPIntell

Source evidence

“Fatal error” when using plugin

Contact Form 7 extension for Google Map fields · support · 2023-06-07T08:26:00+00:00

mixedsentiment
highseverity
0.94relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 32 rows with source links

12.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
mswarm resolved
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 2 years, 11 months ago by mswarm . The page I need help with: [ log in to see the link] 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? 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, Did you manage to resolve the issue? 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! Ok, thanks for letting me know. What is the hosting provider you’re using? I use DigitalOcean and have been very happy with them.

Comments

5 shown
Aurovrata Venet 2023-06-14T10:12:00+00:00

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?

mswarm 2023-06-23T09:35:00+00:00

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,

Aurovrata Venet 2023-07-10T13:49:00+00:00

Did you manage to resolve the issue?

mswarm 2023-07-10T13:52:00+00:00

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!

Aurovrata Venet 2023-07-11T07:42:00+00:00

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