Re: [symfony-users] Public Accessible Code

2009-12-01 Thread Gareth McCumskey
You can package them as plugins. Then store each in its own repository in
SVN. Then, you can use the plugin within a project by defining an
svn:externals property to the repository where the plugin is stored. That
way it makes it very easy to make bug-fixes etc to the plugin and update all
customers using that plugin.

On Tue, Dec 1, 2009 at 4:37 AM, Paul Witschger wrote:

> I want to build some extras (plugins, add ons, whatever), that I can
> offer to clients. These add ons will be things like photo galleries,
> news article listings, blogs, etc.
>
> I want to put these add ons in a location where any and all projects
> have access to them. I don't want to have to copy the folder structure
> to their project. But, I also don't want to modify the symfony core
> folder structure. Is there a way to do this? Also, would I program these
> as plugins, modules, or something else?
>
> Sorry for these questions, but I am new to symfony (and Doctrine) and
> still trying to figure everything out.
>
>
> Thanks
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Personal validator

2009-12-01 Thread cosmy
Hi all,
i need to validate some fields of my form in a special way.. i don't
want that some fields have the same value (the form fields are divided
in groups, every group should contain differents answers).
I don't know how to write an own validator.. is there documentation
about it?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: Symfony 1.3 + sfGuard 4.0.0 Plugin

2009-12-01 Thread micon
RESOLVED - i used the wrong plugin! :-(

The fact that there is a

"sfGuardPlugin"  &  a

"SfDoctrineGuardPlugin" is a little bit confusing for a symfony
newcomer ;-)

especially when doctrine is the standard orm in symfony 1.3, so one
could assume that the "sfGuardPlugin" should contain support for
doctrine per default

or the sfGuardPlugin should be named "sfPropelGuardPlugin" etc 


--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Public Accessible Code

2009-12-01 Thread Lee Bolding

On 1 Dec 2009, at 02:37, Paul Witschger wrote:

> I want to build some extras (plugins, add ons, whatever), that I can 
> offer to clients. These add ons will be things like photo galleries, 
> news article listings, blogs, etc.

Check out (maybe in BOTH senses of the word...) the symfony plugins repository 
- there's already plugins available to do all of that...

http://www.symfony-project.org/plugins/

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread dziobacz
I couldn't set default value for sfWidgetFormDoctrineChoiceMany in
relation many to many (not one to many), I asked here and nobody know
so I created ticket here: http://trac.symfony-project.org/ticket/7712
Why my ticket is invalid ?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Re: sfDoctrineGuard Plugin uses deprecated Stuff

2009-12-01 Thread Christopher Schnell
Thanks Fabien.

David, it is working in the SVN Version now.

Regards,
Christopher.


David schrieb:
> I also upgrade to 1.4 and when I use the sfGuardUser backend, it
> throws an error when I try to edit a user:
>
> Fatal error: Call to a member function setLabel() on a non-object in
> plugins/sfDoctrineGuardPlugin/lib/form/doctrine/base/
> BasesfGuardUserAdminForm.class.php on line 26
>
> I have no idea how to solve this. Maybe the functions are deprecated
> for the forms are deprecated in symfony 1.4
>
> On 30 nov, 13:00, Fabien Potencier  project.com> wrote:
>   
>> Christopher Schnell wrote:
>> 
>>> Hi all,
>>>   
>>> I just upgraded a new project to 1.4 and ran the project:validate Task.
>>> It shows an error in sfDoctrineGuard Plugin, meaning that it is not
>>> ready for 1.4. The error reads as follows:
>>>   
>>>1.
>>>   7. Checking usage of array notation with a parameter holder  
>>>2.
>>>   
>>>3.
>>>  1 file(s) need to be changed.
>>>4.
>>>   
>>>   
>>> ROOT/plugins/sfDoctrineGuardPlugin/modules/sfGuardUser/lib/BasesfGuardUserActions.class.php
>>>5.
>>>   
>>>6.
>>> The files above use the array notation with a parameter holder,
>>>7.
>>> which is not supported anymore in symfony 1.4.
>>>8.
>>> For instance, you need to change this construct:
>>>9.
>>>   
>>>   10.
>>>   $foo = $request->getParameter('foo[bar]')
>>>   11.
>>>   
>>>   12.
>>> to this one:
>>>   13.
>>>   
>>>   14.
>>>   $params = $request->getParameter('foo')
>>>   15.
>>>   $foo = $params['bar'])
>>>   
>>> Should I report to the symfony Bugtracker or is there any other location
>>> for sfDoctrineGuard Plugin?
>>>   
>> fixed.
>>
>> Thanks,
>> Fabien
>>
>>
>>
>> 
>>> Regards,
>>> Christopher.
>>>   
>>> --
>>>   
>>> You received this message because you are subscribed to the Google Groups 
>>> "symfony users" group.
>>> To post to this group, send email to symfony-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> symfony-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/symfony-users?hl=en.
>>>   
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>
>   

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread Thomas Rabaix
When you work with a sfMODELform then the defaults are not used. If
you want to set default value in this case, just set the value to the
related object

$u = new User;
$u->my_default_value = 'asds';

$f = new sfUserForm($u)

On Tue, Dec 1, 2009 at 10:28 AM, dziobacz  wrote:
> I couldn't set default value for sfWidgetFormDoctrineChoiceMany in
> relation many to many (not one to many), I asked here and nobody know
> so I created ticket here: http://trac.symfony-project.org/ticket/7712
> Why my ticket is invalid ?
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>



-- 
Thomas Rabaix
http://rabaix.net

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Problem with the new pager Iterator interface

2009-12-01 Thread Grégoire
I use the sfDoctrinePager class to paginate results. I've seen in the
1.3/1.4 what's new article that the pagers now implement the Iterator
and Countable interfaces. I say "cool, let's try it" so I did that:


  ...
  

  
  ...


The count() function works fine, but the foreach() doesn't. The
$object that I expect to be a MyClass object is actually a
sfOutputEscaperArrayDecorator object. It's an array of my objects, and
not one of my objects, as I hoped...

Do I misunderstand the pager Iterator interface? Or is it a bug?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: gmail problem

2009-12-01 Thread Grégoire
Edit your membership...
http://groups.google.com/group/symfony-users/subscribe

On Dec 1, 8:57 am, Ben Akacha Khalil 
wrote:
> How can I block mail symfony group because I always suppime the mail
> received?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] ow to find out why is form not valid?

2009-12-01 Thread Hong Kil Dong

I've fallen into a strange trap - my form doesn't pass validation but
neither form's fields nor calling $form->hasGlobalErrors() reports
errors...
How to find out what cause form validation to fail ?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread dziobacz
But I can set default value for select list for id_book (model Books)
or id_author (model Authors), but default value only doesn't work for
authors_list or books_list:
$this->setWidget('authors_list', new sfWidgetFormDoctrineChoiceMany
(array(
  'model' => 'Authors')
)));

$this->setDefaults(array(
'authors_list' => 2
));



