WordPress.org

Support

Support » Reviews » Contact Form displays error

Contact Form displays error

  • Contact form displays the following error on the live page:
    Warning: strpos() expects parameter 1 to be string, array given in /home2/psf/public_html/wp-includes/shortcodes.php on line 193

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Richard Archambault

    @richardmtl

    Happiness Engineer

    Could you post your site URL here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    If you contact us through our form, please make sure to include a link to this thread in your message.

    The link to the page is http://purpleskiesfarm.com/contact/

    Plugin Contributor Richard Archambault

    @richardmtl

    Happiness Engineer

    Hi! I wonder if this is an issue wth your theme or another plugin. Can you try switching to the default TheyFourteen theme temporarily? If the error message still appears, can you try turning off all your other plugins, make sure the error message is gone, and then turn them all back on one by one until you find the one causing a conflict? Let me know what you turn up.

    • Okay. I switched to the TwentyFourteen theme. Error still there.
    • I turned deactivated all plugins except JetPack — the error was still there.
    • I deactivated JetPack. And the error (with the code for the form) is still showing.
    • I deleted the form from the page, updated the page, and added the contact form back. Error message is still showing.
    • I even tried deleting everything before the ‘contact-form’ area — but when I updated the page, it came back.

    Here’s the code it puts in the page:

    <br /> <b>Warning</b>:  strpos() expects parameter 1 to be string, array given in <b>/home2/psf/public_html/wp-includes/shortcodes.php</b> on line <b>193</b><br />
    [contact-form][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Website' type='url'/][contact-field label='Comment' type='textarea' required='1'/][/contact-form]

    And this is the code from the shortcodes.php file, beginning on line 190 and going to 202:

    function do_shortcode($content) {
    	global $shortcode_tags;
    
    	if ( false === strpos( $content, '[' ) ) {
    		return $content;
    	}
    
    	if (empty($shortcode_tags) || !is_array($shortcode_tags))
    		return $content;
    
    	$pattern = get_shortcode_regex();
    	return preg_replace_callback( "/$pattern/s", 'do_shortcode_tag', $content );
    }

    Plugin Contributor Richard Archambault

    @richardmtl

    Happiness Engineer

    I deactivated JetPack. And the error (with the code for the form) is still showing.

    Well, then the error isn’t related to Jetpack, then. I’m not sure what would cause it though, if it still appeared when you tried another theme. So let’s get this straight: if you deactivate every plugin, and switch to a default theme, the error is still there? Have you tried re-installing WordPress from the Updates page in your dashboard?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Contact Form displays error’ is closed to new replies.