Answers.Body: <p>So when filling the form, you submit it (the data is into the post, so you have the feeling it's truncated as you don't see the params in the log/net tab). Once that data is processed, it needs to display something (the confirmation that everything went well).</p>
  
  <p>They are two ways of doing that:
  - either the result of the post is the confirmation message
  - or you redirect to another page that displays the confirmation message</p>
  
  <p>the second one (the one yo experienced) has several benefits: it's easier to redirect to another page (so you have a completely custom and different thank you page from outside of civi, and as importantly, it allows you to reload the confirmation page without resubmitting the contribution (that's why you have warning from your browser when you reload a page after you submit something)</p>
  
  <p>Now, that design choice made many years ago doesn't make that much sense when you have forms in ajax (eg. with payment providers like stripe), but I don't think it's a problem to do a redirect, it doesn't create a major speed difference.</p>
  
  <p>So in short: it's normal behaviour, nothing to worry about ;)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-10T10:49:30.003Z
Answers.LastActivityDate: 2015-12-10T10:49:30.003Z
Answers.UserDisplayName: Xavier
Body: <p>When submitting a contribution form, I first get taken to what seems like a truncated URL: <code>https://mysite.example.com/donate/?page=CiviCRM&amp;q=civicrm/contribute/transact</code>. The HTTP response code is 302 and I get redirected to <code>https://mysite.example.com/donate/?page=CiviCRM&amp;q=civicrm/contribute/transact&amp;_qf_Confirm_display=true&amp;qfKey=ea68d5378e175112aace8d733a982f53_5648</code>. Then the response code is 200 and the page displays all fine. I'm seeing all of this in the Network tab of the browser's developer tool.</p>
  
  <p>My question is whether this is the intended behavior of Civi. This redirect seems rather odd to me.</p>
  
  <p>I'm using Civi 4.6.8 with Wordpress 4.3.1 (multisite). I use a shortcode to load the contribution form into the Wordpress page (but without hijacking the whole page).</p>
  
  <p>UPDATE:<br>
  I tried this on the Civi Wordpress demo site - <a href="http://wp46.demo.civicrm.org/contribution-page" rel="nofollow">http://wp46.demo.civicrm.org/contribution-page</a> - and I get the absolutely same behavior. First a truncated URL and a redirect to the complete URL. I also tried the test-drive link on the backend: <a href="http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fcontribute%2Ftransact&amp;reset=1&amp;id=1&amp;action=preview" rel="nofollow">http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fcontribute%2Ftransact&amp;reset=1&amp;id=1&amp;action=preview</a> . When clicking Confirm Contribution there is again a redirect and then we get to the complete URL. So this redirect behavior doesn't seem to be related to the use of the shortcode.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-08T00:46:45.783Z
Comments.Text: it is often worth comparing what happens on your site with what happens on the demo site and then asking why it might be different on your set up.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-08T12:55:50.820Z
Comments.Text: Good idea, @petednz-fuzion. I tried it on http://wp46.demo.civicrm.org/contribution-page/ and I get the absolutely same behavior. First a truncated URL and a redirect to the complete URL. I also tried the test-drive link on the backend: http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=1&action=preview . When clicking Confirm Contribution there is again a redirect and then we get to the complete URL. So this redirect behavior doesn't seem to be related to the use of the shortcode.
Comments.UserDisplayName: Borislav Zlatanov
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-08T19:35:20.560Z
Comments.Text: great - always worth giving others a steer on what 'expected' behaviour and 'demo' behaviour is. suggest you Edit the OP with some of that info to make sure it is upfront for others. Can't help you further myself.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-10T01:05:22.513Z
Comments.Text: also perhaps worth confirming are the outcomes the same when you use Pay Later v Payment Processor? Wondering if it might be a payment processor issue but you provide no details in that respect
Comments.UserDisplayName: petednz - fuzion
Tags: <wordpress><contribution-page><redirect>
Title: Is Civi supposed to redirect after a contribution form submission?
ThreadText: # Is Civi supposed to redirect after a contribution form submission?
  
  (Asked by: username_0 on 2015-12-07)
  
  When submitting a contribution form, I first get taken to what seems like a truncated URL: `https://mysite.example.com/donate/?page=CiviCRM&q=civicrm/contribute/transact`. The HTTP response code is 302 and I get redirected to `https://mysite.example.com/donate/?page=CiviCRM&q=civicrm/contribute/transact&_qf_Confirm_display=true&qfKey=ea68d5378e175112aace8d733a982f53_5648`. Then the response code is 200 and the page displays all fine. I'm seeing all of this in the Network tab of the browser's developer tool.
  
  My question is whether this is the intended behavior of Civi. This redirect seems rather odd to me.
  
  I'm using Civi 4.6.8 with Wordpress 4.3.1 (multisite). I use a shortcode to load the contribution form into the Wordpress page (but without hijacking the whole page).
  
  UPDATE:  
  I tried this on the Civi Wordpress demo site - <http://wp46.demo.civicrm.org/contribution-page> - and I get the absolutely same behavior. First a truncated URL and a redirect to the complete URL. I also tried the test-drive link on the backend: <http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=1&action=preview> . When clicking Confirm Contribution there is again a redirect and then we get to the complete URL. So this redirect behavior doesn't seem to be related to the use of the shortcode.
  
  **Tags:** wordpress, contribution-page, redirect
  
  > **Comments:**
  > **username_1**: it is often worth comparing what happens on your site with what happens on the demo site and then asking why it might be different on your set up.  
  > **username_0**: Good idea, @username_1. I tried it on http://wp46.demo.civicrm.org/contribution-page/ and I get the absolutely same behavior. First a truncated URL and a redirect to the complete URL. I also tried the test-drive link on the backend: http://wp46.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=1&action=preview . When clicking Confirm Contribution there is again a redirect and then we get to the complete URL. So this redirect behavior doesn't seem to be related to the use of the shortcode.  
  > **username_1**: great - always worth giving others a steer on what 'expected' behaviour and 'demo' behaviour is. suggest you Edit the OP with some of that info to make sure it is upfront for others. Can't help you further myself.  
  > **username_1**: also perhaps worth confirming are the outcomes the same when you use Pay Later v Payment Processor? Wondering if it might be a payment processor issue but you provide no details in that respect  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-12-10. Score: 2 | Accepted answer
  
  So when filling the form, you submit it (the data is into the post, so you have the feeling it's truncated as you don't see the params in the log/net tab). Once that data is processed, it needs to display something (the confirmation that everything went well).
  
  They are two ways of doing that:
  - either the result of the post is the confirmation message
  - or you redirect to another page that displays the confirmation message
  
  the second one (the one yo experienced) has several benefits: it's easier to redirect to another page (so you have a completely custom and different thank you page from outside of civi, and as importantly, it allows you to reload the confirmation page without resubmitting the contribution (that's why you have warning from your browser when you reload a page after you submit something)
  
  Now, that design choice made many years ago doesn't make that much sense when you have forms in ajax (eg. with payment providers like stripe), but I don't think it's a problem to do a redirect, it doesn't create a major speed difference.
  
  So in short: it's normal behaviour, nothing to worry about ;)
  
  
  ---
  
  