On 1 Gru, 11:35, Thomas Rabaix  wrote:
> When you work with a sfMODELform then the defaults are not used. If
> you want to set default value in this case, just set the value to the
> related object
>
> $u = new User;
> $u->my_default_value = 'asds';
>
> $f = new sfUserForm($u)
>
> On Tue, Dec 1, 2009 at 10:28 AM, dziobacz  wrote:
> > I couldn't set default value for sfWidgetFormDoctrineChoiceMany in
> > relation many to many (not one to many), I asked here and nobody know
> > so I created ticket here:http://trac.symfony-project.org/ticket/7712
> > Why my ticket is invalid ?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > symfony-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en.
>
> --
> Thomas Rabaixhttp://rabaix.net

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] propel. how to retrieve

2009-12-01 Thread g0d br
Hi,

I dont even know how to ask that but i want to show what i need.

my schema.yml
category:
  id: ~
  title: { type: varchar(100), required: true, index: unique }

product:
  id:~
  category_id: { type: integer, foreignTable: category, foreignReference:
id, onDelete: cascade }
  name: { type: varchar(100), required: true, index: unique }

i want to retrieve all categories that have a least one product and i want
to show how many products each category.

thank you.

Celso

ps. sorry about my english i dont know if the question is understandable.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] ow to find out why is form not valid?

2009-12-01 Thread Gareth McCumskey
I stand open to correction but I believe that ALL fields need to have a
validator applied, even if that validatoion is nothing. Just check that you
have a validator applied to each form widget.

On Tue, Dec 1, 2009 at 1:56 PM, Hong Kil Dong  wrote:

>
> I've fallen into a strange trap - my form doesn't pass validation but
> neither form's fields nor calling $form->hasGlobalErrors() reports
> errors...
> How to find out what cause form validation to fail ?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Create a many-to-many relation from sfGuardUser class (sfDoctrineGuardPlugin) to itself

2009-12-01 Thread tirengarfio
Hi all,

I would like to create a many-to-many relation from sfGuardUser class
(sfDoctrineGuardPlugin) to itself, but if i cant modify the plugin
content, how should i make it?


Bye

Javi

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Where to clear the cache

2009-12-01 Thread Timmipetit
Hi everyone,

I'm thinking about the following issue, where and how should the cache
be cleared? Let's assume a scenario with 2 models: user and message. A
message has a reference to a user. On the user-page (in the frontend)
a partial is included that shows all the messages belonging to that
user. That partial needs to be cached.
Now let's say that messages will be created/edited/deleted in 2
modules in the frontend, and maybe also from the backend (or even a
plugin). When this happens, the cached partial from that user should
be deleted.
The easiest way to do this in this situation would probably be from
the model, right? If you would automatically delete the cache in the
model, it doesn't matter where messages are edited. But I'm not quite
sure if this seems right from a MVC point of view.
How would you do this, and why?

Cheers,
Tijmen

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Gareth McCumskey
First, you will always have a category with at least one product because you
have set cascade on delete.

For the second part, in your CategoryPeer class:

public static function getProductCountPerCategory()
{
  //Get all categories
  $category_obj_arr = self::doSelect(new Criteria());

  //Get count of products per category
  $product_per_category_count = array();

  foreach ($category_obj_arr as $category_obj)
  {
$product_c = new Criteria();
$product_c->add(ProductPeer::CATEGORY_ID, $category_obj->getId());
$product_per_category_count[$category_obj->getTitle()] =
ProductPeer::doCount($product_c);
  }

  return $product_per_category_count;
}

Thats one example. You don't always have to do everything in a query using
joins and to be honest we have often seen massive performance improvements
NOT using switching away from joins.

On Tue, Dec 1, 2009 at 2:56 PM, g0d br  wrote:

> Hi,
>
> I dont even know how to ask that but i want to show what i need.
>
> my schema.yml
> category:
>   id: ~
>   title: { type: varchar(100), required: true, index: unique }
>
> product:
>   id:~
>   category_id: { type: integer, foreignTable: category, foreignReference:
> id, onDelete: cascade }
>   name: { type: varchar(100), required: true, index: unique }
>
> i want to retrieve all categories that have a least one product and i want
> to show how many products each category.
>
> thank you.
>
> Celso
>
> ps. sorry about my english i dont know if the question is understandable.
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Dheeraj Kumar Aggarwal
hi

for the first part, use this .

$c = new Criteria();
$c->addJoin(ProductPeer::CATEGORY_ID, CategoryPeer::ID);
$c->setDistinct();
$categories = CategoryPeer::doSelect($c);

now the $categories variable contains the categories that have at least one
product


On Tue, Dec 1, 2009 at 5:58 AM, Gareth McCumskey wrote:

> First, you will always have a category with at least one product because
> you have set cascade on delete.
>
> For the second part, in your CategoryPeer class:
>
> public static function getProductCountPerCategory()
> {
>   //Get all categories
>   $category_obj_arr = self::doSelect(new Criteria());
>
>   //Get count of products per category
>   $product_per_category_count = array();
>
>   foreach ($category_obj_arr as $category_obj)
>   {
> $product_c = new Criteria();
> $product_c->add(ProductPeer::CATEGORY_ID, $category_obj->getId());
> $product_per_category_count[$category_obj->getTitle()] =
> ProductPeer::doCount($product_c);
>   }
>
>   return $product_per_category_count;
> }
>
> Thats one example. You don't always have to do everything in a query using
> joins and to be honest we have often seen massive performance improvements
> NOT using switching away from joins.
>
>
> On Tue, Dec 1, 2009 at 2:56 PM, g0d br  wrote:
>
>> Hi,
>>
>> I dont even know how to ask that but i want to show what i need.
>>
>> my schema.yml
>> category:
>>   id: ~
>>   title: { type: varchar(100), required: true, index: unique }
>>
>> product:
>>   id:~
>>   category_id: { type: integer, foreignTable: category, foreignReference:
>> id, onDelete: cascade }
>>   name: { type: varchar(100), required: true, index: unique }
>>
>> i want to retrieve all categories that have a least one product and i want
>> to show how many products each category.
>>
>> thank you.
>>
>> Celso
>>
>> ps. sorry about my english i dont know if the question is understandable.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@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.
>>
>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
>
>  --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>



-- 
Regards,
Dheeraj

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] move_uploaded_file with a twist

2009-12-01 Thread Gareth McCumskey
http://www.php.net/fopen

Works on remote files too ;)

On Mon, Nov 30, 2009 at 7:19 PM, Parijat Kalia wrote:

> Hey guys,
>
> I am making use of move_uploaded_file to upload a bunch of files from my
> website onto a server, as it goes:
>
> move_uploaded_file($_FILES['filename']['tmp_name'],'path/to/store/image')
>
> And this works like a charm.
>
> But there is a trick here, I wish to make these files reside on some other
> server and not the server hosting my website.
>
> Alternately, if another website/multiplayer game wishes to access these
> files (we share a common database), they can query and get the path where
> the files are stored (storing file paths in the db), but how should they
> gain access to the server where they are stored?
>
> Does anyone have any idea how?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: ow to find out why is form not valid?

2009-12-01 Thread Hong Kil Dong
Yes, I have validator to each widget.

Is there any error container in sfForm containing all form's errors,
not only global ones ?

On 1 дек, 15:10, Gareth McCumskey  wrote:
> I stand open to correction but I believe that ALL fields need to have a
> validator applied, even if that validatoion is nothing. Just check that you
> have a validator applied to each form widget.
>
> On Tue, Dec 1, 2009 at 1:56 PM, Hong Kil Dong  wrote:
>
>
>
>
>
> > I've fallen into a strange trap - my form doesn't pass validation but
> > neither form's fields nor calling $form->hasGlobalErrors() reports
> > errors...
> > How to find out what cause form validation to fail ?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@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.
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: ow to find out why is form not valid?

