Development

#3502 (Behavior registration bug in propel tasks)

You must first sign up to be able to contribute.

Ticket #3502 (closed defect: fixed)

Opened 4 days ago

Last modified 3 days ago

Behavior registration bug in propel tasks

Reported by: arcane Assigned to: fabien
Priority: major Milestone: 1.1.0 RC2
Component: plugins Version: 1.1.0 RC1
Keywords: plugin behaviour registered Cc:
Qualification: Unreviewed

Description

This bug appears in BETA4 and RC1, it was not present in BETA3 - so it is likely to do with the new configuration changes. I'll try and depict things clearly for debuggers and then anyone who happens to be working around the bug today like me (ie If you want to continue testing!)

The specific behavior i am experiencing this issue with is in 'sfPropelActAsNestedSetBehaviorPlugin', but it's applicable to all.

The Bug) If i launch the "propel:build-forms" task, it throws:

Propel behavior "actasnestedset" is not registered

Although the behavior is clearly defined correctly in the schema.yml it is not 'registered' in said task. The issue seems to be related in loading the configuration.

Workaround/Hack) It can be forced into working by doing the following hack, edit 'sfPropelPlugin/lib/task/sfPropelBuildFormsTask.class.php' and place the below on line 64

ProjectConfiguration::getApplicationConfiguration('frontend', 'cli', true);

The above hack gets things operational again within that task, however it causes the next issue which ill document for anyone wanting to use it to continue testing.

The Hack Fallout) Now if you launch "propel:build-all-load <app>" it tries to mixin the behaviour twice resulting in the following error:

The class "Base<model>" has already a mixin for method "getLeftValue".

This is caused by the above hack, so if you happen to be using the hack you can work around this by doing the propel:build-all and then subsequent propel:data-load tasks. Such as:

php symfony propel:build-all

php symfony propel:data-load <app>

Change History

05/09/08 13:58:00 changed by fabien

  • milestone set to 1.1.0 RC2.

05/09/08 14:41:48 changed by Kris.Wallsmith

This bug is also documented in #3476, which I just resolved as duplicate.

05/09/08 21:56:37 changed by Kris.Wallsmith

For those of you encountering this bug, just run propel:build-all-load instead of propel:build-all, as the former loads an application (and plugin) configuration.

05/09/08 23:36:22 changed by FabianLange

#3470 is also a dupe of this

05/10/08 14:49:07 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [8896]) fixed behavior registration bug in propel tasks (closes #3502, #3476, #3470 - patch from Kris.Wallsmith)