Support » Plugin: Contact Form 7 » Contact Form 7 and mobile subdomain problem

  • 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi


    ‘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?

    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?

    Plugin Author Takayuki Miyoshi


    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.

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Contact Form 7 and mobile subdomain problem’ is closed to new replies.