2009-12-01 Thread Hong Kil Dong
Yes, I have validator to each widget.

Is there any error container in sfForm containing all form's errors,
not only global ones ?

On 1 дек, 15:10, Gareth McCumskey  wrote:
> I stand open to correction but I believe that ALL fields need to have a
> validator applied, even if that validatoion is nothing. Just check that you
> have a validator applied to each form widget.
>
> On Tue, Dec 1, 2009 at 1:56 PM, Hong Kil Dong  wrote:
>
>
>
>
>
> > I've fallen into a strange trap - my form doesn't pass validation but
> > neither form's fields nor calling $form->hasGlobalErrors() reports
> > errors...
> > How to find out what cause form validation to fail ?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@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.
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: ow to find out why is form not valid?

2009-12-01 Thread rooster (Russ)
On Dec 1, 2:10 pm, Gareth McCumskey  wrote:
> I stand open to correction but I believe that ALL fields need to have a
> validator applied, even if that validatoion is nothing. Just check that you
> have a validator applied to each form widget.
>
> On Tue, Dec 1, 2009 at 1:56 PM, Hong Kil Dong  wrote:
>

You are correct, but these errors will show up as "unexpected extra
form field" errors in the global error array.

>
>
>
> > I've fallen into a strange trap - my form doesn't pass validation but
> > neither form's fields nor calling $form->hasGlobalErrors() reports
> > errors...
> > How to find out what cause form validation to fail ?

Are you sure the form validation is failing? What clues do you have in
that respect? Are you redirecting back to the same page?
Check the developer toolbar also - as of I think Symfony 1.3 you can
see all the form errors in the view section, which lights up
orange :o)

> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.> To post to this group, send email 
> > tosymfony-us...@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.
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: doctrine

2009-12-01 Thread rooster (Russ)


Antoine S. wrote:
> I used a lot with propel the possibilty to add a criteria to a
> generated function.
>
> Example : a product has categories, it will generate :
>
> public function getProductCategories($criteria = null, $con = null)
> {
> }
>
> and then I could easily refined with a criteria.
>
> But with doctrine it seems not possible to do such things ?

In Doctrine you can pass around a query object in much the same way.

$q = new Doctrine::createQuery()->from("myTable t");

public function getProductCategories($q = null)
{

}

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Firefox cache problem - routing

2009-12-01 Thread Guychmyrat Amanmyradov
Hello,
Firefox caches my dynamic pages, it does not show my new messages. I have to 
press ctrl + f5 to see them. but if i can add a random parameter end of my url 
ff thinks i sent new data. so it shows my new messages.
for a page i do not want to stop my all page cache.

is there any way to add auto parameter on my routing.yml

for example:

messages:
 url: /:sf_culture/messages/list
 param: { module: messages, action: list , randpar :  }

this is not working.

thanks in advance.




  ___
Yahoo! Türkiye açıldı!  http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Re: doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread Jonathan Wage
Maybe this?

$this->setDefaults(array(
   'authors_list' => array(2)
));



On Tue, Dec 1, 2009 at 7:52 AM, dziobacz  wrote:

> But I can set default value for select list for id_book (model Books)
> or id_author (model Authors), but default value only doesn't work for
> authors_list or books_list:
> $this->setWidget('authors_list', new sfWidgetFormDoctrineChoiceMany
> (array(
>  'model' => 'Authors')
> )));
>
> $this->setDefaults(array(
>'authors_list' => 2
> ));
>
>
>
> On 1 Gru, 11:35, Thomas Rabaix  wrote:
> > When you work with a sfMODELform then the defaults are not used. If
> > you want to set default value in this case, just set the value to the
> > related object
> >
> > $u = new User;
> > $u->my_default_value = 'asds';
> >
> > $f = new sfUserForm($u)
> >
> > On Tue, Dec 1, 2009 at 10:28 AM, dziobacz 
> wrote:
> > > I couldn't set default value for sfWidgetFormDoctrineChoiceMany in
> > > relation many to many (not one to many), I asked here and nobody know
> > > so I created ticket here:http://trac.symfony-project.org/ticket/7712
> > > Why my ticket is invalid ?
> >
> > > --
> >
> > > You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> > > For more options, visit this group athttp://
> groups.google.com/group/symfony-users?hl=en.
> >
> > --
> > Thomas Rabaixhttp://rabaix.net
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You should follow me on Twitter: http://www.twitter.com/jwage

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Problem with sfDoctrineGuardPlugin

2009-12-01 Thread Trailfinder
Hi All,

Running latest svn of symfony 1.4 / latest svn (today) of
sfDoctrineGuardPlugin.

When running following command i get an error

r...@ubuntu:/home/workstate/testpro# php -c /etc/php5/apache2 symfony
doctrine:build-sql
>> doctrine  generating sql for models

Notice: Undefined variable: e in /home/workstate/symfony/lib/plugins/
sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php on line 229


  Unknown method sfGuardGroupTable::hasI18n

Please help!

Thanks!

P.S. also tried it on a new project.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Problem with sfDoctrineGuardPlugin

2009-12-01 Thread Jonathan Wage
The undefined variable: e error is fixed now in SVN.

- Jon

On Tue, Dec 1, 2009 at 12:29 PM, Trailfinder  wrote:

> Hi All,
>
> Running latest svn of symfony 1.4 / latest svn (today) of
> sfDoctrineGuardPlugin.
>
> When running following command i get an error
>
> r...@ubuntu:/home/workstate/testpro# php -c /etc/php5/apache2 symfony
> doctrine:build-sql
> >> doctrine  generating sql for models
>
> Notice: Undefined variable: e in /home/workstate/symfony/lib/plugins/
> sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php on line 229
>
>
>  Unknown method sfGuardGroupTable::hasI18n
>
> Please help!
>
> Thanks!
>
> P.S. also tried it on a new project.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You should follow me on Twitter: http://www.twitter.com/jwage

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread Jonathan Dart
After upgrading to sf1.4 sfGuardUser/Group/Permission are not working
for me.

In settings.yml
enabled_modules:[default, sfGuardGroup, sfGuardUser,
sfGuardPermission, sfGuardAuth]

When I go to sfGuardUser/index I get the following error:
The route "sf_guard_user_collection" does not exist.

I have not set sf_guard_plugin_routes_register to false.

I noticed a new version of sfDoctrineGuardPlugin was release but
cannot upgrade to it in sf1.4:

#symfony plugin:upgrade sfDoctrineGuardPlugin
>> pluginupgrading plugin "sfDoctrineGuardPlugin"



  Unable to get download information for plugin "sfDoctrineGuardPlugin
| 4.0.1 | stable": Package "sfDoctrineGuardP
lugin" does not have REST info xml available

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Getting crazy : how to add a widget (tinyMCE for ex.) on internationalized fields

2009-12-01 Thread poussain
Hi everybody.

I can not manage to have both i18n and tinyMCE widgets on
internationalised fields. If i put both, i will have internationalised
fields for all my objects' fields, but no tinyMCE for them. I will
have as much tinyMCE fields as i declared, but thew will not
correspond to any language, they will be at the beginning or at the
end. It worked perfectly before i internationalized the objects

