| Problem with _sf_ and requests [message #17864] |
Thu, 14 December 2006 01:02 |
erestar Messages: 114 Registered: November 2005 |
Senior Member |
|
|
This isn't really a bug, but it is kind of a problem.
The issue comes in with plugin development using a certain notation, namely prefixing with sfXXX.
Here's an example:
Suppose I have sfDirectoryList and sfDirectoryEntry, with the joining class being sfDirectoryListEntry.
Also suppose that I want to add entries to a directory when I'm editing it
- snip from generator.yml -
...
display:
"NONE": [name, description]
"Entries": [ sf_directory_entrys ]
...
fields:
...
sf_directory_entrys:
name: Entries
type: admin_double_list
params:
through_class: sfDirectoryListEntry
Everything works as expected, until I add some entries to the directory and save.
The generated field name for the multi-select box holding the selected entries is 'associated_sf_directory_entrys'.
Now, the sfWebRequest object calls loadParameters(), which parses through the variable names and isolates 'symfony' parameters, moving them from the symfony/default namespace to symfony/request/sfWebRequest.
This, of course, causes $this->getRequestParameter() to fail in the action when it tries to save the many to many association.
I'm not saying this is a bug or anything, but does anyone have a way around this?
Thanks.
Jim Podroskey [www.pbtg.com]
|
|
|