This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » User management plugins » sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #98809 is a reply to message #98808 ] Mon, 10 May 2010 20:32 Go to previous messageGo to next message
zuby  is currently offline zuby
Messages: 9
Registered: May 2010
Location: Lagos, Nigeria
Junior Member
i have reloaded Apache and cleared cache but i still get the same thing. Please find attached the snapshot

Thanks

  • Attachment: snapshot.jpg
    (Size: 114.16KB, Downloaded 71 time(s))

Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #98810 is a reply to message #98809 ] Mon, 10 May 2010 20:54 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
let see....

You've got the validation code in db, right?

What will be the result of this query for you:

SELECT * FROM sf_guard_user AS u
INNER JOIN sf_guard_user_profile AS p ON u.id = p.user_id
WHERE p.validate = '>your validation code here<';


?

Maybe try this dql there:

$sfGuardUser = Doctrine_Query::create()
->from("sfGuardUser u")
->innerJoin("u.Profile p )->where('p.validate = ?", $validate)
->fetchOne();


Also, do you have all methods declared in Base profile table?
Last thing, which version of sfForked do you use?
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #98811 is a reply to message #98810 ] Mon, 10 May 2010 21:25 Go to previous messageGo to next message
zuby  is currently offline zuby
Messages: 9
Registered: May 2010
Location: Lagos, Nigeria
Junior Member
yes i have the validate code in the sf_guard_user_profile table e.g "n5971d371fe373a9a5555e98850e634ba"

The result of the query is a result set of the columns from the two tables

I just tried the code you gave me for the sfApplyActionsLibrary now, i think it worked but now i get the invalid confirmation code error, see error message below

That confirmation code is invalid.

This may be because you have already confirmed your account. If so, just click on the "Log In" button to log in.

Other possible explanations:

1. If you copied and pasted the URL from your confirmation email, please make sure you did so correctly and completely.

2. If you received this confirmation email a long time ago and never confirmed your account, it is possible that your account has been purged from the system. In that case, you should simply apply for a new account.

Continue


I think i all the methods as i have not touched the Base profile table since the plugin installation. and I am using version 1.2.0
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #98821 is a reply to message #98811 ] Mon, 10 May 2010 23:58 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
That's really odd. What else might be wrong...
What's your MySQL version?

Has your table InnoDB type?

try to run this query:

SELECT * FROM sf_guard_user s INNER JOIN sf_guard_user_profile s2 ON s.id = s2.user_id AND (s2.validate = 'YOUR_VALIDATE_CODE')


That's what the current dql (1.2.x series) produces.
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #98846 is a reply to message #98821 ] Tue, 11 May 2010 10:58 Go to previous messageGo to next message
zuby  is currently offline zuby
Messages: 9
Registered: May 2010
Location: Lagos, Nigeria
Junior Member
Hello fykz,

MySQL version is 5.1.41 and all my tables are InnoDB.

Looking at the Code from sfApplyActionsLibrary.class.php below, it seems the query generates nothing (which is wrong) making the condition true and thus returning invalid

$sfGuardUser = Doctrine_Query::create()
->from("sfGuardUser u")
->innerJoin("u.Profile p )->where(p.validate = ?", $validate)
->fetchOne();

if (!$sfGuardUser)
{
return 'Invalid';
}


Also when i try reseting password with email i get the "unknown email column" error and reseting with username gives me Unknown record property / related component "validate" on "Auto". please see the attached screenshots

i think the bug is somehow related. thanks

Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #99292 is a reply to message #98821 ] Tue, 18 May 2010 13:27 Go to previous messageGo to next message
zuby  is currently offline zuby
Messages: 9
Registered: May 2010
Location: Lagos, Nigeria
Junior Member
hello fizky,

Its been a while, i've been occupied with other things but now i'am back and the problem is still there!

Please any other ideas? or has anyone experienced this problem?

Please i really need your help. Thanks in advance. Very Happy
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #99332 is a reply to message #99292 ] Tue, 18 May 2010 22:23 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
hello zuby,

I'm quite occupied myself right now, but when I tried, I just couldn't reproduce the error you were getting.

