• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
xss_clean and moveing from 2.2 to 3.0


I just moved our app from ci 2.2 to 3.0 and we getting errors with forms (registration, login, email/password remainder ), where xss_clean is added to validation, for example:
the following error is generated on the every form on submit:
"Unable to access an error message corresponding to your field name"
(Probably something easy and obvious but not sure why is this happening, checked upgrading from a previous version and probably i missed something)


Are you able to create a minimal example that I could run on my computer?

If you removed all the code of your app, while the problem still is reproducable, and then zipped that up, I would run it on my computer and solve the issue.


You seem to have a custom validation method somewhere in there. It usually starts with "callback_" (you can find more info on callback validation here: http://www.codeigniter.com/userguide3/li...on-methods). If this is not the case, you should look for a MY_Validation.php. Maybe the problem is in there.

ensure that the input field attribute name = "email" in your HTML form

Thanks for the help. It seems that the problem was that we did not autoload helper 'security'. When we removed xss_clean from validation it works ok. (it looks like in previous ci 2.2 there was no need for it when using validation with xss_clean?). We moved app like 2 days ago and left old autoload.php - from ci 2.2 except drivers - where we added session.
Strange, but it works now.
Thanks for ideas.

This is explained in the upgrade instructions: https://github.com/bcit-ci/CodeIgniter/b...ation-rule

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.