PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Passing query string causes 404

  1. Working on an ad banner to pass a contact info (name, email, phone) to a contact form on my website. The query string is formatted correctly (?name=jonathan&email=...) and when it lands on the page I get a 404 instead of any results. Any one else run into this?

    test: http://grommelage.com/realty/test/contactform_v1.html

    landing page: http://www.semprevivoproperties.com/003-2/

    query string: http://www.semprevivoproperties.com/003-2/?name=jonathan&email=email@email.com&phone=8181234567

    Please help. :-/

    Posted 7 years ago on Monday August 6, 2012 | Permalink
  2. What happens if you append that query string in the formbuilder preview window?

    Posted 7 years ago on Monday August 6, 2012 | Permalink
  3. Hi Rob, I tested the query string in the preview window and it populated the form just fine. Is it something happening with how Wordpress operates?

    Posted 7 years ago on Monday August 6, 2012 | Permalink
  4. David Peralty
    Administrator

    Can you try the following troubleshooting steps and let us know if you find the source, or if the issue still exists?

    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    Posted 7 years ago on Monday August 6, 2012 | Permalink
  5. Unfortunately the error is still happening after change the template over to Twenty Ten, and again the error occurs when all the plugins are disabled with the exception of GF. I've even tried changing template and turning off all plugins except GF.

    Issue remains.

    Posted 7 years ago on Monday August 6, 2012 | Permalink
  6. David Peralty
    Administrator

    Can you copy and paste your HTACCESS file here so we can take a look at it? Something is making it go to a 404 instead of allowing Gravity Forms to process it, as adding a query string on any page creates a 404 error.

    Posted 7 years ago on Monday August 6, 2012 | Permalink
  7. There appear to be 2 .htaccess files present. One directly in the root:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    And this is in the wp2/ directory, which is where the website resides:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wp2/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wp2/index.php [L]
    </IfModule>
    
    # END WordPress
    Posted 7 years ago on Monday August 6, 2012 | Permalink
  8. This is a weird one but it rings a few bells. Try it with the non-pretty permalink setting like this:
    http://www.semprevivoproperties.com/?p=566&name=jonathan&email=email@email.com&phone=8181234567

    In my test, that worked and it populated the email and phone, but the name was lost. Some server configurations restrict the word "name" in the query string (I can't remember if it was mod_security or suhosin or some other security restriction on the server.) In any case, can you try changing the name parameter to something else, some other word that is not literally "name", even fname or fullname or n? I think that will work.

    I can't find reference to where we talked about this before, but it was something in the host configuration.

    Posted 7 years ago on Tuesday August 7, 2012 | Permalink
  9. For reference, you can see it work fine here:
    http://gravity.chrishajer.com/pre-populate-everything/?fullname=Chris%20Hajer&fruit=tomato

    But if you change fullname to "name", you'll get a 404, which is not really expected.

    Posted 7 years ago on Tuesday August 7, 2012 | Permalink
  10. I'll give it a go. Thanks!

    Posted 7 years ago on Thursday August 9, 2012 | Permalink
  11. It was indeed the "name" causing the 404 error. Great catch, Chris. Thanks everyone!

    This works: http://www.semprevivoproperties.com/003-2/?fullname=jonathan&email=email%40email.com&phone=8181111111

    Posted 7 years ago on Thursday August 9, 2012 | Permalink
  12. Glad you got it working!

    Posted 7 years ago on Thursday August 9, 2012 | Permalink

This topic has been resolved and has been closed to new replies.