Maybe you could create clean project just with this plugin, set it by the book, and see if the error will occur there as well?
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100697 is a reply to message #92774 ] Wed, 09 June 2010 23:54 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Hi all,
I have a problem, the registration works fine and it sends the confirmation email but when one clicks on the link in the email to validate the account i get this error:

500 | Internal Server Error | Doctrine_Table_Exception
Unknown relation alias Profile


In my DB there isn't Profile table, but I've followed installing steps in both plugins.

How do i solve this problem please?
I'm using symfony 1.4.5 and sfForkedDoctrineApplyplugin version 1.1.1

thanks.
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100744 is a reply to message #100697 ] Thu, 10 June 2010 17:32 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
not profile table, but sf_guard_user_profile. Do you have that?
And if you do... could you paste the profile declaration from your code?
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100749 is a reply to message #92774 ] Thu, 10 June 2010 19:46 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Yes, I have sf_guard_user_profile table in my DB.

My profile declaration:

sfGuardUserProfile:
  inheritance:
    type: simple
    extends: sfGuardUserProfileBasis
  # Don't forget this!
  relations:
    User:
      class: sfGuardUser
      foreign: id
      local: user_id
      type: one
      onDelete: cascade
      foreignType: one
      foreignAlias: Profile

[Updated on: Thu, 10 June 2010 20:03]

Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100751 is a reply to message #100749 ] Thu, 10 June 2010 20:13 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
so you've got all you'd need to have. Is there registered profile in your db, that has user id?

Unknown relation alias Profile means it's trying to leftJoin Profile, but somewhat it can't... could you debug it and check what dql/sql query it's trying to do?
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100755 is a reply to message #92774 ] Thu, 10 June 2010 21:40 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Yes, the profile has user_id.

I haven't done anything (only doctrine:build... and clear:cache) and now the problem is:

Unknown column validate


# at Doctrine_Query->fetchOne()
in SF_ROOT_DIR/plugins/sfForkedDoctrineApplyPlugin/lib/action/sfApplyActionsLibrary.class.php line 151 ...
#     $sfGuardUser = Doctrine_Query::create()
#         ->from("sfGuardUser u")
#         ->innerJoin("u.Profile p with p.validate = ?", $validate)
#         ->fetchOne();


Doctrine and schemas drive me crazy...
with each passing day I undertand less symfony and it behavior Sad
Sad
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100757 is a reply to message #100755 ] Thu, 10 June 2010 22:03 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
build and cc are the things that can help sometimes.

unknown column validate... it should be there. since it's declared in the Basis, which profile inherits...

Could you check Base files for that model as well?
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100758 is a reply to message #92774 ] Thu, 10 June 2010 22:10 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

yes i have the validate code in the sf_guard_user_profile table, and it corresponds with verification mail one.
I get the error when I click url verification mail.

Could you tell me please wich steps do you use when you modify you schema file???
I always do:
- php symfony cc
- php symfony doctrine:build-model
- php symfony doctrine:build-forms
- php symfony doctrine:build-filters
- php symfony doctrine:build-sql
- php symfony doctrine:insert-sql

So, this way I'm sure that I'm generating all new but... sometimes it works, sometimes it crashes...

Whick Base files are you asking for? sfForkedDoctrineApplyPlugin/base/BasesfGuardUserProfileBasis .class.php?
I have it in lib/model/doctrine folder

[Updated on: Thu, 10 June 2010 22:23]

Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #100759 is a reply to message #100758 ] Thu, 10 June 2010 22:35 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
./symphony doctrine:generate-migrations-diff
//I review migrations then
./symphony doctrine:migrate
./symphony doctrine:build --all-classes
./symphony cc


It's sometimes good to clear old model files as well (after diff).
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #101148 is a reply to message #92774 ] Thu, 17 June 2010 19:15 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Does anyone use reCaptcha?

sfForkedDoctrineApplyPlugin readme says: "reCaptcha will appear on apply and reset request pages."

It appears only on my apply page, does it appear in your reset request pages?

Thanks.

PS: i've installed sfFormExtraPlugin and i've edited app.yml like in readme file.

