Answers.Body: <p>Fix proposed here to turn off the cleansing of the redirect URL:
  <a href="https://github.com/civicrm/civicrm-core/pull/6183" rel="nofollow">https://github.com/civicrm/civicrm-core/pull/6183</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-09T22:46:40.660Z
Answers.LastActivityDate: 2015-07-09T22:46:40.660Z
Answers.UserDisplayName: Lionel Smith-Gordon
Answers.Body: <p>As suggested on the question related to Contributions above, I have duplicated this error on the demo site.</p>
  
  <p>I created a profile that gives the option to login and, after logging in, the redirection failed due to this invalid URL:
  <a href="http://joomla.demo.civicrm.org/index.php?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=8" rel="nofollow">http://joomla.demo.civicrm.org/index.php?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=8</a></p>
  
  <p>I think the problem is in the coding of this link (which is used to redirect the user to login):
  <a href="http://joomla.demo.civicrm.org/index.php?option=com_users&amp;view=login&amp;return=aHR0cDovL2pvb21sYS5kZW1vLmNpdmljcm0ub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2Npdmljcm0mYW1wO3Rhc2s9Y2l2aWNybS9ldmVudC9yZWdpc3RlciZhbXA7cmVzZXQ9MSZhbXA7aWQ9OA%3D%3D" rel="nofollow">http://joomla.demo.civicrm.org/index.php?option=com_users&amp;view=login&amp;return=aHR0cDovL2pvb21sYS5kZW1vLmNpdmljcm0ub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2Npdmljcm0mYW1wO3Rhc2s9Y2l2aWNybS9ldmVudC9yZWdpc3RlciZhbXA7cmVzZXQ9MSZhbXA7aWQ9OA%3D%3D</a></p>
  
  <p>I am going to raise a bug and will post the link here after.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-09T16:54:46.747Z
Answers.Text: https://issues.civicrm.org/jira/browse/CRM-16827
Answers.UserDisplayName: Lionel Smith-Gordon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-09T16:48:29.150Z
Answers.LastActivityDate: 2015-07-09T16:48:29.150Z
Answers.UserDisplayName: Lionel Smith-Gordon
Body: <p>I've implemented user accounts during Event registration by enabling the profile's advanced settings to give the user the option to create a Joomla account.</p>
  
  <p>When a user registers for an event, they are correctly offered the chance to sign-up or login:</p>
  
  <blockquote>
    <p>If you would like to create an account on this site, check the box below and enter a Username and a password. If you already have an account please login before completing this form.</p>
  </blockquote>
  
  <p>The 'login' word above is hotlinked to a page which allows the user to login and then CiviCRM should return the user back to the Event Registration page.  It does not - after logging in, the user just gets a blank page.</p>
  
  <p>The reason seems to be that the redirect page is malformed; it is:</p>
  
  <pre><code>/index.php?option=com_civicrm&amp;amp;task=civicrm/event/register&amp;amp;reset=1&amp;amp;id=60
  </code></pre>
  
  <p>when it should be:</p>
  
  <pre><code>/index.php?option=com_civicrm&amp;task=civicrm/event/register&amp;reset=1&amp;id=60
  </code></pre>
  
  <p>The &amp; concatenators in the URL are being incorrectly escaped.  Any ideas how to address this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-08T23:16:53.357Z
Comments.Text: I believe this is the same problem that has previously been reported for Contributions here: http://civicrm.stackexchange.com/questions/3033/return-after-login-going-through-contribution-flow-doenst-bring-up-contribution
Comments.UserDisplayName: Lionel Smith-Gordon
Tags: <civievent><joomla><user-account>
Title: Redirect back to Event Registration after login fails
ThreadText: # Redirect back to Event Registration after login fails
  
  (Asked by: username_0 on 2015-07-08)
  
  I've implemented user accounts during Event registration by enabling the profile's advanced settings to give the user the option to create a Joomla account.
  When a user registers for an event, they are correctly offered the chance to sign-up or login:
  
  If you would like to create an account on this site, check the box below and enter a Username and a password. If you already have an account please login before completing this form.
  
  The 'login' word above is hotlinked to a page which allows the user to login and then CiviCRM should return the user back to the Event Registration page.  It does not - after logging in, the user just gets a blank page.
  The reason seems to be that the redirect page is malformed; it is:
  /index.php?option=com_civicrm&task=civicrm/event/register&reset=1&id=60
  
  when it should be:
  /index.php?option=com_civicrm&task=civicrm/event/register&reset=1&id=60
  
  The & concatenators in the URL are being incorrectly escaped.  Any ideas how to address this?
  
  **Tags:** civievent, joomla, user-account
  
  > **Comments:**
  > **username_0**: I believe this is the same problem that has previously been reported for Contributions here: http://civicrm.stackexchange.com/questions/3033/return-after-login-going-through-contribution-flow-doenst-bring-up-contribution  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-07-09. Score: 1
  
  Fix proposed here to turn off the cleansing of the redirect URL:
  <https://github.com/civicrm/civicrm-core/pull/6183>
  
  
  ---
  
  ### Answer by username_0 on 2015-07-09. Score: 0
  
  As suggested on the question related to Contributions above, I have duplicated this error on the demo site.
  
  I created a profile that gives the option to login and, after logging in, the redirection failed due to this invalid URL:
  <http://joomla.demo.civicrm.org/index.php?option=com_civicrm&task=civicrm/event/register&reset=1&id=8>
  
  I think the problem is in the coding of this link (which is used to redirect the user to login):
  <http://joomla.demo.civicrm.org/index.php?option=com_users&view=login&return=aHR0cDovL2pvb21sYS5kZW1vLmNpdmljcm0ub3JnL2luZGV4LnBocD9vcHRpb249Y29tX2Npdmljcm0mYW1wO3Rhc2s9Y2l2aWNybS9ldmVudC9yZWdpc3RlciZhbXA7cmVzZXQ9MSZhbXA7aWQ9OA%3D%3D>
  
  I am going to raise a bug and will post the link here after.
  
  > **Comments:**
  > **username_0**: https://issues.civicrm.org/jira/browse/CRM-16827  
  
  ---
  
  