WordPress.org

Forums

Jetpack by WordPress.com
Contact Form displays error (6 posts)

  1. somewebtec
    Member
    Posted 1 year ago #

    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

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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.

  3. somewebtec
    Member
    Posted 1 year ago #

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

  4. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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.

  5. somewebtec
    Member
    Posted 1 year ago #

    • 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 );
    }
  6. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.