Skip to Content Skip to Menu

Serverside validation reloads the wrong page

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
10 years 3 months ago #247433 by carin
My registration page is: /index.php?Itemid=242&option=com_comprofiler&task=registers

When the serverside validation finds something wrong and reloads the page, this comes up: /index.php?Itemid=242&option=com_comprofiler
Why is the &task=registers missing? That messes up the sh404SEF because it thinks it is a different page. Can this please get fixed soon? Thanks

CB 2.0

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

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
10 years 3 months ago #247443 by carin
I just realised that the link in the form action is wrong:

<form action="http://localhost/demo/register.html


Why does CB insert the SEF link instead of the raw link? It should be:

<form action="http://localhost/demo/index.php?option=com_comprofiler&task=registers&Itemid=242&lang=en


That way no SEF component would mess up the form. Can that be fixed? Thanks

CB 2.0

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

  • carin
  • carin
  • OFFLINE
  • Posts: 417
  • Thanks: 18
  • Karma: 0
10 years 3 months ago #247453 by carin
There is yet another flaw in th system: When the serverside validation finds something wrong and reloads the page, the task changes from "task-registers" to "task-saveregisters". What the heck is going on here???

CB 2.0

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 3 months ago - 10 years 3 months ago #247477 by krileon
Replied by krileon on topic Serverside validation reloads the wrong page
Validation errors aren't a redirect. It just redisplays the registration if save registration fails. This allows POST fall through so the fields the user already completed will stay completed (excluding a few security related ones like password).

If it redirects you lose the POST unless it's passed through the session, which is not a good idea to pass possibly upwards of 100 fields (or more) through a users session. The alternative is tacking all those onto the URL so they're sent as GET, which is impossible to do as GET has a length limit so fields would get cut off.

In short you need to SEF "registers" and "saveregisters" as needed. When sh404SEF creates the rewrite rule just change what it rewrites to to whatever you want.

Note this will change in the future once frontend is XML driven like backend is in CB 2.0. This is planned for CB 2.1, but no guarantee.


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.
Last edit: 10 years 3 months ago by krileon.

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

Moderators: beatnantkrileon
Powered by Kunena Forum