Forum

Home » support » General discussion » Propel behavior "paranoid" is not registered
Propel behavior "paranoid" is not registered [message #49286] Sun, 06 April 2008 09:35 Go to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Hello community !
I wanted to create a crud interface for one of my tables in symfony 1.1, so I used
./symfony propel:generate-crud --with-show frontend building_sale BuildingSale

which showed an error:
Fatal error: Class 'BuildingSaleForm' not found in…

So I wanted to use
./symfony propel:build-forms
showed an error too:
Propel behavior "paranoid" is not registered
. I use the Paranoid Plugin in the same application and it works fine, I have no problems with it. I tried to rebuild my model, it worked also fine. I have no idea, why the error message is shown, so please help me Sad !

Thank you
Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #49339 is a reply to message #49286 ] Mon, 07 April 2008 00:41 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1569
Registered: October 2005
Faithful Member
Do you put an object in session somewhere in your code? This error sometimes comes from an object deserialization triggered by an early context initialization before all plugins config.php are parsed... Or, to keep it simple, you should not store an object in session since when the object is restored, Propel behaviors are not ready yet--and that causes the error.
Re: Propel behavior "paranoid" is not registered [message #49768 is a reply to message #49286 ] Fri, 11 April 2008 19:26 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

This should be irrelevant, because I'm using the CLI; or is this wrong ? Anyway, I didn't store an object in the session in the whole symfony-application.

Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #51360 is a reply to message #49286 ] Sun, 04 May 2008 16:32 Go to previous messageGo to next message
DannyRulez  is currently offline DannyRulez
Messages: 19
Registered: December 2007
Location: Puerto Rico
Junior Member
The problem is the sfPropelBehavior::add, if you delete it, it work. (But you need it to use the Behavior Confused )

I think that symfony shouldn't call sfPropelBehavior::add if it's calling from the CLI.

(All the behaviors are throwing this error)
Re: Propel behavior "paranoid" is not registered [message #51624 is a reply to message #49286 ] Thu, 08 May 2008 19:35 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Very strange: If I use an alternative syntax in schema.yml (cookbook) like this:
BuildingSale:
    tableName:    building_sale
    behaviors: [sfPropelParanoidBehavior]
    columns:
      created_at:
      building_id:
      price:        { type: float, required: true }
      seller_id:    { type: integer, required: true }
    foreignKeys:
      -
        foreignTable: user
        references:
          - { local: seller_id, foreign: id }
  

I get an error during generating forms like this:

MacBook:handelsmacht christoph$ ./symfony propel:build-forms
>> propel    generating form classes

Fatal error: Class 'BuildingSalePeer' not found in /Users/christoph/Sites/handelsmacht/lib/symfony/plugins/sfPropelPlugin/lib/propel/generator/sfPropelFormGenerator.class.php on line 106

Call Stack:
    0.0003      54452   1. {main}() /Users/christoph/Sites/handelsmacht/symfony:0
    0.0037     244608   2. include('/Users/christoph/Sites/handelsmacht/lib/symfony/command/cli.php') /Users/christoph/Sites/handelsmacht/symfony:18
    0.3284    2856468   3. sfSymfonyCommandApplication->run() /Users/christoph/Sites/handelsmacht/lib/symfony/command/cli.php:20
    0.3345    3013852   4. sfTask->runFromCLI() /Users/christoph/Sites/handelsmacht/lib/symfony/command/sfSymfonyCommandApplication.class.php:65
    0.3346    3014140   5. sfBaseTask->doRun() /Users/christoph/Sites/handelsmacht/lib/symfony/task/sfTask.class.php:75
    0.4077    3017016   6. sfPropelBuildFormsTask->execute() /Users/christoph/Sites/handelsmacht/lib/symfony/task/sfBaseTask.class.php:61
    0.4087    3047024   7. sfGeneratorManager->generate() /Users/christoph/Sites/handelsmacht/lib/symfony/plugins/sfPropelPlugin/lib/task/sfPropelBuildFormsTask.class.php:71
    0.4104    3193692   8. sfPropelFormGenerator->generate() /Users/christoph/Sites/handelsmacht/lib/symfony/generator/sfGeneratorManager.class.php:82
    0.5922    8100164   9. constant() /Users/christoph/Sites/handelsmacht/lib/symfony/plugins/sfPropelPlugin/lib/propel/generator/sfPropelFormGenerator.class.php:86


It seems very weird to me, please help me !

Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #51629 is a reply to message #49286 ] Thu, 08 May 2008 21:00 Go to previous messageGo to next message
alxkn  is currently offline alxkn
Messages: 27
Registered: June 2007
Junior Member
Looks like your schema file has errors. You should correct it, then delete model folder and rebuld the model again. Hope this will help.
Re: Propel behavior "paranoid" is not registered [message #51630 is a reply to message #49286 ] Thu, 08 May 2008 21:12 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

I dont think that there are any errors in the schema.yml, because the model files are created successfully (I can also use them) and there is also a file called "BuildingSalePeer.php". Which kind of errors do you think of (is this correct English ?) ?

Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #51631 is a reply to message #51624 ] Thu, 08 May 2008 21:16 Go to previous messageGo to next message
alxkn  is currently offline alxkn
Messages: 27
Registered: June 2007
Junior Member
nosilume wrote on Thu, 08 May 2008 19:35



Fatal error: Class 'BuildingSalePeer' not found in /Users/christoph/Sites/handelsmacht/lib/symfony/plugins/sfPr opelPlugin/lib/propel/generator/sfPropelFormGenerator.class. php on line 106




This means that symfony cannot find BuildingSalePeer class. I had this kind of problem before, and closing } was missing in my schema file after phpName. But besides that you should manually delete model folder, in order completely solve the problem.
Re: Propel behavior "paranoid" is not registered [message #51632 is a reply to message #49286 ] Thu, 08 May 2008 21:23 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Very strange. If I comment out this line:
behaviors: [sfPropelParanoidBehavior]

everything works. But if I enable it, the FATAL ERROR: File not found… error shows up. I deleted my model folder and rebuild it.

Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #51633 is a reply to message #49286 ] Thu, 08 May 2008 21:27 Go to previous messageGo to next message
alxkn  is currently offline alxkn
Messages: 27
Registered: June 2007
Junior Member
Unfortunately, I have never used behaviours.
The error, for sure, means that the syntax in schema file is not correct for the line you specified. Try to specify it using different syntax.
Re: Propel behavior "paranoid" is not registered [message #51634 is a reply to message #49286 ] Thu, 08 May 2008 21:30 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Ok, I will check it (tomorrow). It simply seems very weird to me, because the model files are working. Is it possible, that the error occurs because I merge two schemas (one written in the old syntax, the other in the new syntax, like in the cookbook) ?

Christoph

PS: I'm using 1.1 RC1

[Updated on: Thu, 08 May 2008 21:31]


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #52016 is a reply to message #49286 ] Wed, 14 May 2008 23:21 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Does nobody have an idea ? It's really annoying, because my workaround is not using this behavior Sad


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #52234 is a reply to message #49286 ] Sat, 17 May 2008 17:01 Go to previous messageGo to next message
tali  is currently offline tali
Messages: 1
Registered: May 2008
Junior Member
Hi,

I have a same problem width sfPropelParanoidBehaviorPlugin.

I just forgot delete line sfPropelBehavior::add('Users', array('paranoid')); in my Class Users
Re: Propel behavior "paranoid" is not registered [message #52235 is a reply to message #49286 ] Sat, 17 May 2008 17:26 Go to previous messageGo to next message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Sorry, I don't understand you, could you please explain it to me in detail ? Thank you very much,

Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Re: Propel behavior "paranoid" is not registered [message #52363 is a reply to message #52235 ] Tue, 20 May 2008 15:55 Go to previous message
nosilume  is currently offline nosilume
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member

Does nobody, not even the developers of symfony, know how to solve this bug ? @tali, please could you explain again, what do you mean.

Christoph


As I'm still learning English, I would appreciate all suggestions how to improve my language skills. Thank you !
Previous Topic:Problems with translation and I18N
Next Topic:Objects_for_select (show selected) --> pass an array ?
Goto Forum:
  

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