WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Contact Form 7 and mobile subdomain problem (5 posts)

  1. bmlcreative
    Member
    Posted 1 year ago #

    Hi,

    This is an excellent plugin, but I'm having trouble getting it to work with a mobile subdomain. The AJAX form validation doesn't seem to be working and on the home page, submitting the contact form throws up a big php error:

    'Warning: Invalid argument supplied for foreach() in /home/bmlcreat/public_html/wp-content/themes/bml-mobile/index.php on line 37'

    Website can be viewed here.

    The plugin works perfectly on the main website, so am guessing it's a problem with the subdomain (I'm using mobile domain plugin to handle this redirection).

    Any advice on how to overcome this would be greatly appreciated.

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    'Warning: Invalid argument supplied for foreach() in /home/bmlcreat/public_html/wp-content/themes/bml-mobile/index.php on line 37'

    This is theme's error, isn't it?

  3. bmlcreative
    Member
    Posted 1 year ago #

    Hi Takayuki,

    Yes it looks like theme error, but it only occurs when you send the contact form on the home page of the mobile website with missing data. The theme works perfectly apart from that.

    I've also noticed that the AJAX form validation isn't working as the page is having to reload to show the results, whereas the desktop version works in-page as expected.

    It's a strange one?

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    Are you the author of the theme, by any chance? If so, you should be able to fix the problem. The error states the reason clearly.

  5. bmlcreative
    Member
    Posted 1 year ago #

    I think I've narrowed down the issue. It seems that Contact Form 7 is trying to redirect to the index.php file instead of my static homepage template. This is what's causing the error. I guess this is something to do with the mobile-domain plugin causing a conflict somehow.

    I've done a quick hack to get around this, but it doesn't explain why the in-page AJAX verification isn't working?

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic