[symfony-users] Cache problems

2008-01-28 Thread Rytis Daugirdas
Hello, I'm having two caching problems with symfony 1.0.11 - a minor and a major one. I have caching turned on by default (together with layout, app cache.yml) since the website I'm currently working on is almost completely static. This, as I understand it, enables caching for everything:

[symfony-users] Multiple apps vs single app

2008-03-03 Thread Rytis Daugirdas
Hello, I will be starting a new project using symfony and I'm weighing my decision to create multiple apps vs a single app. Basically, the project will consist of a public area and two protected areas (registration required, completely separate user types). Both protected areas will contain the

[symfony-users] Creole::COMPAT_ASSOC_LOWER

2008-04-01 Thread Rytis Daugirdas
Hello, Where should I set Creole::COMPAT_ASSOC_LOWER flag in symfony? --~--~-~--~~~---~--~~ 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

[symfony-users] sfWebRequest error

2008-04-16 Thread Rytis Daugirdas
Hello, I need to be able to use request objects (sfWebRequest) in my automated tests. Running the following - $request = new sfWebRequest(); $request-initialize(sfContext::getInstance()); $request-setError('id', 'error'); echo $request-getError('id'); -

[symfony-users] Re: sfWebRequest error

2008-04-17 Thread Rytis Daugirdas
All right, done. http://trac.symfony-project.com/ticket/3357 On Apr 17, 3:00 am, Kiril Angov [EMAIL PROTECTED] wrote: Seems like it... create a ticket in Trac. Whatever it is it is not supposed to show fatal error but should handle it properly. Kiril On Wed, Apr 16, 2008 at 1:20 PM, Rytis

[symfony-users] Validating a non-required field

2008-05-06 Thread Rytis Daugirdas
Hello, Is it possible to define a validator that would be executed with each request, no matter if the field it validates is empty or not? Or is my only option to do that in the validate() method of my action? Regards, Rytis --~--~-~--~~~---~--~~ You received

[symfony-users] Re: Validating a non-required field

2008-05-06 Thread Rytis Daugirdas
Thanks. On May 6, 3:30 pm, Lee Bolding [EMAIL PROTECTED] wrote: In your validate.yml just set required: false for the field On 6 May 2008, at 13:10, Rytis Daugirdas wrote: Hello, Is it possible to define a validator that would be executed with each request, no matter if the field

[symfony-users] Re: Validating a non-required field

2008-05-07 Thread Rytis Daugirdas
, 3:41 pm, Rytis Daugirdas [EMAIL PROTECTED] wrote: Thanks. On May 6, 3:30 pm, Lee Bolding [EMAIL PROTECTED] wrote: In your validate.yml just set required: false for the field On 6 May 2008, at 13:10, Rytis Daugirdas wrote: Hello, Is it possible to define a validator that would

[symfony-users] Logging configuration confusion

2008-09-24 Thread Rytis Daugirdas
Hello, I've recently started a new project based on symfony 1.1.2. However, I'm not sure if my logging configuration is correct since I'm not seeing the right behavior. Basically I want to log only 'err' level errors in prod environment. This is what I have in factories.yml: prod: logger:

[symfony-users] Re: Logging configuration confusion

2008-09-25 Thread Rytis Daugirdas
Yeah, cache is cleared... Anyone else could check the same? I would feel better if I knew I'm not alone with this problem :). On Thu, Sep 25, 2008 at 2:58 PM, cokker [EMAIL PROTECTED] wrote: Have you cleared your cache? If this doesn't work. I have no idea. Greets Sven Rytis Daugirdas

[symfony-users] Configure post validator

2008-10-07 Thread Rytis Daugirdas
Hello, What is currently the best way to change options and messages of post validators? $this-validatorSchema-setPostValidator( new sfValidatorAnd(array( new sfValidatorPropelUnique(array('model' = 'User', 'column' = array('username'))), new

[symfony-users] Re: Configure post validator

2008-10-07 Thread Rytis Daugirdas
(array('model' = 'User', 'column' = array('email')), array('invalid' = 'Email exists.')), )) ); Take a look : http://www.symfony-project.org/api/1_1/sfValidatorPropelUnique 2008/10/7 Rytis Daugirdas [EMAIL PROTECTED] Hello, What is currently the best way to change options