Here is an example of code :

// config/doctrine/schema.yml

MyObject:
  actAs:
I18n:
  fields: [title, subtitle, intro, text]
  columns:
title: {type: string(500)}
subtitle: {type: string(500)}
intro: {type: string(4000)}
text: {type: string(16000)}


// lib/form/doctrine/MyObject.class.php

public function configure()
{

$this->embedI18n(array('en', 'fr', 'es'));
$this->widgetSchema->setLabel('fr', 'Français');
$this->widgetSchema->setLabel('en', 'Anglais');
$this->widgetSchema->setLabel('es', 'Español');

$this->widgetSchema['intro'] =  new sfWidgetFormTextareaTinyMCE(
  array(
'width'=>600,
'height'=>100,
'config'=>'theme_advanced_disable: "anchor,image,cleanup,help"',
'theme'   =>  sfConfig::get('app_tinymce_theme','simple'),
  ),
  array(
'class'   =>  'tiny_mce'
  )
);

$this->widgetSchema['text'] =  new sfWidgetFormTextareaTinyMCE(
  array(
'width'=>600,
'height'=>100,
'config'=>'theme_advanced_disable: "anchor,image,cleanup,help"',
'theme'   =>  sfConfig::get('app_tinymce_theme','simple'),
  ),
  array(
'class'   =>  'tiny_mce'
  )
);

$js_path = sfConfig::get('sf_rich_text_js_dir') ? '/'.sfConfig::get
('sf_rich_text_js_dir').'/tiny_mce.js' : '/sf/tinymce/js/tiny_mce.js';
sfContext::getInstance()->getResponse()->addJavascript($js_path);

}


So i guess when i use $this->widgetSchema['intro'], the "intro" name
does not correspond to all the i18n "intro" fields. I tried both
'en_intro' and 'intro_en', but it doesn't do any magic. So maybe you
could help me ?
I have search by myself quite a lot, but found no answer
Thank you

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread Daniel Lohse
This will get messy very fast. Imagine only 20 categories and for this simple 
count, you'll already have 20 queries. Not good. :(

Normally, you'd do a count on the category_id column and group by the same 
category_id column. So simple in SQL/Doctrine but so hard in Propel. :(


Daniel

On 2009-12-01, at 1/December, 2:58 PM, Gareth McCumskey wrote:

> First, you will always have a category with at least one product because you 
> have set cascade on delete. 
> 
> For the second part, in your CategoryPeer class:
> 
> public static function getProductCountPerCategory()
> {
>   //Get all categories
>   $category_obj_arr = self::doSelect(new Criteria());
> 
>   //Get count of products per category
>   $product_per_category_count = array();
> 
>   foreach ($category_obj_arr as $category_obj)
>   {
> $product_c = new Criteria();
> $product_c->add(ProductPeer::CATEGORY_ID, $category_obj->getId());
> $product_per_category_count[$category_obj->getTitle()] = 
> ProductPeer::doCount($product_c);
>   }
> 
>   return $product_per_category_count;
> }
> 
> Thats one example. You don't always have to do everything in a query using 
> joins and to be honest we have often seen massive performance improvements 
> NOT using switching away from joins.
> 
> On Tue, Dec 1, 2009 at 2:56 PM, g0d br  wrote:
> Hi,
> 
> I dont even know how to ask that but i want to show what i need.
> 
> my schema.yml
> category:
>   id: ~
>   title: { type: varchar(100), required: true, index: unique }
> 
> product:
>   id:~
>   category_id: { type: integer, foreignTable: category, foreignReference: id, 
> onDelete: cascade }
>   name: { type: varchar(100), required: true, index: unique }
> 
> i want to retrieve all categories that have a least one product and i want to 
> show how many products each category.
> 
> thank you.
> 
> Celso
> 
> ps. sorry about my english i dont know if the question is understandable.
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
> 
> 
> 
> -- 
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] Add column

2009-12-01 Thread Jordi
I'm using Postgresql and I'm trying symfony for migrate to it. But I
can't do one think I believe it's basic. Modify database schema (for
example adding a new column) without deleting tables. The only thing I
found was a plugin (http://www.symfony-project.org/plugins/
sfPropelMigrationsLightPlugin) but it seems only works over MySQL. Is
any possibility to make is simply?

Thanks in advance.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] [Error] - Schema.yml (trying to implement a self-relationship)

2009-12-01 Thread ruigoncalves
Hi all!

I have the following schema.yml file for my database definition:

Section:
  actAs:
I18n:
  fields: [name]
  columns:
name:
  type: string(30)
  notnull: true
color: string
urlShortDesc: string

Page:
  actAs:
I18n:
  fields: [name,html,urlShortDesc]
  columns:
name: string
gender:
  type: enum
  values: [html, photoGallery]
  default: html
html: string
urlShortDesc: string
section_id:
  type: integer
  notnull: true
  relations:
Section:
  foreignAlias: Pages
SubPage:
  class: Page
  local: subpage
  foreign: id
  type: one


I'm trying to implement a self-relationship in class Page but when I
run the command buil-all-reload, I get the following error message:
"SQLSTATE[42000]: Syntax error or access violation: 1072 Key column
'subpage' doesn't exist in table"

Can anyone give me some help?

Thanks in advance,
Best regards!

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: ow to find out why is form not valid?

2009-12-01 Thread rekarnar
Make sure you are displaying your form after validation and not
creating a new form (or forwarding or redirecting away). That form
should have all the validation errors for you to see.

On Dec 2, 12:56 am, Hong Kil Dong  wrote:
> I've fallen into a strange trap - my form doesn't pass validation but
> neither form's fields nor calling $form->hasGlobalErrors() reports
> errors...
> How to find out what cause form validation to fail ?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: doctrine

2009-12-01 Thread Antoine S.
Thank you,

but I think it s not possible for the generated getter methods.
I think they are just "alias" to the function
_get($fieldName, $load = true);


On Dec 2, 3:30 am, "rooster (Russ)"  wrote:
> Antoine S. wrote:
> > I used a lot with propel the possibilty to add a criteria to a
> > generated function.
>
> > Example : a product has categories, it will generate :
>
> > public function getProductCategories($criteria = null, $con = null)
> > {
> > }
>
> > and then I could easily refined with a criteria.
>
> > But with doctrine it seems not possible to do such things ?
>
> In Doctrine you can pass around a query object in much the same way.
>
> $q = new Doctrine::createQuery()->from("myTable t");
>
> public function getProductCategories($q = null)
> {
>
> }

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread charolastra
I can confirm this... I'm setting up a new project today and having to
set the routes by hand.  Is there a way to manually load them?  I'm
new to Symfony, sorry :-$

On Dec 1, 2:23 pm, Jonathan Dart  wrote:
> After upgrading to sf1.4 sfGuardUser/Group/Permission are not working
> for me.
>
> In settings.yml
>     enabled_modules:        [default, sfGuardGroup, sfGuardUser,
> sfGuardPermission, sfGuardAuth]
>
> When I go to sfGuardUser/index I get the following error:
>     The route "sf_guard_user_collection" does not exist.
>
> I have not set sf_guard_plugin_routes_register to false.
>
> I noticed a new version of sfDoctrineGuardPlugin was release but
> cannot upgrade to it in sf1.4:
>
> #symfony plugin:upgrade sfDoctrineGuardPlugin
>
> >> plugin    upgrading plugin "sfDoctrineGuardPlugin"
>
>   Unable to get download information for plugin "sfDoctrineGuardPlugin
> | 4.0.1 | stable": Package "sfDoctrineGuardP
> lugin" does not have REST info xml available

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] propel. how to retrieve