[Updated on: Thu, 17 June 2010 19:17]

Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #101150 is a reply to message #101148 ] Thu, 17 June 2010 19:34 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
It's appearing on reset request page, but it shouldn't be visible, when you're logged in
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #101303 is a reply to message #100759 ] Mon, 21 June 2010 10:52 Go to previous messageGo to next message
zuby  is currently offline zuby
Messages: 9
Registered: May 2010
Location: Lagos, Nigeria
Junior Member
fizyk wrote on Thu, 10 June 2010 21:35

./symphony doctrine:generate-migrations-diff
//I review migrations then
./symphony doctrine:migrate
./symphony doctrine:build --all-classes
./symphony cc


It's sometimes good to clear old model files as well (after diff).


Hi Neox, does the solution above solve your "validate" problem? because i also have the same problem.

I look forward to your response or anyone who had the same problem with a solution.

thanks guys,
zuby
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #101406 is a reply to message #92774 ] Tue, 22 June 2010 11:28 Go to previous messageGo to next message
NeoX  is currently offline NeoX
Messages: 58
Registered: March 2010
Location: Spain
Member

Hi zuby,
finally I resolved it uninstalling sfDoctrineGuardPlugin, sfForkedDoctrineApplyPluging and starting from scratch.

1.- Rebuild my model, forms and filters.
2.- Install sfDoctrineGuardPlugin and test it.
3.- Install sfForkedDoctrineApplyPlugin and test it.

Hope this helps!
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #103207 is a reply to message #101406 ] Wed, 28 July 2010 18:42 Go to previous messageGo to next message
fortx  is currently offline fortx
Messages: 28
Registered: June 2010
Location: Santo Domingo, Dominican ...
Junior Member
I am using the DoctrineApplyPlugin with the schema modifications and inheritance and i get this error:

Fatal error: Class 'sfValidatorNotDefault' not found in /opt/lampp/htdocs/unfuddle2/hcnfresco/lib/form/doctrine/sfApplyApplyForm.class.php on line 123
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #103209 is a reply to message #103207 ] Wed, 28 July 2010 19:40 Go to previous messageGo to next message
stephenrs  is currently offline stephenrs
Messages: 22
Registered: January 2010
Junior Member
It should be safe to remove (or comment out) all references to sfValidatorNotDefault from sfApplyApplyForm.class.php. The sfValidatorNotDefault validator was a custom validator that I wrote as part of the original hack that started this thread - I needed it for the specific project I was working on. It is not needed for the core plugin itself to function properly, and as far as I know has not been implemented as part of the plugin package.

Also, make sure that you have the latest version of the forked plugin, which has evolved substantially since the original hack, and is being maintained by fizyk.

Good luck.
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #103221 is a reply to message #92774 ] Thu, 29 July 2010 04:47 Go to previous messageGo to next message
fortx  is currently offline fortx
Messages: 28
Registered: June 2010
Location: Santo Domingo, Dominican ...
Junior Member
I am having this error after doing the readme of teh forked version 1.3.2.

The "sfGuardUserProfile" model has to "SfGuardUser" relation.
Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #103255 is a reply to message #103221 ] Thu, 29 July 2010 18:06 Go to previous messageGo to next message
fizyk  is currently offline fizyk
Messages: 64
Registered: December 2009
Location: Western Slavic Republic
Member
Do you have that error in your own code, or within plugin's files? Relation alias is User
icon10.gif  Re: sfDoctrineApplyPlugin - Undocumented steps to make it work, and without Zend_Mail [message #103262 is a reply to message #103221 ] Fri, 30 July 2010 00:25 Go to previous message
fortx  is currently offline fortx
Messages: 28
Registered: June 2010
Location: Santo Domingo, Dominican ...
Junior Member
fortx wrote on Wed, 28 July 2010 22:47

I am having this error after doing the readme of teh forked version 1.3.2.

The "sfGuardUserProfile" model has to "SfGuardUser" relation.



I solved the problem including the proper modifications of factories.yml now I can register users and send mail to them Very Happy
Thanks a lot for the Forked
Previous Topic:sfForkedDotrctineApplyPlugin is broken (latest version)
Next Topic:Customize sfGuard or use sfApply
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software