[symfony-users] Including a conditional IE stylesheet

2008-11-10 Thread Rytis Daugirdas
Hello, I can't seem to find a reliable way to include a conditional IE stylesheet as the last stylesheet. For example: head !-- ... -- !--[if (gte IE 5.5)(lt IE 7)] link href=/css/public/ie6.css rel=stylesheet type=text/css media=all / ![endif]-- /head I absolutely need it

[symfony-users] Re: Including a conditional IE stylesheet

2008-11-10 Thread Rytis Daugirdas
I already have a filter set up, but Thomas' solution is better suited in my case. Thanks. On Mon, Nov 10, 2008 at 7:31 PM, dthomas-wwp [EMAIL PROTECTED] wrote: If you maintain several layouts and don't want to have to update each one individually, another option would be to create an

[symfony-users] Adding a new widget to a form

2008-11-12 Thread Rytis Daugirdas
Hello, What is the preferred way to add a new widget and its validator(s) to a form that already has some widgets configured? The documentation only indicates setWidgets() method, there's no setWidget() or addWidget() method. From what I see, I can probably use setWidgets() for that: $widgets =

[symfony-users] sfForm postValidator issue

2008-11-15 Thread Rytis Daugirdas
Hello, I've noticed that my password sfValidatorSchemaCompare validator that is set as the post validator is run even if the passwords it compares do not pass the regular validation. For example, I place a restriction of 8 character minimum length on the password field. Even if the password

[symfony-users] Re: sfForm postValidator issue

2008-11-16 Thread Rytis Daugirdas
On Nov 15, 6:43 pm, Rytis Daugirdas [EMAIL PROTECTED] wrote: Hello, I've noticed that my password sfValidatorSchemaCompare validator that is set as the post validator is run even if the passwords it compares do not pass the regular validation. For example, I place a restriction of 8

[symfony-users] Missing PDO returned rows in templates?

2008-11-28 Thread Rytis Daugirdas
Hello, I've just upgraded from 1.1 to 1.2. It went all right, but I don't get all the results from SELECT queries in templates when using PDO. In the action: $this-memberRs = MyPeer::doSelectStmt(...); // I get 3 rows (correct) while ($row = $this-memberRs-fetch(PDO::FETCH_NUM)) { echo

[symfony-users] Customizing embedded form error messages (sf 1.2)

2008-11-29 Thread Rytis Daugirdas
Hello, I have a form with another form embedded in it. The errors related to the fields of the embedded form are formatted like this: *field_name [some error message]* Is there a way to change the formatting? For example, hide the field name and leave the message only: *some error message* --

[symfony-users] sf 1.2 admin generator - action does not exist

2008-12-01 Thread Rytis Daugirdas
Hello, I've run into a problem with admin generator. php symfony propel:generate-admin admin Administrator Now I go to http://localdomain/admin_dev.php/administrators and I get sfError404Exception: Action administrators/index does not exist. What could be the problem? The cache is cleared. --

[symfony-users] Re: sf 1.2 admin generator - action does not exist

2008-12-01 Thread Rytis Daugirdas
, 2008 at 3:05 PM, Alistair Stead [EMAIL PROTECTED] wrote: You have a typo in your URL should it not be administrator? singular? Regards Alistair 2008/12/1 Rytis Daugirdas [EMAIL PROTECTED] Hello, I've run into a problem with admin generator. php symfony propel:generate-admin admin

[symfony-users] Questions related to the new admin generator (sf 1.2.0 + Propel 1.3)

2008-12-02 Thread Rytis Daugirdas
Hello, I have the following questions regarding the admin generator: - Is it possible to set different form classes for new and edit views? I can probably override this in the actions themselves, but it would be better to set this in the generator.yml itself. - For some reason since

[symfony-users] Re: Questions related to the new admin generator (sf 1.2.0 + Propel 1.3)

2008-12-02 Thread Rytis Daugirdas
On Tue, Dec 2, 2008 at 12:14 PM, Rytis Daugirdas [EMAIL PROTECTED] wrote: Hello, I have the following questions regarding the admin generator: - Is it possible to set different form classes for new and edit views? I can probably override this in the actions themselves, but it would

[symfony-users] Using routes from another application (sf 1.2)

2008-12-08 Thread Rytis Daugirdas
Hello, Is it possible to generate URLs of routes that are defined in another application under the same project? If yes, a small example would be great. -- Regards, Rytis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[symfony-users] Problems with list filters in administration

2008-12-09 Thread Rytis Daugirdas
Hello, I'm having some problems with cutomizing list filters. 1. The filters don't seem to work at all if peer_method is used changed under list key in generator.yml. I have a custom peer_method which works fine in the list view, but filtering doesn't have any effect. If I remove

[symfony-users] sfAction::renderPartial() - status code overriden?

2009-01-22 Thread Rytis Daugirdas
Hello, I'm having some weird behaviour on my client's server. Have a look at the following action examples: public function execute($request) { $this-getResponse()-setStatusCode(400); return $this-renderText('Hello'); } public function execute($request) {

[symfony-users] Forcing arrays in YAML

2009-02-13 Thread Rytis Daugirdas
Hello, Is there a way to define arrays at the first node level of YAML? For example: all: my_config: ... sfConfig::get('prefix_my_config'); // would return an array I really hate to add additional levels all the time that don't serve any purpose except to force array parsing. Regards,

[symfony-users] Customizing labels when rendering an sfForm

2009-02-14 Thread Rytis Daugirdas
Hello, Is it possible to customize field labels when calling sfForm::render($attributes)? If yes, what is the structure of the $attributes array I should use? Regards, Rytis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[symfony-users] N - M relationships and symfony forms (Propel)

2009-02-15 Thread Rytis Daugirdas
Hello, Does symfony handle N - M relationships in any way? For example: Category: tableName: pp_category columns: id: name: { type: varchar(255), required: true } Article: tableName: pp_article columns: id: title: { type: varchar(255), required: true

[symfony-users] Re: CSRF tokens and attacks

2009-02-15 Thread Rytis Daugirdas
Now, what prevents a hacker from writing a javascript to retrieve a page from a logged in user on my site, retrieve the CSRF token and make another javascript request using the token on my forms?? Tell me how you would do this. By doing that you'll discover the difficulties yourself.

[symfony-users] Re: N - M relationships and symfony forms (Propel)

2009-02-18 Thread Rytis Daugirdas
For those who may have missed it too - don't define an id column for the relation table (ArticleCategoryRelation in my example) and you'll get the N:M stuff in your forms. Regards, Rytis On Sun, Feb 15, 2009 at 10:56 PM, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, Does symfony

[symfony-users] Solving a concurrency problem

2009-06-01 Thread Rytis Daugirdas
Hello, I'm having what seems to be a concurrency problem while using Propel 1.3. Below is a small example of the save method of a Propel object. public function save(PropelPDO $con = null) { $con = Propel::getConnection(); try { $con-beginTransaction();

[symfony-users] Rebuilding model

2009-07-21 Thread Rytis Daugirdas
Hello, Do I need to rebuild my model after changing my database backend (for example, when switching from MySQL to SQLite)? The ORM is Doctrine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group.

[symfony-users] Doctrine NestedSet and output escaping

2009-08-20 Thread Rytis Daugirdas
Hello, I've run into a weird problem when using doctrine NestedSet behavior together with symfony 1.2. In the action: $this-tree = Doctrine::getTable('Group')-getTree()-fetchTree(); In the template: ?php foreach ($tree as $g): ? ?php echo $g-getNode()-isLeaf() //this issues an additional

[symfony-users] Updating existing database records with symfony forms

2009-11-30 Thread Rytis Daugirdas
Hello, I accidentally noticed that by default symfony generated forms allow updating of existing objects without passing the primary key(s) in the $taintedValues array which results in odd behavior (to me, anyway). Here's a simple example: $f = new

[symfony-users] Propel 1.4 and multi-column PKs

2010-03-26 Thread Rytis Daugirdas
Hello, I'm trying to define a multi-column PK for a table containing many-to- many relationships. This is what I have: UserGroupRelation: tableName: UserGroupRelations columns: userId: { type: integer, required: true, primary: true } groupId: { type: integer, required:

[symfony-users] Propel nested set and sfOutputEscaperIteratorDecorator - too many queries

2010-04-26 Thread Rytis Daugirdas
Hello, When using Propel's nested set behaviour, iteration over a node set in a template (with output escaping enabled) produces too many queries. Here's an example: http://pastebin.com/KTzDfvwd Using the unescaped iterator works fine. Is that a bug in sfOutputEscaperIteratorDecorator? If not,

[symfony-users] Re: Propel nested set and sfOutputEscaperIteratorDecorator - too many queries

2010-04-26 Thread Rytis Daugirdas
To output a list of nodes, obviously. On Apr 26, 4:20 pm, Massimiliano Arione garak...@gmail.com wrote: It's not clear to me why you want to use an iterator in a template. cheers Massimiliano On 26 Apr, 10:56, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, When using

[symfony-users] Re: Propel nested set and sfOutputEscaperIteratorDecorator - too many queries

2010-04-27 Thread Rytis Daugirdas
, since I need the level of each node, your suggestion is not suitable as it too makes query count depend on the number of nodes retreived. On Apr 27, 4:48 pm, Massimiliano Arione garak...@gmail.com wrote: On 26 Apr, 18:11, Rytis Daugirdas rytis.daugir...@gmail.com wrote: To output a list of nodes

[symfony-users] Setting a widget's id_format option has no effect

2010-07-25 Thread Rytis Daugirdas
Hello, It seems that setting the id_format option for widgets has no effect. Here's a short example: http://pastebin.com/DLL8d3wz The expected id is test_suffix but it's set to test as if the format was never changed. Anyone could explain this behaviour? Rytis -- If you want to report a

[symfony-users] sfPropel15Plugin problem

2010-10-03 Thread Rytis Daugirdas
Hello, I generated an admin module (propel:generate-admin) for the corresponding model and there seems to be a routing problem. Upon running my app I get the following error: sfPropel15Route::serialize() must return a string or NULL Here's my routing.yml: http://pastebin.com/NKrcWGaV. If I

[symfony-users] Re: sfPropel15Plugin problem

2010-10-03 Thread Rytis Daugirdas
I figured that out. The problem is not related to the plugin itself. I had a customized segment_separators option in my factories.yml file. On Oct 3, 1:51 pm, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, I generated an admin module (propel:generate-admin) for the corresponding

[symfony-users] Adding a global error if embedded forms have errors

2010-12-26 Thread Rytis Daugirdas
Hello, I have a form with some other forms embedded. I'd like to add a global error to the main form if any of the embedded forms have errors. How can I check for errors in embedded forms? Embedded forms are cloned and they're not bound themselves, so I cannot call hasErrors() on them. I was

[symfony-users] Form classes not generated for certain models

2011-02-13 Thread Rytis Daugirdas
Hello, Forms and filters are not generated for a model named Condition (in schema.yml). I tested this on a completely new project. Model classes are generated just fine. There are no error messages, the files in question are simply not being created. Is this a bug or maybe there is a list of

[symfony-users] Propel single table inheritance definition

2011-03-06 Thread Rytis Daugirdas
Hello, I'm looking for an example of defining single table inheritance using the alternative schema syntax. The following does not work (no child classes are generated): ParentClass: ... columns: type: { type: varchar, size: 50, required: true } ... inheritance:

[symfony-users] Re: Propel single table inheritance definition

2011-03-06 Thread Rytis Daugirdas
False alarm, it works fine. What confused me was the fact that Base[ChildClass].php files were missing. However, it turns out those files are not needed. On Mar 6, 12:05 pm, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, I'm looking for an example of defining single table inheritance

[symfony-users] Form objects not escaped

2011-04-18 Thread Rytis Daugirdas
Hello, I've noticed that form objects are not escaped in templates. $this-form = new MyObjectForm(); # won't be escaped Other objects ARE escaped. $this-myObject = $this-form-getObject(); # will be escaped This can easily be checked using get_class() in a template. Anyone could explain this

[symfony-users] Clearing I18N cache

2011-04-27 Thread Rytis Daugirdas
Hello, Is there a way to clear the cache of certain (not all) I18N translation files? I have some dynamic I18N files which are updated by the application as required and afterwards the changes are not visible. Regards, Rytis -- If you want to report a vulnerability issue on symfony, please

[symfony-users] Different Error 500 pages for different languages

2011-05-08 Thread Rytis Daugirdas
Hello, Is it possible to use different Error 500 pages for different cultures? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to

[symfony-users] Cache for multiple environments generated

2011-05-23 Thread Rytis Daugirdas
Hello, I'm playing with symfony2 beta2 right now and I've noticed that if I load the dev environment on empty cache, symfony generates caches for both dev and prod environments. Why? Is this expected behaviour? Rytis -- If you want to report a vulnerability issue on symfony, please send it to

[symfony-users] Re: Cache for multiple environments generated

2011-05-23 Thread Rytis Daugirdas
I figured that out. Requests to non-existant files are routed to the prod controller, so that triggered prod cache initialization. On May 23, 8:43 pm, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, I'm playing with symfony2 beta2 right now and I've noticed that if I load the dev

[symfony-users] Twig Debug extension

2011-05-23 Thread Rytis Daugirdas
Hello, If I enable the Debug extension and add {% debug %} in a template, it either makes the page not load at all (blank) or run out of memory. What could be the problem? I'm on Windows 7, PHP 5.3.6. Thanks, Rytis -- If you want to report a vulnerability issue on symfony, please send it to

[symfony-users] symfony2: sharing global values between templates

2011-06-03 Thread Rytis Daugirdas
Hello, Is there a way to easily set a value in one template and make it available in another (both templates are included by the same layout)? For example, in a page template I want to set a string value representing the selected menu item and use this value in a mini- template that contains the

[symfony-users] Re: symfony2: sharing global values between templates

2011-06-03 Thread Rytis Daugirdas
JavaScript? It has nothing to do with my question. On Jun 3, 8:38 pm, Justin Hilles justin.hil...@gmail.com wrote: why not use js? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed

[symfony-users] [symfony2] Mixing entity and non-entity fields in a single form

2011-06-12 Thread Rytis Daugirdas
Hello, I have a form type that extends Symfony\Component\Form\AbstractType. I use it with an entity object. I'd like to add additional fields and validation constraints to the form, but calling $builder- add('extraField', ...) produces an error telling that added fields don't exist in the entity

[symfony-users] Re: Mixing entity and non-entity fields in a single form

2011-06-12 Thread Rytis Daugirdas
OK, it seems that form embedding functionality is what I'm looking for. On Jun 12, 1:13 pm, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, I have a form type that extends Symfony\Component\Form\AbstractType. I use it with an entity object. I'd like to add additional fields

[symfony-users] [symfony2] Missing options in select after block customization

2011-06-15 Thread Rytis Daugirdas
Hello, I customized choice_widget block by copying it from div_layout.html.twig to my own template file and adding it under twig/form/resources in config.yml. My customizations work fine when I add a choice field with the form builder, but now country fields are not rendered correctly (empty

[symfony-users] [symfony2] Validating non-entity fields

2011-06-15 Thread Rytis Daugirdas
Hello, What is the recommended way to validate form fields that do not belong to any entity? I don't see this documented anywhere. For example: $builder -add('entity', new EntityType()) // validated by using constraints set for Entity -add('foo', 'text'); // how do you add constraints

[symfony-users] Re: Missing options in select after block customization

2011-06-15 Thread Rytis Daugirdas
My bad, forgot to add extends directive in my template. On Jun 15, 6:13 pm, Rytis Daugirdas rytis.daugir...@gmail.com wrote: Hello, I customized choice_widget block by copying it from div_layout.html.twig to my own template file and adding it under twig/form/resources in config.yml. My

[symfony-users] [symfony2] Errors bubble to the main form

2011-06-15 Thread Rytis Daugirdas
Hello, I have a simple form with a few entity forms embedded into it. Validation seems to work, but all errors are reported as global (rendered via form_errors(form)). The same call for each field (form_errors(field)) does not render any errors at all. I did not set error_bubbling property