kumarsivarajan / yii-usergroups

Automatically exported from code.google.com/p/yii-usergroups
0 stars 0 forks source link

Registration fails to validate #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Submit registration form

What is the expected output? What do you see instead?
From the code, i should expect to be redirected and see a flash message saying 
the activation email has been delivered.

Instead, I receive validation errors that the username and email already exist. 
Took a look at the table and saw that a new record was somehow created before 
the validation took place.

What version of the product are you using? On what operating system?
1.7.1 on ubuntu

Please provide any additional information below.
Still trying to debug this issue but figured i'd file a report first.

Original issue reported on code.google.com by omnomnom...@gmail.com on 9 Jun 2011 at 12:06

GoogleCodeExporter commented 8 years ago
Can't pinpoint the cause of this problem..

Added a trace to the beforeValidate method. It triggered once as expected.

Added a trace to the beforeSave method. It never triggered.

Yet, the new record was created with the information supplied. No mail was sent.

Original comment by omnomnom...@gmail.com on 9 Jun 2011 at 12:53

GoogleCodeExporter commented 8 years ago
i just tried it out once again, and everything worked perfectly... it's 
extremely weird that the record was created...
there's no ajax validation nor ajax submit, so untill you press the submit 
button no other request can be sent to the database...

anyway the model rules do not allow such a behavior...

for the email issue are you sure that you can actually send emails from your 
development server?

Original comment by nic...@creationgears.com on 9 Jun 2011 at 1:58

GoogleCodeExporter commented 8 years ago
Yes, I have gotten emails to work previously. Still at a loss as to whats
going on here! Its been a very frusterating new hours of debugging this
issue for me.

Somewhere somehow the model is getting saved prior to the initial
validation.. without triggering beforesave(); either.. how bizzare!

Original comment by omnomnom...@gmail.com on 9 Jun 2011 at 2:15

GoogleCodeExporter commented 8 years ago
Okay, I've solved the issue. Checking the application.log revealed that my 
adminEmail param was missing (my config file was overwritten by an older 
version!)

I suggest adding this into the documentation somewhere, because it is pretty 
easy to overlook and there wasn't any error message!

Original comment by omnomnom...@gmail.com on 9 Jun 2011 at 4:06

GoogleCodeExporter commented 8 years ago
i think i'll just force during installation this as a requirement!

thanks a lot

Original comment by nic...@creationgears.com on 10 Jun 2011 at 7:38