Skip to Content Skip to Menu

[SOLVED] Redirect on registration

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
8 years 8 months ago #288869 by carin
Replied by carin on topic Redirect on registration
I dont know what that means: "That's not going to work because your string will URL encode. You need to specify strictly your URL as the substitution. Example as follows. URL: [post_returnurl]"
As I said earlier: "But the [post_HIDDEN_INPUT_NAME] gives "http%3A%2F%2Flocalhost%2Fkiwi%2Fde%2Flisting.html" which gives a 404." I updated CB today again, does not help. So for me it is impossible to figure out what that field actually requieres to get it to work.

Again, the trigger onAfterLogin puts out the correct URL, the trigger onAfterSaveUserRegistration puts out http://localhost/[post_HIDDEN_INPUT_NAME]. Again, why does the trigger matters on the output?

Can you please switch that off. It is really enoying when you edit your posts:
"Flood protection! Please wait 240 seconds before submitting an another message."

CB 2.0

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49447
  • Thanks: 8467
  • Karma: 1465
8 years 8 months ago #288872 by krileon
Replied by krileon on topic Redirect on registration
The trigger doesn't matter. Why would your hidden input added to the registration form work at all on the after login trigger. It shouldn't. For login we specifically send the return URL with the trigger as the form generates it. It does this by base64 encoding it then during login it's decoded and sent with the trigger. Your custom usage needs to do the same. You need to base64 encode it, set it for the value of your hidden input, then base64 decode it in your action with the format functions. If still not working then you probably need to make a custom plugin to do this properly with a fieldtype plugin.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
8 years 8 months ago - 8 years 8 months ago #288876 by carin
Replied by carin on topic Redirect on registration
"The trigger doesn't matter."
==> In my installation it does becasue the redirect works afterLogin but not afterRegistration.

"Why would your hidden input added to the registration form work at all on the after login trigger. It shouldn't."
==>It does work, becasue the login form sits next to the reg form. CB has a setting to do that.

With base64 decode the login redirect still works but afterResitration gives: http://localhost/%A6%8B-%93%08+y%D8%ABy%CB

EDIT: I checked: my hidden field: aHR0cDovL2xvY2FsaG9zdC9raXdpL2RlL2xpc3RpbmcuaHRtbCN3aHk=
That decodes to http://localhost/kiwi/de/listing.html#why - so why does the redirect action put out http://localhost/%A6%8B-%93%08+y%D8%ABy%CB ??? URL field: [cb:parse function="decode" method="base64"][post_HIDDEN_INPUT_NAME][/cb:parse]

CB 2.0
Last edit: 8 years 8 months ago by carin.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49447
  • Thanks: 8467
  • Karma: 1465
8 years 8 months ago #288880 by krileon
Replied by krileon on topic Redirect on registration

"The trigger doesn't matter."
==> In my installation it does becasue the redirect works afterLogin but not afterRegistration.

That's because there is code for a redirect URL in the login trigger. There is none for the registration process, which is why you have to completely implement it.

"Why would your hidden input added to the registration form work at all on the after login trigger. It shouldn't."
==>It does work, becasue the login form sits next to the reg form. CB has a setting to do that.

The login form sitting next to the registration form is an entirely different HTML form. They do not share inputs or endpoints.


With latest CB and CB Auto Actions the below works perfectly fine (attached as text as forum security doesn't like the code).

File Attachment:

File Name: registrati...ions.txt
File Size:0 KB


The first action sets the hidden input to the current URL (this is of course the registration page) and base64 encodes it. The second action decodes it and redirects to it. Your issue is either you're not up to date, something isn't configured properly, or however you're sending the URL is already being urlencoded before sent.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in or Create an account to join the conversation.

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
8 years 8 months ago #288893 by carin
Replied by carin on topic Redirect on registration
Thank you for the enduring support. It works now. I think I found the reason. I made separate hidden fields for reg and login and separate redirect actions for reg and login without any en- or decoding.

CB 2.0
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum