WordPress.org

Forums

Contact Form 7
[resolved] Ajax based theme adds hashtag in URL breaking Contact Form 7. Any suggestions? (8 posts)

  1. mrjoee
    Member
    Posted 10 months ago #

    The theme I am using loads individual pages into the main page using AJAX, which as a result adds a '#' to the URL. For example: http://www.yourdomain.com/contact becomes http://www.yourdomain.com/#/contact

    The contact page can be accessed directly without going through the main page (so without the hashtag in the URL) and the form works absolutely perfectly.

    However, when accessing the contact page through the main page (with the # in the URL) the form works and sends the form via email, however the response to confirm the mail was sent, or required fields need to be filled out does not display. Instead, it tries to load a'contact/?_=' page which is Not Found.

    This seems to be an Ajax conflict, or the JS file not loading due to the # in the URL.

    Is there any way to resolve this? Even if it means completely getting rid of the Ajax functionality and loading an entire new page to confirm whether the form has been sent?

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

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 10 months ago #

    Can I see the site?

  3. mrjoee
    Member
    Posted 10 months ago #

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 10 months ago #

    It should be able to work if contact form's Ajax submitting is available. But seemingly the theme's JavaScript code overriding or blocking it. You should ask for the theme author's advice.

  5. mrjoee
    Member
    Posted 10 months ago #

    Thanks for taking a look. I contacted the theme support and they recommended hiring a developer. I found another support ticket like mine to which they replied: Unfortunately, the /#/ cannot be removed, it's an AJAX theme and that /#/ is part of core functionality.

    Is it possible to verify whether it is this hashtag in the URL that is causing the javascript not to load, or whether it is definitely the theme's javascript overriding?

    Thanks,

    Joe

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 10 months ago #

    I don't think the /#/ is causing the problem. I think the theme author should support you. It's a paid theme, isn't it?

  7. mrjoee
    Member
    Posted 10 months ago #

    Thanks for looking into this. It is a paid theme and he is not being very helpful. He replied with this:

    SQUARED is a theme that loads content via AJAX. For this reason, plugins that generate additional JS or additional content through JS on the page they run, won't work - the theme only loads the content area from that page.

    Does this make sense to you? I don't understand how if this is the case then how come all my other lightbox and twitter plug-ins that rely on javascript still work?

  8. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 10 months ago #

    I'm not sure. But if the author recognized that the theme won't work with plugins loading JS files (most plugins are), isn't it a defective as a WordPress theme? I would suggest replacing it.

Reply

You must log in to post.

About this Plugin

About this Topic