2009-12-01 Thread g0d br
im sorry to hear that... but my next project i will start with doctrine for
sure.

Thanks all

On Tue, Dec 1, 2009 at 12:23 PM, Daniel Lohse
wrote:

> This will get messy very fast. Imagine only 20 categories and for this
> simple count, you'll already have 20 queries. Not good. :(
>
> Normally, you'd do a count on the category_id column and group by the same
> category_id column. So simple in SQL/Doctrine but so hard in Propel. :(
>
>
> Daniel
>
> On 2009-12-01, at 1/December, 2:58 PM, Gareth McCumskey wrote:
>
> First, you will always have a category with at least one product because
> you have set cascade on delete.
>
> For the second part, in your CategoryPeer class:
>
> public static function getProductCountPerCategory()
> {
>   //Get all categories
>   $category_obj_arr = self::doSelect(new Criteria());
>
>   //Get count of products per category
>   $product_per_category_count = array();
>
>   foreach ($category_obj_arr as $category_obj)
>   {
> $product_c = new Criteria();
> $product_c->add(ProductPeer::CATEGORY_ID, $category_obj->getId());
> $product_per_category_count[$category_obj->getTitle()] =
> ProductPeer::doCount($product_c);
>   }
>
>   return $product_per_category_count;
> }
>
> Thats one example. You don't always have to do everything in a query using
> joins and to be honest we have often seen massive performance improvements
> NOT using switching away from joins.
>
> On Tue, Dec 1, 2009 at 2:56 PM, g0d br  wrote:
>
>> Hi,
>>
>> I dont even know how to ask that but i want to show what i need.
>>
>> my schema.yml
>> category:
>>   id: ~
>>   title: { type: varchar(100), required: true, index: unique }
>>
>> product:
>>   id:~
>>   category_id: { type: integer, foreignTable: category, foreignReference:
>> id, onDelete: cascade }
>>   name: { type: varchar(100), required: true, index: unique }
>>
>> i want to retrieve all categories that have a least one product and i want
>> to show how many products each category.
>>
>> thank you.
>>
>> Celso
>>
>> ps. sorry about my english i dont know if the question is understandable.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@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.
>>
>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread Jonathan Dart
After upgrading sfDoctrineGuardPlugin to 4.0.0.1 things worked as
expected. To do the upgrade I changed my
ProjectConfiguration.class.php to point to sf`1.3, this allows the
upgrade to work, then after you're done change it back to 1.4 and you
should be good to go after a doctrine:build --all and cc.

On Dec 1, 2:36 pm, charolastra  wrote:
> I can confirm this... I'm setting up a new project today and having to
> set the routes by hand.  Is there a way to manually load them?  I'm
> new to Symfony, sorry :-$
>
> On Dec 1, 2:23 pm, Jonathan Dart  wrote:
>
> > After upgrading to sf1.4 sfGuardUser/Group/Permission are not working
> > for me.
>
> > In settings.yml
> >     enabled_modules:        [default, sfGuardGroup, sfGuardUser,
> > sfGuardPermission, sfGuardAuth]
>
> > When I go to sfGuardUser/index I get the following error:
> >     The route "sf_guard_user_collection" does not exist.
>
> > I have not set sf_guard_plugin_routes_register to false.
>
> > I noticed a new version of sfDoctrineGuardPlugin was release but
> > cannot upgrade to it in sf1.4:
>
> > #symfony plugin:upgrade sfDoctrineGuardPlugin
>
> > >> plugin    upgrading plugin "sfDoctrineGuardPlugin"
>
> >   Unable to get download information for plugin "sfDoctrineGuardPlugin
> > | 4.0.1 | stable": Package "sfDoctrineGuardP
> > lugin" does not have REST info xml available

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: doctrine - Jonathan.Wage - what is wrong in my ticket ?

2009-12-01 Thread dziobacz
At least Jonathan Wage - good xD Unfortunately Jonathan this solution
doesn't work :(
I have tried that solution - Gregore gave me that solution few days
ago in this thread:
http://groups.google.com/group/symfony-users/browse_thread/thread/9f3a6aeef78e7212/5bb41b1d1609edce#5bb41b1d1609edce
but it doesn't work :/


Everything is ok using JavaScript but it isn't a solution, something
is wrong with Doctrine, what is more I can make default value
in Doctrine if we have relation one to many, I CAN'T MAKE default
value ONLY then when we have relation many to many.
I can give/publish my project/code to prove that I have right if
somebody wants - do You want that Jonathan ?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Where to clear the cache

2009-12-01 Thread Lee Bolding
On 1 Dec 2009, at 13:46, Timmipetit wrote:

> Now let's say that messages will be created/edited/deleted in 2
> modules in the frontend, and maybe also from the backend (or even a
> plugin). When this happens, the cached partial from that user should
> be deleted.
> The easiest way to do this in this situation would probably be from
> the model, right? If you would automatically delete the cache in the
> model, it doesn't matter where messages are edited. But I'm not quite
> sure if this seems right from a MVC point of view.
> How would you do this, and why?

Whilst I'm still not convinced it's the "best" approach (but one that I'm 
currently using... for now), you could fire an event from your model, which an 
observer would use to clear the cache.

This is a little cleaner as it loosely couples the model to the caching 
implementation, and means your event and observer are reusable. It also means 
that your model is reusable in a scenario where you don't want this behaviour 
(for instance, when used with webservices)

I think the "best" approach would be to use an AOP advice around the 
save/update methods on your message model... but at least for now, symfony 
doesn't have AOP.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] semantic web

2009-12-01 Thread vegoigse
someone knows which parts I have to change if I need a semantic web.
If I use xml, is it enough?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] semantic web

2009-12-01 Thread Alexandre Salomé
Hum yes :)

2009/12/1 

> someone knows which parts I have to change if I need a semantic web.
> If I use xml, is it enough?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Re: ow to find out why is form not valid?

2009-12-01 Thread Alexandre Salomé
In this case, remove your form template an do :

echo $form


You will see everything, especially :

$form->renderGlobalErrors();


Alex'

2009/12/1 rekarnar 

> Make sure you are displaying your form after validation and not
> creating a new form (or forwarding or redirecting away). That form
> should have all the validation errors for you to see.
>
> On Dec 2, 12:56 am, Hong Kil Dong  wrote:
> > I've fallen into a strange trap - my form doesn't pass validation but
> > neither form's fields nor calling $form->hasGlobalErrors() reports
> > errors...
> > How to find out what cause form validation to fail ?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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 routes in forms

2009-12-01 Thread Adrien Mogenet
Basically generated forms look like :

   
   
   
   
   


?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] [Error] - Schema.yml (trying to implement a self-relationship)

2009-12-01 Thread Alexandre Salomé
You must define your subpage column on Page model.

subpage:   integer(4)


Alexandre

2009/12/1 ruigoncalves 

> Hi all!
>
> I have the following schema.yml file for my database definition:
>
> Section:
>  actAs:
>I18n:
>  fields: [name]
>  columns:
>name:
>  type: string(30)
>  notnull: true
>color: string
>urlShortDesc: string
>
> Page:
>  actAs:
>I18n:
>  fields: [name,html,urlShortDesc]
>  columns:
>name: string
>gender:
>  type: enum
>  values: [html, photoGallery]
>  default: html
>html: string
>urlShortDesc: string
>section_id:
>  type: integer
>  notnull: true
>  relations:
>Section:
>  foreignAlias: Pages
>SubPage:
>  class: Page
>  local: subpage
>  foreign: id
>  type: one
>
>
> I'm trying to implement a self-relationship in class Page but when I
> run the command buil-all-reload, I get the following error message:
> "SQLSTATE[42000]: Syntax error or access violation: 1072 Key column
> 'subpage' doesn't exist in table"
>
> Can anyone give me some help?
>
> Thanks in advance,
> Best regards!
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Add column

2009-12-01 Thread Alexandre Salomé
Propel doesn't handle Migrations.

Consider using raw SQL :

ALTER TABLE ... ADD 

You can create a data/sql/migrations folder and use versionning :

1.0-to-1.1.sql

It's the simplest way.

2009/12/1 Jordi 

> I'm using Postgresql and I'm trying symfony for migrate to it. But I
> can't do one think I believe it's basic. Modify database schema (for
> example adding a new column) without deleting tables. The only thing I
> found was a plugin (http://www.symfony-project.org/plugins/
> sfPropelMigrationsLightPlugin) but it seems only works over MySQL. Is
> any possibility to make is simply?
>
> Thanks in advance.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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] unsubscrive

2009-12-01 Thread edem AMEWUAME

please my message is a administrator for symfony group please i would like to 
unsubscrive in this group 

please my compte is not a google compte please  help me 

it is enough

thanks
  
_
A la recherche de bons plans pour une rentrée pas chère ? Bing ! Trouvez !
http://www.bing.com/search?q=bons+plans+rentr%C3%A9e&form=MVDE6

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Using routes in forms

2009-12-01 Thread Alexandre Salomé
We don't write such code, typically, a form like create/edit submit to the
save action.

The difference create/edit is done by checking the id parameter. Present ?
Update ! Missing ? Create...

If you are facing complexity in template, use a helper.

Have a look at admin generated code,

Alexandre

2009/12/2 Adrien Mogenet 

> Basically generated forms look like :
>
>   
>
> BUT because I'm using routes, I would like to use route to define my
> action="..." parameter.
>
> Can you share your experience with that issue ? How do you manage this
> part ?
>
> Do you write sthg like :
>
>   
>   
>   
>   
>   
>
>
> ?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Getting crazy : how to add a widget (tinyMCE for ex.) on internationalized fields

2009-12-01 Thread Alexandre Salomé
Well, it's all OK, until you do :

$this->widgetSchema['intro'] =  new sfWidgetFormTextareaTinyMCE(


At this time, you are not modifying existing widgets, you are creating new
one.

You should put this code in the MyObjectI18nForm.  Symfony generates forms
for I18N attributes.

In your template :

echo $form['fr']['intro']


Alex'

2009/12/1 poussain 

> Hi everybody.
>
> I can not manage to have both i18n and tinyMCE widgets on
> internationalised fields. If i put both, i will have internationalised
> fields for all my objects' fields, but no tinyMCE for them. I will
> have as much tinyMCE fields as i declared, but thew will not
> correspond to any language, they will be at the beginning or at the
> end. It worked perfectly before i internationalized the objects
>
> Here is an example of code :
>
> // config/doctrine/schema.yml
>
> MyObject:
>  actAs:
>I18n:
>  fields: [title, subtitle, intro, text]
>  columns:
>title: {type: string(500)}
>subtitle: {type: string(500)}
>intro: {type: string(4000)}
>text: {type: string(16000)}
>
>
> // lib/form/doctrine/MyObject.class.php
>
> public function configure()
> {
>
> $this->embedI18n(array('en', 'fr', 'es'));
> $this->widgetSchema->setLabel('fr', 'Français');
> $this->widgetSchema->setLabel('en', 'Anglais');
> $this->widgetSchema->setLabel('es', 'Español');
>
> $this->widgetSchema['intro'] =  new sfWidgetFormTextareaTinyMCE(
>  array(
>'width'=>600,
>'height'=>100,
>'config'=>'theme_advanced_disable: "anchor,image,cleanup,help"',
>'theme'   =>  sfConfig::get('app_tinymce_theme','simple'),
>  ),
>  array(
>'class'   =>  'tiny_mce'
>  )
> );
>
> $this->widgetSchema['text'] =  new sfWidgetFormTextareaTinyMCE(
>  array(
>'width'=>600,
>'height'=>100,
>'config'=>'theme_advanced_disable: "anchor,image,cleanup,help"',
>'theme'   =>  sfConfig::get('app_tinymce_theme','simple'),
>  ),
>  array(
>'class'   =>  'tiny_mce'
>  )
> );
>
> $js_path = sfConfig::get('sf_rich_text_js_dir') ? '/'.sfConfig::get
> ('sf_rich_text_js_dir').'/tiny_mce.js' : '/sf/tinymce/js/tiny_mce.js';
> sfContext::getInstance()->getResponse()->addJavascript($js_path);
>
> }
>
>
> So i guess when i use $this->widgetSchema['intro'], the "intro" name
> does not correspond to all the i18n "intro" fields. I tried both
> 'en_intro' and 'intro_en', but it doesn't do any magic. So maybe you
> could help me ?
> I have search by myself quite a lot, but found no answer
> Thank you
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Schema for a ticketing system

2009-12-01 Thread Alexandre Salomé
Relations are defined by (at less) 3 attributes : class, local, foreign.

Read Doctrine Documentation ( on doctrine-project.org) about relations, your
schema is missing some informations.

Alex'

2009/11/29 Trailfinder 

> Hi All,
>
> Could somebody help me with a schema for a ticketing system. Problem
> is that after reading the documentation on both Symfony and Doctrine I
> still have problems figuring out how to use relations in YAML.
>
> Ticket:
>  actAs: [Timestampable]
>  columns:
>  id:
>type: integer(4)
>primary: true
>autoincrement: true
>  tickettype_id:
>type: integer
>  tickettext:
>type: clob(65532)
>  actions:
>type: clob(65532)
>  ticketnumber:
>type: integer
>  user_id:
>type: integer
>  created_at:
>   type: timestamp
>   notnull: true
>  update_at:
>type: timestamp
>  relations:
> Tickettype:
>type: one
>  User:
>type: one
>
> User:
>  columns:
>  id:
>type: integer(4)
>primary: true
>autoincrement: true
>  firstname:
>type: string(255)
>  lastname:
>type: string(255)
>  email:
>type: string(255)
>  username:
>type: string(255)
>  password:
>type: string(255)
>  active:
>type: enum
>values: [yes,no]
>  level:
>type: integer(2)
>
> Tickettype:
>  columns:
>  id:
>type: integer(4)
>primary: true
>autoincrement: true
>  name:
>type : string(255)
>
> I tried something like the above without any luck. Clearly I don't
> understand how relations work in YML and Doctrine.
>
> So can someone help me how to do this or suggest a better way to build
> a ticket system in Symfony.
>
> Thanks!
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] funky select behavior

2009-12-01 Thread Alexandre Salomé
Hello,


  Your default value is "English", so the widget #2 is OK

  the first one must inherits from your object value.

  Does your object method "getLanguage" returns "Romanian" by default ?

Try debugging :

$myObject = new Product();
echo $myObject->getLanguage();


Do you bind values to form ? Are you using admin generator ?

2009/11/29 pghoratiu 

> Hello!
>
> I have encountered a strange behavior with one of my forms and I can
> not explain what may be causing it.
> I have the same widget defined twice (the same way) and the first one
> is not working corectly the second one is ok (they are defined exactly
> the same way):
>
>$this->widgetSchema['language'] = new sfWidgetFormChoice(array(
>  'choices'  => $this->getLanguages(),
>  'multiple' => false,
>  'expanded' => false,
>  'default' => 'English'
>));
>
>$this->widgetSchema['language2'] = new sfWidgetFormChoice(array(
>  'choices'  => $this->getLanguages(),
>  'multiple' => false,
>  'expanded' => false,
>  'default' => 'English'
>));
>
> The language is actually a table column in a Product table, language2
> is not a column in the db (not sure if this is important). Given that
> the widget generated code is the same the output should be the same
> but it's not, I can not set up the default value in the first case,
> the second case works as expected:
>
> Language
>  
>
>   Romanian
>   English
>
>  
>
> Language2
>  
>
>   Romanian
>   English
>
>  
>
> I don't know what is causing this behavior, I suspect that the column
> name "language" is the problem.
>
> Any ideas?
>
> My environment is Symfony 1.2.9 with Doctrine, php 5.2.9.
>
>   gabriel
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Re: CSRF form_tag questions

2009-12-01 Thread Alexandre Salomé
Huum, form_tag doesn't aim to create the form, or render CSRF fields, just
ouput the  tag, add attributes if you are using files, method =
POST...

But nothing more than 

Creation of the form must be done in controller. And in controller, you are
OK to add CSRF

2009/11/30 Tommy 

> Thanks for your reply.
> I am using csrf_secret already. I used link_to() together with
> $request->checkCSRFProtection(); And it works fine.
>
> My question is that how to use checkCSRFProtection with a form created
> by form_tag() function.
> The form doesn't have _csrf_token, so the outcome is Internal Server
> Error when i submit the form.
>
> Thanks in advance.
>
>
> On Nov 28, 8:35 am, Alexandre SALOME 
> wrote:
> > Enable it in your settings.yml (see
> > documentation<
> http://www.symfony-project.org/reference/1_4/fr/04-Settings#chapter_0...>
> > )
> >
> > 2009/11/27 Tommy 
> >
> >
> >
> > > Hello,
> > >   can i enable CSRF protection using form_tag ??
> > >   If it is not possible...Is there a way to create a sfForm using
> > > CSRF protection???
> > >   btw, link_to with method = post CSRF protection works perfectly. I
> > > am using symfony 1.3.
> > > Thanks!
> >
> > > --
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "symfony users" group.
> > > To post to this group, send email to symfony-us...@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.
> >
> > --
> > Alexandre Salomé -- alexandre.sal...@gmail.com
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Firefox cache problem - routing

2009-12-01 Thread Alexandre Salomé
There is no option in routing, it's not the routing matter, but the cache
matter.

Check your cache.yml files, but it can also be the apache configuration...

Disable your cache, and test it.

Alexandre

2009/12/1 Guychmyrat Amanmyradov 

> Hello,
> Firefox caches my dynamic pages, it does not show my new messages. I have
> to press ctrl + f5 to see them. but if i can add a random parameter end of
> my url ff thinks i sent new data. so it shows my new messages.
> for a page i do not want to stop my all page cache.
>
> is there any way to add auto parameter on my routing.yml
>
> for example:
>
> messages:
>  url: /:sf_culture/messages/list
>  param: { module: messages, action: list , randpar :  rand(1,10); ?> }
>
> this is not working.
>
> thanks in advance.
>
>
> --
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr 
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>



-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: Add column

2009-12-01 Thread dthomas-wwp
I use sfPropelSqlDiffPlugin, which adds a propel:build-sql-diff task.
It works well, in general.

There's some quirkiness to it though: If you're changing PKs or FKs,
sometimes it's not able to figure out the right order of operations,
so you may have to enter a loop of running the sql, running the task,
rinse and repeat until no more diffs exist.

Also, it seems to have an issue with differences that consist only of
whitespace.  The one example that haunts me routinely is that MySQL
enums continually appear as false positive differences.

Those quirks aside, I'd recommend checking it out.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Doctrine Query

2009-12-01 Thread Alexandre Salomé
Didn't understood your 2 methods to check result :


   1. Executing MySQL with the console client (or PHPMyAmin, or other)
   2. Executing with Doctrine

Is it OK ? Give us more details, where do you execute it ? Have you checked
your parameter ? How do you render/view the result of "Only 1 is retrieved".

Maybe 3 are retrieved but only 1 is displayed (templating error)

Create your action, look at the generated SQL, execute it in PHPMyAdmin (or
your favourite client) and see number of results.

Try some debugging :

$mySet = Doctrine::getTable('Invoice')->getForUser(...);
echo count($mySet);


Check step by step.

Alexandre

2009/11/30 jilomgv3 

> Well, I really need help. This might be a stupid error but I can't
> figure it out
> symfony 1.2 / Doctrine sfDoctrineGuardUser sfDoctrineApplyPlugin
>
> schema for the apply / business logic is :
>
> sfGuardUserProfile:
>  tableName: sf_guard_user_profile
>  columns:
>id: { type: integer(4), primary: true,
> autoincrement: true }
>user_id: { type: integer(4), notnull: true }
>email:{ type: string(80) }
>fullname:{ type: string(80) }
>first_name: { type: string(80) }
>...
>  relations:
>sfGuardUser:{ local: user_id, foreign: id, type: one,
> onDelete: cascade, foreignType: one, foreignAlias: Profile }
>
> EitInvoice:
>  tableName: eit_invoice
>  actAs:{ Timestampable: ~ }
>  columns:
>id:  { type: integer(4), primary: true,
> autoincrement: true }
>user_profile_id:   { type: integer,   notnull: true }
>invoice_date:  { type: date,  notnull: true }
>invoice_quarter:   { type: string(5), notnull: true }
>...
>  relations:
>sfGuardUserProfile:
>  local:user_profile_id
>  foreign:  id
>  type: one
>  foreignType:  one
>  onDelete: CASCADE
>
>
> I just try to get invoice for the identified user
> So in EitInvoiceTable.class.php :
> class EitInvoiceTable extends Doctrine_Table
> {
>public function getCurrentYearInvoices($user) {
>$nowQuarter = QuarterTools::getNow();
>$prevYear =
> QuarterTools::toDate($nowQuarter['year']-1,$nowQuarter
> ['quarter'],1,"Y-m-d");
>$fields = 'i.invoice_quarter AS quarter, i.invoice_date AS
> date,
> i.invoice_file AS file';
>$q=Doctrine_Query::create()
>->from("EitInvoice i,
> i.sfGuardUserProfile p")
>->orderBy('quarter')
>->where('date >
> "'.$prevYear.'"')
>
>  ->andWhere("p.sfGuardUser.username LIKE ?",$user)
>->select($fields)
>;
>return $q->execute();
>}
>
> }
>
> get the SQL in the log :
> SELECT e.invoice_quarter AS e__0, e.invoice_date AS e__1,
> e.invoice_file AS e__2 FROM eit_invoice e LEFT JOIN
> sf_guard_user_profile s ON e.user_profile_id = s.id LEFT JOIN
> sf_guard_user s2 ON s.user_id = s2.id WHERE e__1 > "2008-10-01" AND
> s2.username LIKE ? ORDER BY e__0 - (jilom...@gmail.com )
>
> Using this query I got 3 answers (normal) but using the action return
> value only get 1 answer :-(
>
> Any idea ?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Schema for a ticketing system

2009-12-01 Thread Parijat Kalia
Hey...if that is the exact replica of the schema in the YAML file, you are
getting the identation wrong.
It should be
Ticket:
   actAs:
   

basically, make sure u space out the columns twice after the table...other
than that...put your column attributes in curly brackets such as
id: {type: INTEGER, size: 4, primary: true,autoincrement: true }

For something that is a primary key, such as the id above, the following
should suffice

id: ~
On Sun, Nov 29, 2009 at 8:36 AM, Trailfinder  wrote:

> Hi All,
>
> Could somebody help me with a schema for a ticketing system. Problem
> is that after reading the documentation on both Symfony and Doctrine I
> still have problems figuring out how to use relations in YAML.
>
> Ticket:
>  actAs: [Timestampable]
>  columns:
>  id:
>type: integer(4)
>primary: true
>autoincrement: true
>  tickettype_id:
>type: integer
>  tickettext:
>type: clob(65532)
>  actions:
>type: clob(65532)
>  ticketnumber:
>type: integer
>  user_id:
>type: integer
>  created_at:
>   type: timestamp
>   notnull: true
>  update_at:
>type: timestamp
>  relations:
> Tickettype:
>type: one
>  User:
>type: one
>
> User:
>  columns:
>  id:
>type: integer(4)
>primary: true
>autoincrement: true
>  firstname:
>type: string(255)
>  lastname:
>type: string(255)
>  email:
>type: string(255)
>  username:
>type: string(255)
>  password:
>type: string(255)
>  active:
>type: enum
>values: [yes,no]
>  level:
>type: integer(2)
>
> Tickettype:
>  columns:
>  id:
>type: integer(4)
>primary: true
>autoincrement: true
>  name:
>type : string(255)
>
> I tried something like the above without any luck. Clearly I don't
> understand how relations work in YML and Doctrine.
>
> So can someone help me how to do this or suggest a better way to build
> a ticket system in Symfony.
>
> Thanks!
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: sfGuardAuth not registering routes in sf1.4?

2009-12-01 Thread charolastra
Upgrading to 4.0.1 worked for me, thanks.  It was also consistently
failing in the sfGuardUser controller due to not enough memory, so I
upped that in php.ini.


On Dec 1, 4:39 pm, Jonathan Dart  wrote:
> After upgrading sfDoctrineGuardPlugin to 4.0.0.1 things worked as
> expected. To do the upgrade I changed my
> ProjectConfiguration.class.php to point to sf`1.3, this allows the
> upgrade to work, then after you're done change it back to 1.4 and you
> should be good to go after a doctrine:build --all and cc.
>
> On Dec 1, 2:36 pm, charolastra  wrote:
>
>
>
> > I can confirm this... I'm setting up a new project today and having to
> > set the routes by hand.  Is there a way to manually load them?  I'm
> > new to Symfony, sorry :-$
>
> > On Dec 1, 2:23 pm, Jonathan Dart  wrote:
>
> > > After upgrading to sf1.4 sfGuardUser/Group/Permission are not working
> > > for me.
>
> > > In settings.yml
> > >     enabled_modules:        [default, sfGuardGroup, sfGuardUser,
> > > sfGuardPermission, sfGuardAuth]
>
> > > When I go to sfGuardUser/index I get the following error:
> > >     The route "sf_guard_user_collection" does not exist.
>
> > > I have not set sf_guard_plugin_routes_register to false.
>
> > > I noticed a new version of sfDoctrineGuardPlugin was release but
> > > cannot upgrade to it in sf1.4:
>
> > > #symfony plugin:upgrade sfDoctrineGuardPlugin
>
> > > >> plugin    upgrading plugin "sfDoctrineGuardPlugin"
>
> > >   Unable to get download information for plugin "sfDoctrineGuardPlugin
> > > | 4.0.1 | stable": Package "sfDoctrineGuardP
> > > lugin" does not have REST info xml available

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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: CSRF form_tag questions

2009-12-01 Thread Tommy
I agree. That make sense as form =\= sfForm
would you mind showing me an example of creating a CSRF added sfForm
in actions.class.php.
I am totally newbie in symfony.
Thanks in advance.

On Dec 2, 7:27 am, Alexandre Salomé 
wrote:
> Huum, form_tag doesn't aim to create the form, or render CSRF fields, just
> ouput the  tag, add attributes if you are using files, method =
> POST...
>
> But nothing more than 
>
> Creation of the form must be done in controller. And in controller, you are
> OK to add CSRF
>
> 2009/11/30 Tommy 
>
>
>
> > Thanks for your reply.
> > I am using csrf_secret already. I used link_to() together with
> > $request->checkCSRFProtection(); And it works fine.
>
> > My question is that how to use checkCSRFProtection with a form created
> > by form_tag() function.
> > The form doesn't have _csrf_token, so the outcome is Internal Server
> > Error when i submit the form.
>
> > Thanks in advance.
>
> > On Nov 28, 8:35 am, Alexandre SALOME 
> > wrote:
> > > Enable it in your settings.yml (see
> > > documentation<
> >http://www.symfony-project.org/reference/1_4/fr/04-Settings#chapter_0...>
> > > )
>
> > > 2009/11/27 Tommy 
>
> > > > Hello,
> > > >   can i enable CSRF protection using form_tag ??
> > > >   If it is not possible...Is there a way to create a sfForm using
> > > > CSRF protection???
> > > >   btw, link_to with method = post CSRF protection works perfectly. I
> > > > am using symfony 1.3.
> > > > Thanks!
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "symfony users" group.
> > > > To post to this group, send email to symfony-us...@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.
>
> > > --
> > > Alexandre Salomé -- alexandre.sal...@gmail.com
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "symfony users" group.
> > To post to this group, send email to symfony-us...@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.
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.com

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




Re: [symfony-users] Firefox cache problem - routing

2009-12-01 Thread Gareth McCumskey
Are you sure its Firefox? Have you tested this with other browsers? Your
first step is to confirm if its the browser or not. If you get the same
results within another browser then its the caching in your application
affecting it. Your best bet then is to relook at how you are caching on your
application and whether you have view/template caching that could be causing
it.

2009/12/1 Guychmyrat Amanmyradov 

> Hello,
> Firefox caches my dynamic pages, it does not show my new messages. I have
> to press ctrl + f5 to see them. but if i can add a random parameter end of
> my url ff thinks i sent new data. so it shows my new messages.
> for a page i do not want to stop my all page cache.
>
> is there any way to add auto parameter on my routing.yml
>
> for example:
>
> messages:
>  url: /:sf_culture/messages/list
>  param: { module: messages, action: list , randpar :  rand(1,10); ?> }
>
> this is not working.
>
> thanks in advance.
>
>
> --
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr 
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@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.
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.