[symfony-users] PHP-Warning in symfony-lib files when trying to run functional Tests
Hi, when trying to run one of the default, generated functional Tests, PHP throws a warning: - D:\web\symfony1.localhostsymfony test:functional frontend categoryActions # get /category/index PHP sent a warning error at D:\web\libs\symfony-1.2.8\lib\util \sfBrowserBase.class.php line 358 (domdocument::domdocument() expects parameter 2 to be long, string given) Looks like everything went fine. - Does anybody know what went wrong here? As far as I can see, this seems to be an error in the symfony-library files itself...?? Like I already wrote, the content of the test-file is quite simple as it was generated by symfony: - include(dirname(__FILE__).'/../../bootstrap/functional.php'); $browser = new sfTestFunctional(new sfBrowser()); $browser- get('/category/index')- with('request')-begin()- isParameter('module', 'category')- isParameter('action', 'index')- end()- with('response')-begin()- isStatusCode(200)- checkElement('body', '!/This is a temporary page/')- end() ; - I'm using WIndows/XAMPP for Development... Thanks in advance, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Admin-Generator: Filter list-view by foreign table columns
Hi everybody, is there a way to filter by a foreign Table (Model) Column when using the admin-Generator? To be more concrete: I'm using the sfDoctrineGuardPlugin and of course there is also a Profile-Table for my users. Both are tied together using a 1:1- Relationship. To avoid two different Modules in the Admin-Backend, I embedded the Profile-Form into my sfGuardUser-Model, which works fine for me. But what can I do, if I want to filter the List-View not only by the sfGuardUser-Columns (f.e. by Username), but also by Profile- Colums (to search a User by its real name or mail-Adress f.e.). Is there a way to do this? Thank you in advance, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] mergeForm does not store submitted values (while embedForm does)
Hi, I'm trying to embed/merge two Forms together, and while embedForm works perfect, mergeForm doesen't store the values after submitting the form. So, this works fine for me: $sf_guard_user = new BackendsfGuardUserForm($this-getObject()- getsfGuardUser()); $this-embedForm('sf_guard_user', $sf_guard_user); But this one doesnt: $sf_guard_user = new BackendsfGuardUserForm($this-getObject()- getsfGuardUser()); $this-mergeForm($sf_guard_user); It's a curious effect: The form is merged correctly, and submitting it doesn't throw any error-messages. BUT: The Database-Fields are not getting touched, the values aren't stored. Does anybody have an idea...? I don't have a clue...? Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Integrate sfGuardUser and sfGuardUserProfile in the same Admin-Backend Module
Hi everybody, I'm using the sfDoctrineGuardPlugin and it's default Admin-Generator Backend for the sfGuardUser-Model. I'm also using a sfGuardUserProfile- Class for storing Profile-Data, like E-Mail Address, First Name, Date of Birth and so on. How do I integrate my Profile-Class to the sfGuardUser-Backend, so that I can f.e. edit fields from both Tables (sfGuardUser and sfGuardUserProfile) on the same page in the Backend? I don't want to have two backend modules for that (one for the user and another for it's profile) Is there a way to do this? Or do you have a link for a tutorial or something (didn't find anything on Google for this)...? Thank you, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Integrate sfGuardUser and sfGuardUserProfile in the same Admin-Backend Module
I think, I figured out the way it works. I'm going to embed the sfGuardUser-Form in my sfGuardUserProfile-Form :-) On 28 Mai, 22:13, halla dha.maili...@googlemail.com wrote: Hi everybody, I'm using the sfDoctrineGuardPlugin and it's default Admin-Generator Backend for the sfGuardUser-Model. I'm also using a sfGuardUserProfile- Class for storing Profile-Data, like E-Mail Address, First Name, Date of Birth and so on. How do I integrate my Profile-Class to the sfGuardUser-Backend, so that I can f.e. edit fields from both Tables (sfGuardUser and sfGuardUserProfile) on the same page in the Backend? I don't want to have two backend modules for that (one for the user and another for it's profile) Is there a way to do this? Or do you have a link for a tutorial or something (didn't find anything on Google for this)...? Thank you, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Update an existing record from an array
Ok, it's been very late last night :-) $user-fromArray($data)-save(); does NOT work, while... $user-fromArray($data); $user-save(); DOES work. @vladimir: Do you know where's the difference between save() and replace()? On 27 Mai, 10:22, vl4dimir vova...@gmail.com wrote: I`m using replace() method. $object-fromArray($attributes, false); $object-replace(); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Update an existing record from an array
@vladimir: Do you know where's the difference between save() and replace()? Note to myself: RTFM :-) http://www.doctrine-project.org/documentation/manual/1_0/en/component-overview:record:replacing-records --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Using decimal-values throws an routing error
Hi, I'm trying to transport geo-coordinates as part of an URL, but the symfonys routing seems to have problems with the dots in the coordinates... This is how my URL looks like: url: /searchresult/:type/from/:from/to/:to/seats/:seats/.:sf_format And this is how I request it: example.com/searchresult/ride_offer/from/41.151186,9.125039/to/ 46.002482,7.704637/seats/4.xml Do you see any possibility to solve this problem and mask the geo- coordinats in any way? Or do I have to replace the dots in the coordinates into anything else? Thanks for your help, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Routing-Rules: use sf_format only as an optional value
Hi everybody, I'm using different routes for my application, which also determine the response format (xml or json for an REST-based web service). This is an example rule in routing.yml: user_me: url: /user/me.:sf_format params: { module: user, action: getUserMe } requirements: { sf_method: GET, sf_format: (?:xml|json) } Is there a way to set sf_format to XML if NO .xml|json is given in the URL (the Suffix should be optional)? So that this ressource can be called via the following URLs: (1) /user/me.xml - XML-Response (2) /user/me.json - JSON-Response (3) /user/me - XML-Response Actually, a 404 is raised by symfony if the ressource is called via (3). Thanks for your help in advance, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Routing-Rules: use sf_format only as an optional value
Yes, thats exactly the same way like I do it also :-) Except the sfPropelRoute. But, like I wrote: This raises a 404 if the URL is called without suffix :-(( On 26 Mai, 12:19, Gábor Fási maerl...@gmail.com wrote: This is how it's done in jobeet, day 15: // apps/frontend/config/routing.yml category: url: /category/:slug.:sf_format class: sfPropelRoute param: { module: category, action: show, sf_format: html } options: { model: JobeetCategory, type: object } requirements: sf_format: (?:html|atom) On Tue, May 26, 2009 at 12:04, halla dha.maili...@googlemail.com wrote: Hi everybody, I'm using different routes for my application, which also determine the response format (xml or json for an REST-based web service). This is an example rule in routing.yml: user_me: url: /user/me.:sf_format params: { module: user, action: getUserMe } requirements: { sf_method: GET, sf_format: (?:xml|json) } Is there a way to set sf_format to XML if NO .xml|json is given in the URL (the Suffix should be optional)? So that this ressource can be called via the following URLs: (1) /user/me.xml - XML-Response (2) /user/me.json - JSON-Response (3) /user/me - XML-Response Actually, a 404 is raised by symfony if the ressource is called via (3). Thanks for your help in advance, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Routing-Rules: use sf_format only as an optional value
No you don't, here's the difference :) Yours: params: { module: user, action: getUserMe } Jobeet: param: { module: category, action: show, sf_format: html } Sometimes small things can make a big difference :-) You're right - now it works great...!! Thank you very much, Gábor :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfDoctrineGuard: Problem with an Equal Nest Relation in the Admin-Backend
Hi everybody, I'm using the sfDoctrineGuardPlugin, for which I added an Equal Nest Relation [1] in the sfGuardUser-Table Definition: # this is added to the sfGuardUser-Table Definition relations: Relationships: class: sfGuardUser local: user1 foreign: user2 refClass: Relationships equal: true This is the Definition of the Relationships-Table: Relationships: columns: user1: { type: integer(4), primary: true } user2: { type: integer(4), primary: true } type: { type: enum, length: 24, values: [friend,blocked] } Looks quite right to me :-) But now I've a problem with the Admin-Backend... When trying to create or edit (list-View works fine) a User in the Backend, I'm receiving an error-message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'relationships.id' in 'field list' Does anybody know what I can do to fix this? Thank you in advance for any help Daniel == [1]http://www.doctrine-project.org/documentation/manual/1_1/en/ defining-models#relationships:join-table-associations:self-referencing- nest-relations:equal-nest-relations (this is the default Admin-Generator generator.yml-File I'm currently using) generator: class: sfDoctrineGenerator param: model_class: sfGuardUser theme: admin non_verbose_templates: true with_show: false singular: ~ plural:~ route_prefix: sf_guard_user with_doctrine_route: 1 config: fields: password_again: { label: Password (again) } list: title: User list display: [=username, created_at, updated_at, last_login] form: class: sfGuardUserAdminForm display: NONE: [username, password, password_again] Permissions and groups: [is_active, is_super_admin, groups_list, permissions_list] edit: title: Editing User %%username%% new: title: New User --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Best Practice for sfDoctrineGuardPlugin - how to tie other tables with user-related content?
Hello everybody, I'm using the sfDoctrineGuardPlugin for User-Management. As this plugin offers only very limited fields for storing personal user information (like the real name, email, address and so on), I'm using another table (sfGuardUserProfile) for those fields, which tied via an 1:1-relationship to the sfGuardUser-Table. My Question is: If I have other tables, which are storing user-related informations, do I tie them also directly to the sfGuardUser-Table or do I tie them to MY sfGuardUserProfile-Table (which is then tied to the sfGuardUser- Table)? What is the best practice? To make it more clear, here's the code for my own User-Profiles, tied 1:1 to the sfGuardUser-Table: sfGuardUserProfile: columns: user_id:integer(4) firstname: string(255) lastname: string(255) avatar: string(32) email: string(255) gender: { type: enum, length: 1, values: [m,f] } dob:date relations: sfGuardUser: local: user_id foreignType: one foreignAlias: Profiles onDelete: CASCADE Now I've another Table, storing a Users favorite locations: FavoriteLocations: columns: user_id:integer(4) address:string(255) coords: string(32) Is it better to tie this table to the original sfGuardUser-Table like this? -- relations: sfGuardUser: local: user_id onDelete: CASCADE OR do I tie FavoriteLocations to sfGuardUserProfile like this? -- relations: sfGuardUserProfile: local: user_id onDelete: CASCADE Thank you for any help in advance! Have a nice Day, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Best Practice for sfDoctrineGuardPlugin - how to tie other tables with user-related content?
Hi David, I'm afraid your answer won't help me. Checkout:http://www.symfony-project.org/plugins/sfDoctrineApplyPlugin It's a profile plugin that's extendable with instructions on how to hook itto sfDoctrineGuardPlugin This plugin demonstrate on how to extend a Guard-User with Profile Fields, using 1:1-related Table. This is what I also desribe in my posting (and what's also described in the Guard-Manual as well). What I want to know, is how OTHER tables have to be related to the User? Do I tie them directly to the Original sfGuardUser-Table using a 1:m relationship or do I tie them 1:m to my Profile-Table, which is tied again 1:1 to the sfGuardUser? (both described in my example) Hope, my problem is understandable so far... :-) Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Best Practice for sfDoctrineGuardPlugin - how to tie other tables with user-related content?
Use sfGuard as the root for all that need to reference the user. Ok, thats what I want to know - thank you :-)) If thats best practice, I'm satifsfied... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Overwriting Doctrines Getter-Methods
Hi everybody, I'm using Doctrine and I'd like to know if it is possible to overwrite the Getter-Methods. Maybe an example makes my question more precise... I'm retrieving a User-Record from my Database: $user = $Doctrine::getTable('User')-find($id); Then I access a field from this record: $user-get('avatar'); So far, so good. But what do I have to if I want to process this Value right after reading from the Database? F.E. if a User has no Avatar and I want to return a default-Avatar? Thanks for any help in advance, Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---