[symfony-users] Re: change default sfRoute class

2010-02-17 Thread Mathieu Tricoire
Hi raphael,
Yes it's for all routes, I just want define my own generator route
class to add an option for generate url function to manage subdomain.
For example I define my host in app.yml like that : www.domain.com
And in my routing

# If the current host is default host, generate relative url else an
absolute url with the default host (if we no define absolute...)
because no sub option defined
# in www.domain.com this route generate = /blog-list
# in myblog.domain.com this route generate = http://www.domain.com/blog-list
blog_list:
  url:   /blog-list
  param: { module: Blog, action: index }

# Generate a relative url because sub option is true
blog:
  url: /blog
  param:   { module: Blog, action: show }
  options: { sub: true }


thx for you reply, and sorry for my poor english ;-)

On 17 fév, 00:03, Raphael Schumacher m...@raphaelschumacher.ch
wrote:
 My apologies if I misunderstood your question, and perhaps you may
 elaborate a bit more on your specific situation. You want to replace
 sfRoute by your own class in general for all routes (unless explicitly
 specified in routing.yml)? What sort of routes have you then defined
 in routing.yml, e.g. sfDoctrineCollectionRoute/
 sfPropelCollectionRoute? (I guess you must still have some sort of
 route definitions in there, right?)

-- 
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 frontend sort by th

2010-02-17 Thread ziclo
Is there a native (doctrine or symfony) method ?

Thanks

On 14 fév, 14:52, Daniel Lohse annismcken...@googlemail.com wrote:
 You should take a look at the internal Sympal plugin sfSympalDataGridPlugin. 
 This will do what you want and there's also some documentation about it on 
 the Sympal homepage 
 here:http://www.sympalphp.org/documentation/1_0/book/data-grid/en.

 Jon recently committed some changes that should make it independent of 
 Sympal. I know it works without it because I've used it just recently on a 
 non-Sympal project.

 I also have some gems hidden inside that project's sfSympalDataGridPlugin 
 fork that should find their way into the Sympal repository soon-ish but they 
 don't have unit tests right now. :)

 Regards, Daniel

 On 14.02.2010, at 14:46, Dimitar wrote:

  I am looking for the same thing, with Doctrine and SF 1.4 If anyone
  can help I am very interested too.

  --
  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.



Re: [symfony-users] Abridged summary of symfony-users@googlegroups.com - 52 Messages in 23 Topics

2010-02-17 Thread joost . farla
Beste,

Tot en met 18 februari ben ik niet aanwezig op kantoor.
U kunt contact opnemen met Wout Withagen: w...@freshheads.com of 013 5448761.

Met vriendelijke groet,

Joost Farla
joost.fa...@freshheads.com

- -

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
i...@freshheads.com | www.freshheads.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] White screen only in production enviroment

2010-02-17 Thread Trailfinder
Hi all,

My dev enviroment works great. But when I deploy to my production
enviroment, I get a white screen only. Strange thing is, my backend is
working. My frontend only gives white screens.

I can imagine there can be multiple places to look. But is there a way
to test effectively where the problem is?

Thanks!

B.

-- 
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] White screen only in production enviroment

2010-02-17 Thread Gábor Fási
Edit your frontend's settings.yml, specifically prod's error_reporting
so you can see the error. Do not forget to uncomment the line when
you're done.

On Wed, Feb 17, 2010 at 14:37, Trailfinder beer...@gmail.com wrote:
 Hi all,

 My dev enviroment works great. But when I deploy to my production
 enviroment, I get a white screen only. Strange thing is, my backend is
 working. My frontend only gives white screens.

 I can imagine there can be multiple places to look. But is there a way
 to test effectively where the problem is?

 Thanks!

 B.

 --
 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] sflive2010 Symfony Core Dev QA session

2010-02-17 Thread Ben Haines
After Stefan Koopmanschap's talk about community on Saturday at
sflive2010 I feel compelled to give something back ;)

So here is the Symfony Core Dev Team in HD ;) Enjoy!

http://www.vimeo.com/user1491208/videos

Ben

-- 
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] White screen only in production enviroment

2010-02-17 Thread Eno
On Wed, 17 Feb 2010, Trailfinder wrote:

 My dev enviroment works great. But when I deploy to my production
 enviroment, I get a white screen only. Strange thing is, my backend is
 working. My frontend only gives white screens.
 
 I can imagine there can be multiple places to look. But is there a way
 to test effectively where the problem is?


Look at your web server error logs.



-- 


-- 
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: change default sfRoute class

2010-02-17 Thread Mathieu Tricoire
I found a solution not very pretty but it works for the moment ... but
if someone has a solution I take.
#factories.yml
  routing:
class: myPatternRouting



class myPatternRouting extends sfPatternRouting
{
  public function connect($name, $route)
  {
$routes = $route instanceof sfRouteCollection ? $route :
array($name = $route);
foreach (self::flattenRoutes($routes) as $name = $route)
{
  $this-routes[$name] = $route;
  $this-configureRoute($route);

  if ($this-options['logging'])
  {
$this-dispatcher-notify(new sfEvent($this,
'application.log', array(sprintf('Connect %s %s (%s)',
get_class($route), $name, $route-getPattern();
  }
}
  }

  static public function flattenRoutes($routes)
  {
$flattenRoutes = array();
foreach ($routes as $name = $route)
{
  if ($route instanceof sfRouteCollection)
  {
$flattenRoutes = array_merge($flattenRoutes,
self::flattenRoutes($route));
  }
  else
  {
if($route instanceof sfRoute)
{
  $route = new myHostRoute($route);
}
$flattenRoutes[$name] = $route;
  }
}

return $flattenRoutes;
  }
}


On 17 fév, 09:21, Mathieu Tricoire mathieu.trico...@gmail.com wrote:
 Hi raphael,
 Yes it's for all routes, I just want define my own generator route
 class to add an option for generate url function to manage subdomain.
 For example I define my host in app.yml like that :www.domain.com
 And in my routing

 # If the current host is default host, generate relative url else an
 absolute url with the default host (if we no define absolute...)
 because no sub option defined
 # inwww.domain.comthis route generate = /blog-list
 # in myblog.domain.com this route generate =http://www.domain.com/blog-list
 blog_list:
   url:   /blog-list
   param: { module: Blog, action: index }

 # Generate a relative url because sub option is true
 blog:
   url:     /blog
   param:   { module: Blog, action: show }
   options: { sub: true }

 thx for you reply, and sorry for my poor english ;-)

 On 17 fév, 00:03, Raphael Schumacher m...@raphaelschumacher.ch
 wrote:



  My apologies if I misunderstood your question, and perhaps you may
  elaborate a bit more on your specific situation. You want to replace
  sfRoute by your own class in general for all routes (unless explicitly
  specified in routing.yml)? What sort of routes have you then defined
  in routing.yml, e.g. sfDoctrineCollectionRoute/
  sfPropelCollectionRoute? (I guess you must still have some sort of
  route definitions in there, right?)

-- 
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] sflive2010 Symfony Core Dev QA session

2010-02-17 Thread Dennis Benkert
This is great, thanks very much for sharing this!

Will you provide more of them in the days?

- Dennis

2010/2/17 Ben Haines ben.hai...@gmail.com:
 After Stefan Koopmanschap's talk about community on Saturday at
 sflive2010 I feel compelled to give something back ;)

 So here is the Symfony Core Dev Team in HD ;) Enjoy!

 http://www.vimeo.com/user1491208/videos

 Ben

 --
 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: Nginx symfony url_for problem

2010-02-17 Thread Arthur Ccube
OGeee...

My script works now!

I've modifed a few things, don't know which one is the error command
anyway:

prev:

location ~ \.php$ {
... }
location ~ \.php($|/) {
}

now, only one .php:

location ~ \.php($|/) {
}


prev, only:
fastcgi_param  SCRIPT_FILENAME  /home/sfproject/web$script;


now:
 fastcgi_param SCRIPT_FILENAME /home/sfproject/web$script;
 fastcgi_param  SCRIPT_NAME  $script;


prev:
 include fastcgi_params;

now:
 include /usr/nginx/conf/fastcgi_params;


Thanks a bunch!
On 2月17日, 上午1時05分, jean-phi jeanphi84...@gmail.com wrote:
 Hi, here is my working configurationnginx/ fastcgi :

 server {
     listen 80;
     server_name  www..com;

     root   /../web/;
     index  index.php;

     location / {

         if (-f $request_filename) {
             expires max;
             break;
         }

         if ($request_filename !~ \.(js|htc|ico|gif|jpg|png|css)$) {
             rewrite ^(.*) /index.php last;
         }
     }

     location /sf/ {
         root /usr/share/php/symfony/1.4/data/web;
         expires max;
     }

     location ~ \.php($|/) {
         set  $script     $uri;
         set  $path_info  ;

         if ($uri ~ ^(.+\.php)(/.+)) {
             set  $script     $1;
             set  $path_info  $2;
         }

         fastcgi_pass   127.0.0.1:9000;

         include /etc/nginx/fastcgi_params;
         fastcgi_param
 SCRIPT_FILENAME  /.../web$script;
         fastcgi_param  PATH_INFO        $path_info;
         fastcgi_param  SCRIPT_NAME      $script;
         fastcgi_intercept_errors on;

     }

 }

 On 16 fév, 16:50, Arthur Ccube arthurcc...@gmail.com wrote:

  Hi Guys,

  I am new to symfony. Anyway, I find it easy to follow the jobeet
  tutorial usingNginx(instead of Apache).

  However, I have a problem in the Day 3 jobeet actions.

 http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03

  All the links created in the index, edit, show becomes job/job and I
  got a 404 error if I follow the links when I typed the follows in
  browsers:http://localhost.localdomain/frontend_dev.php/job

  but not if the links changed to:http://localhost.localdomain/job

  I googled it and find it should be related to the AllowOveride All
  setting in Apache. However, how to set it up inNginx?

-- 
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: change default sfRoute class

2010-02-17 Thread Mathieu Tricoire
Not works...

On 17 fév, 15:43, Mathieu Tricoire mathieu.trico...@gmail.com wrote:
 I found a solution not very pretty but it works for the moment ... but
 if someone has a solution I take.
 #factories.yml
   routing:
     class: myPatternRouting

 class myPatternRouting extends sfPatternRouting
 {
   public function connect($name, $route)
   {
     $routes = $route instanceof sfRouteCollection ? $route :
 array($name = $route);
     foreach (self::flattenRoutes($routes) as $name = $route)
     {
       $this-routes[$name] = $route;
       $this-configureRoute($route);

       if ($this-options['logging'])
       {
         $this-dispatcher-notify(new sfEvent($this,
 'application.log', array(sprintf('Connect %s %s (%s)',
 get_class($route), $name, $route-getPattern();
       }
     }
   }

   static public function flattenRoutes($routes)
   {
     $flattenRoutes = array();
     foreach ($routes as $name = $route)
     {
       if ($route instanceof sfRouteCollection)
       {
         $flattenRoutes = array_merge($flattenRoutes,
 self::flattenRoutes($route));
       }
       else
       {
         if($route instanceof sfRoute)
         {
           $route = new myHostRoute($route);
         }
         $flattenRoutes[$name] = $route;
       }
     }

     return $flattenRoutes;
   }

 }

 On 17 fév, 09:21, Mathieu Tricoire mathieu.trico...@gmail.com wrote:



  Hi raphael,
  Yes it's for all routes, I just want define my own generator route
  class to add an option for generate url function to manage subdomain.
  For example I define my host in app.yml like that :www.domain.com
  And in my routing

  # If the current host is default host, generate relative url else an
  absolute url with the default host (if we no define absolute...)
  because no sub option defined
  # inwww.domain.comthisroute generate = /blog-list
  # in myblog.domain.com this route generate =http://www.domain.com/blog-list
  blog_list:
    url:   /blog-list
    param: { module: Blog, action: index }

  # Generate a relative url because sub option is true
  blog:
    url:     /blog
    param:   { module: Blog, action: show }
    options: { sub: true }

  thx for you reply, and sorry for my poor english ;-)

  On 17 fév, 00:03, Raphael Schumacher m...@raphaelschumacher.ch
  wrote:

   My apologies if I misunderstood your question, and perhaps you may
   elaborate a bit more on your specific situation. You want to replace
   sfRoute by your own class in general for all routes (unless explicitly
   specified in routing.yml)? What sort of routes have you then defined
   in routing.yml, e.g. sfDoctrineCollectionRoute/
   sfPropelCollectionRoute? (I guess you must still have some sort of
   route definitions in there, right?)

-- 
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] White screen only in production enviroment

2010-02-17 Thread Lee Bolding
http://www.symfony-project.org/plugins/sfErrorHandlerPlugin

On 17 Feb 2010, at 14:26, Eno wrote:

 On Wed, 17 Feb 2010, Trailfinder wrote:
 
 My dev enviroment works great. But when I deploy to my production
 enviroment, I get a white screen only. Strange thing is, my backend is
 working. My frontend only gives white screens.
 
 I can imagine there can be multiple places to look. But is there a way
 to test effectively where the problem is?
 
 
 Look at your web server error logs.
 
 
 
 -- 
 
 
 -- 
 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: sflive2010 Symfony Core Dev QA session

2010-02-17 Thread Ben Haines
Absolutely... as I get to upload them. Unfortunately power is scarce a
the conference and handbrake doesn't run that fast on my Mac ;)

I'll have uploaded them all by the end of the week.

On 17 Feb, 14:56, Dennis Benkert spinecras...@googlemail.com wrote:
 This is great, thanks very much for sharing this!

 Will you provide more of them in the days?

 - Dennis

 2010/2/17 Ben Haines ben.hai...@gmail.com:

  After Stefan Koopmanschap's talk about community on Saturday at
  sflive2010 I feel compelled to give something back ;)

  So here is the Symfony Core Dev Team in HD ;) Enjoy!

 http://www.vimeo.com/user1491208/videos

  Ben

  --
  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.



[symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Mikael
Hello,

I've installed the ahDoctrineEasyEmbeddedRelationsPlugin and set it up
to manage Eth records linked to Pc ones.

On the pc backend module, I've configured the form to only show some
widgets (because pc inherits from Obj which many useless fields in the
context of a pc).

This gives us this in generator.yml :

  form:
display: [id_type_obj, name, num_cmd, num_serie, date_liv,
date_ins, position, garantie, id_typeOrdi, id_site, id_modele,
puissance, thermique, bruit, microp, freq, mem, peripheriques_list,
users_list, new_Eth ]

Works well until I add Eth in order to see existing Eth records
linked to existing Pcs.

 - If the pc object already has an interface, it shows up
 - If not, I get an error 500 : Widget Eth does not exist.

Anyone an idea about how to deal with that ?

Regards,

Mikael

-- 
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] Why is not created the field id in the table?

2010-02-17 Thread Javier Garcia

Hi,

i have this schema below. My problem: the field id in the table 
amigo_usuario is not created .


Any idea?

Usuario:
  inheritance:
extends: sfGuardUser
type: simple
  columns:
nombre_apellidos: string(60)
sexo: boolean
fecha_nac: date
provincia: string(60)
localidad: string(255)
email_address: string(255)
fotografia: string(255)
avatar: string(255)
avatar_mensajes: string(255)
  relations:
Usuario:
  local: user1_id
  foreign: user2_id
  refClass: AmigoUsuario
  equal: true


AmigoUsuario:
  columns:
user1_id:
  type: integer(4)
  primary: true
user2_id:
  type: integer(4)
  primary: true
estado:
  type: integer
  default: 0
  relations:
User1:
  class: Usuario
  local: user1_id
  foreignAlias: AmigosUsuario
  onDelete: CASCADE
User2:
  class: Usuario
  local: user2_id
  foreignAlias: AmigosUsuario
  onDelete: CASCADE




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.



Re: [symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Daniel Lohse
Hey there,

there's only one way I can of, which you probably won't like. Just configure 
all the fields directly in the form. :)
So, delete the form: display: key and just create another form inheriting from 
the form you are probably already using elsewhere and use $this-useFields() 
before calling this embedRelations().

Does that help? By the way, you really shouldn't use the form: display: key as 
you are likely to get confused and forgot to update the generator.yml when new 
fields are added. This is also prevents a security hole.


Cheers, Daniel

On 17.02.2010, at 19:01, Mikael wrote:

 Hello,
 
 I've installed the ahDoctrineEasyEmbeddedRelationsPlugin and set it up
 to manage Eth records linked to Pc ones.
 
 On the pc backend module, I've configured the form to only show some
 widgets (because pc inherits from Obj which many useless fields in the
 context of a pc).
 
 This gives us this in generator.yml :
 
  form:
display: [id_type_obj, name, num_cmd, num_serie, date_liv,
 date_ins, position, garantie, id_typeOrdi, id_site, id_modele,
 puissance, thermique, bruit, microp, freq, mem, peripheriques_list,
 users_list, new_Eth ]
 
 Works well until I add Eth in order to see existing Eth records
 linked to existing Pcs.
 
 - If the pc object already has an interface, it shows up
 - If not, I get an error 500 : Widget Eth does not exist.
 
 Anyone an idea about how to deal with that ?
 
 Regards,
 
 Mikael
 
 -- 
 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] ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Stéphane
Hi,

In the BaseDoctrineForm, in the ::configure() method, I've coded something
like this:

$aConditions = array('ajax'=isAjax ? 'ajax:false, 'new'= isNew ? 'new':
false, 'embedded'=isEmbedded?'embedded':false, );
$method = sprintf('_computeFields%s%s%s', $aConds['ajax'], $aConds['new'],
$aConds['.)

and finally
try{
$this-useFields($this-$method());
}catch(Exception $e){}

So I can compute the correct method to call to configure the fields
according to the current situation.

In the embedRelations, you can give args to the newed form class, this is
where you'll give to it you are currently embedded and why not pass it the
current embedding form and other needed stuffs.

The main concern here is to make the form class able to determine by
itself how it should react to its external conditions, without having to
tell how it should act (what fields it should show, etc) everywhere in the
code. This make these available in some places (the
_configureFields%s%s%s..' methods). You can even go further by making an
order of precedence (like ysfDimensionPlugin does in someway).

So there is no more questions such as where is it said that this form show
these fields ?, it's all in these methods of the concerned form.

Hope this help,

Cheers,

Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Wed, Feb 17, 2010 at 8:12 PM, Daniel Lohse
annismcken...@googlemail.comwrote:

 Hey there,

 there's only one way I can of, which you probably won't like. Just
 configure all the fields directly in the form. :)
 So, delete the form: display: key and just create another form inheriting
 from the form you are probably already using elsewhere and use
 $this-useFields() before calling this embedRelations().

 Does that help? By the way, you really shouldn't use the form: display: key
 as you are likely to get confused and forgot to update the generator.yml
 when new fields are added. This is also prevents a security hole.


 Cheers, Daniel

 On 17.02.2010, at 19:01, Mikael wrote:

  Hello,
 
  I've installed the ahDoctrineEasyEmbeddedRelationsPlugin and set it up
  to manage Eth records linked to Pc ones.
 
  On the pc backend module, I've configured the form to only show some
  widgets (because pc inherits from Obj which many useless fields in the
  context of a pc).
 
  This gives us this in generator.yml :
 
   form:
 display: [id_type_obj, name, num_cmd, num_serie, date_liv,
  date_ins, position, garantie, id_typeOrdi, id_site, id_modele,
  puissance, thermique, bruit, microp, freq, mem, peripheriques_list,
  users_list, new_Eth ]
 
  Works well until I add Eth in order to see existing Eth records
  linked to existing Pcs.
 
  - If the pc object already has an interface, it shows up
  - If not, I get an error 500 : Widget Eth does not exist.
 
  Anyone an idea about how to deal with that ?
 
  Regards,
 
  Mikael
 
  --
  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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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] Is there anyway to go to the next element in a Doctrine collection?

2010-02-17 Thread Javier Garcia

Hi,

Im trying to show two elements of a Doctrine collection inside a div 
this way:


  foreach ($friends as $friend) { ?


div id=photo_friend
?php echo link_to(
image_tag( 
'/uploads/fotografias_miembros/'.$friend-getAvatar()),



'miembros/show?id='.$friend-getId()) ; ?

/div


div id=name_friend
?php echo $amigo-getName(); ?
/div


?php }   ?


So, is there any way to go to the next element (next row) in a Doctrine 
collection?


Regards

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.



Re: [symfony-users] Is there anyway to go to the next element in a Doctrine collection?

2010-02-17 Thread Stéphane
Hi,

next($my_collection); should work

Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia tirengar...@gmail.comwrote:

 Hi,

 Im trying to show two elements of a Doctrine collection inside a div this
 way:

  foreach ($friends as $friend) { ?


 div id=photo_friend
 ?php echo link_to(
image_tag(
 '/uploads/fotografias_miembros/'.$friend-getAvatar()),


  'miembros/show?id='.$friend-getId()) ; ?
 /div


 div id=name_friend
 ?php echo $amigo-getName(); ?
 /div


 ?php }   ?


 So, is there any way to go to the next element (next row) in a Doctrine
 collection?

 Regards

 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.comsymfony-users%2bunsubscr...@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] Is there anyway to go to the next element in a Doctrine collection?

2010-02-17 Thread Javier Garcia

I wrote this below inside the loop:

?php next($amigos_miembro) ?

But it doesn't work..

Javi

On 02/17/2010 08:57 PM, Stéphane wrote:

Hi,

next($my_collection); should work

Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia tirengar...@gmail.com 
mailto:tirengar...@gmail.com wrote:


Hi,

Im trying to show two elements of a Doctrine collection inside a
div this way:

 foreach ($friends as $friend) { ?


div id=photo_friend
?php echo link_to(
   image_tag(
'/uploads/fotografias_miembros/'.$friend-getAvatar()),

 
 'miembros/show?id='.$friend-getId()) ; ?

/div


div id=name_friend
?php echo $amigo-getName(); ?
/div


?php }   ?


So, is there any way to go to the next element (next row) in a
Doctrine collection?

Regards

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-users@googlegroups.com
mailto:symfony-users@googlegroups.com.
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@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.



Re: [symfony-users] Is there anyway to go to the next element in a Doctrine collection?

2010-02-17 Thread Stéphane
Why not foreach-ing ?
Please give us more of your template to understand what you want to do.


Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Wed, Feb 17, 2010 at 9:17 PM, Javier Garcia tirengar...@gmail.comwrote:

  I wrote this below inside the loop:

 ?php next($amigos_miembro) ?

 But it doesn't work..

 Javi


 On 02/17/2010 08:57 PM, Stéphane wrote:

 Hi,

 next($my_collection); should work

 Cheers,


 Before Printing, Think about Your Environmental Responsibility!
 Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


 On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia tirengar...@gmail.comwrote:

 Hi,

 Im trying to show two elements of a Doctrine collection inside a div
 this way:

  foreach ($friends as $friend) { ?


 div id=photo_friend
 ?php echo link_to(
image_tag(
 '/uploads/fotografias_miembros/'.$friend-getAvatar()),


  'miembros/show?id='.$friend-getId()) ; ?
 /div


 div id=name_friend
 ?php echo $amigo-getName(); ?
 /div


 ?php }   ?


 So, is there any way to go to the next element (next row) in a Doctrine
 collection?

 Regards

 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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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: ahDoctrineEasyEmbeddedRelationsPlugin : how to hide some form widgets

2010-02-17 Thread Mikael


On Feb 17, 2:34 pm, Stéphane stephane.er...@gmail.com wrote:
 Hi,

 In the BaseDoctrineForm, in the ::configure() method, I've coded something
 like this:

 $aConditions = array('ajax'=isAjax ? 'ajax:false, 'new'= isNew ? 'new':
 false, 'embedded'=isEmbedded?'embedded':false, );
 $method = sprintf('_computeFields%s%s%s', $aConds['ajax'], $aConds['new'],
 $aConds['.)

 and finally
 try{
 $this-useFields($this-$method());

 }catch(Exception $e){}

 So I can compute the correct method to call to configure the fields
 according to the current situation.

 In the embedRelations, you can give args to the newed form class, this is
 where you'll give to it you are currently embedded and why not pass it the
 current embedding form and other needed stuffs.

 The main concern here is to make the form class able to determine by
 itself how it should react to its external conditions, without having to
 tell how it should act (what fields it should show, etc) everywhere in the
 code. This make these available in some places (the
 _configureFields%s%s%s..' methods). You can even go further by making an
 order of precedence (like ysfDimensionPlugin does in someway).

 So there is no more questions such as where is it said that this form show
 these fields ?, it's all in these methods of the concerned form.

 Hope this help,

 Cheers,

 Before Printing, Think about Your Environmental Responsibility!
 Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!

 On Wed, Feb 17, 2010 at 8:12 PM, Daniel Lohse
 annismcken...@googlemail.comwrote:

  Hey there,

  there's only one way I can of, which you probably won't like. Just
  configure all the fields directly in the form. :)
  So, delete the form: display: key and just create another form inheriting
  from the form you are probably already using elsewhere and use
  $this-useFields() before calling this embedRelations().

  Does that help? By the way, you really shouldn't use the form: display: key
  as you are likely to get confused and forgot to update the generator.yml
  when new fields are added. This is also prevents a security hole.

I hope it will help but I must take some time to learn a bit more
about these things.
Anyway, thanks a lot !

Regards,
Mikael

-- 
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] signout credentials

2010-02-17 Thread ashton honnecke
You can't restrict access to login with is_secure or credentials
(http://www.symfony-project.org/reference/1_4/en/08-Security) because
it makes no sense to do so.  However you can do so to logout, which
IMO makes just as little sense.

Scenario:

backend/config/security.yml
--
default:
  is_secure: true
  credentials: admin
--

backend/modules/event/config/security.yml
--
all:
  is_secure: true
  credentials: moderator
--

Everything works just as I would expect; except that moderators cannot
reach the logout page.
(LOG: Action sfGuardAuth/signout requires credentials admin,
forwarding to sfGuardAuth/secure)

So I created:
backend/modules/sfGuardAuth/config/security.yml
--
all:
  is_secure: false
--

Which did nothing to allow moderators to get to the logout page
(LOG: Action sfGuardAuth/signout requires credentials admin,
forwarding to sfGuardAuth/secure)

I finally had to specifically allow moderator credentials:

backend/modules/sfGuardAuth/config/security.yml
--
all:
  is_secure: false
  credentials: moderator
--

Why A) would setting is_secure to false not allow access and B) would
logout behave differently than login?

This seems a bug to me.

-- 
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] Is there anyway to go to the next element in a Doctrine collection?

2010-02-17 Thread Javier Garcia

Maybe this time the image is attached correctly..:)..


On 02/17/2010 09:23 PM, Stéphane wrote:

Why not foreach-ing ?
Please give us more of your template to understand what you want to do.


Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Wed, Feb 17, 2010 at 9:17 PM, Javier Garcia tirengar...@gmail.com 
mailto:tirengar...@gmail.com wrote:


I wrote this below inside the loop:

?php next($amigos_miembro) ?

But it doesn't work..

Javi


On 02/17/2010 08:57 PM, Stéphane wrote:

Hi,

next($my_collection); should work

Cheers,


Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Wed, Feb 17, 2010 at 8:52 PM, Javier Garcia
tirengar...@gmail.com mailto:tirengar...@gmail.com wrote:

Hi,

Im trying to show two elements of a Doctrine collection
inside a div this way:

 foreach ($friends as $friend) { ?


div id=photo_friend
?php echo link_to(
   image_tag(
'/uploads/fotografias_miembros/'.$friend-getAvatar()),

 
 'miembros/show?id='.$friend-getId()) ; ?

/div


div id=name_friend
?php echo $amigo-getName(); ?
/div


?php }   ?


So, is there any way to go to the next element (next row) in
a Doctrine collection?

Regards

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-users@googlegroups.com
mailto:symfony-users@googlegroups.com.
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@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-users@googlegroups.com
mailto:symfony-users@googlegroups.com.
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto: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-users@googlegroups.com
mailto:symfony-users@googlegroups.com.
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@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.

attachment: grid.jpg

[symfony-users] Id being lost on update..

2010-02-17 Thread Samuel Morhaim
I am getting an error when doing a simple edit/update ... the ID of
the item is being lost.

This is the DB log... maybe somebody can help ?


#

SELECT c.id AS c__id, c.organization_id AS c__organization_id, c.name
AS c__name, c.description AS c__description, c.is_active AS
c__is_active FROM campaign c WHERE (c.id = '2') LIMIT 1
0.00s, doctrine connection Toggle debug stack
#23 » in sfDoctrineConnectionProfiler-preStmtExecute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/EventListener/Chain.php
line 494
#22 » in Doctrine_EventListener_Chain-preStmtExecute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Statement.php
line 231
#21 » in Doctrine_Connection_Statement-execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php
line 1006
#20 » in Doctrine_Connection-execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
line 976
#19 » in Doctrine_Query_Abstract-_execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
line 1026
#18 » in Doctrine_Query_Abstract-execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php
line 281
#17 » in Doctrine_Query-fetchOne() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php
line 1611
#16 » in Doctrine_Table-find() from
SF_ROOT_DIR/apps/backend/modules/campaign/actions/actions.class.php
line 53
#15 » in campaignActions-executeUpdate() from
SF_SYMFONY_LIB_DIR/action/sfActions.class.php line 60
#14 » in sfActions-execute() from
SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 92
#13 » in sfExecutionFilter-executeAction() from
SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 78
#12 » in sfExecutionFilter-handleAction() from
SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 42
#11 » in sfExecutionFilter-execute() from
SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
#10 » in sfFilterChain-execute() from
SF_SYMFONY_LIB_DIR/filter/sfBasicSecurityFilter.class.php line 72
#9 » in sfBasicSecurityFilter-execute() from
SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
#8 » in sfFilterChain-execute() from
SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/sfGuardRememberMeFilter.class.php
line 56
#7 » in sfGuardRememberMeFilter-execute() from
SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
#6 » in sfFilterChain-execute() from
SF_SYMFONY_LIB_DIR/filter/sfRenderingFilter.class.php line 33
#5 » in sfRenderingFilter-execute() from
SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
#4 » in sfFilterChain-execute() from
SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 229
#3 » in sfController-forward() from
SF_SYMFONY_LIB_DIR/controller/sfFrontWebController.class.php line 48
#2 » in sfFrontWebController-dispatch() from
SF_SYMFONY_LIB_DIR/util/sfContext.class.php line 170
#1 » in sfContext-dispatch() from SF_ROOT_DIR/web/backend_dev.php line 13
#

SELECT c.id AS c__id, c.organization_id AS c__organization_id, c.name
AS c__name, c.description AS c__description, c.is_active AS
c__is_active FROM campaign c WHERE (c.id = '')
0.00s, doctrine connection Toggle debug stack
#31 » in sfDoctrineConnectionProfiler-preStmtExecute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/EventListener/Chain.php
line 494
#30 » in Doctrine_EventListener_Chain-preStmtExecute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Statement.php
line 231
#29 » in Doctrine_Connection_Statement-execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php
line 1006
#28 » in Doctrine_Connection-execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
line 976
#27 » in Doctrine_Query_Abstract-_execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
line 1026
#26 » in Doctrine_Query_Abstract-execute() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php
line 281
#25 » in Doctrine_Query-fetchOne() from
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/validator/sfValidatorDoctrineUnique.class.php
line 99
#24 » in sfValidatorDoctrineUnique-doClean() from
SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 90
#23 » in sfValidatorSchema-clean() from
SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 246
#22 » in sfValidatorSchema-postClean() from
SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 186
#21 » in sfValidatorSchema-doClean() from
SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 90
#20 » in sfValidatorSchema-clean() from
SF_SYMFONY_LIB_DIR/form/sfForm.class.php line 247
#19 » in sfForm-doBind() from
SF_SYMFONY_LIB_DIR/form/addon/sfFormSymfony.class.php line 75
#18 » in 

[symfony-users] Re: Id being lost on update..

2010-02-17 Thread Samuel Morhaim
If it helps.. this is the error, of course because it lost the id..

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'0' for key 1
stack trace

* at ()
  in 
SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php
line 1082 ...
1079. $message .= sprintf('. Failing Query:
%s', $query);





On Wed, Feb 17, 2010 at 5:20 PM, Samuel Morhaim
samuel.morh...@gmail.com wrote:
 I am getting an error when doing a simple edit/update ... the ID of
 the item is being lost.

 This is the DB log... maybe somebody can help ?


 #

 SELECT c.id AS c__id, c.organization_id AS c__organization_id, c.name
 AS c__name, c.description AS c__description, c.is_active AS
 c__is_active FROM campaign c WHERE (c.id = '2') LIMIT 1
 0.00s, doctrine connection Toggle debug stack
 #23 » in sfDoctrineConnectionProfiler-preStmtExecute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/EventListener/Chain.php
 line 494
 #22 » in Doctrine_EventListener_Chain-preStmtExecute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Statement.php
 line 231
 #21 » in Doctrine_Connection_Statement-execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php
 line 1006
 #20 » in Doctrine_Connection-execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
 line 976
 #19 » in Doctrine_Query_Abstract-_execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
 line 1026
 #18 » in Doctrine_Query_Abstract-execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php
 line 281
 #17 » in Doctrine_Query-fetchOne() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php
 line 1611
 #16 » in Doctrine_Table-find() from
 SF_ROOT_DIR/apps/backend/modules/campaign/actions/actions.class.php
 line 53
 #15 » in campaignActions-executeUpdate() from
 SF_SYMFONY_LIB_DIR/action/sfActions.class.php line 60
 #14 » in sfActions-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 92
 #13 » in sfExecutionFilter-executeAction() from
 SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 78
 #12 » in sfExecutionFilter-handleAction() from
 SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 42
 #11 » in sfExecutionFilter-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
 #10 » in sfFilterChain-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfBasicSecurityFilter.class.php line 72
 #9 » in sfBasicSecurityFilter-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
 #8 » in sfFilterChain-execute() from
 SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/sfGuardRememberMeFilter.class.php
 line 56
 #7 » in sfGuardRememberMeFilter-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
 #6 » in sfFilterChain-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfRenderingFilter.class.php line 33
 #5 » in sfRenderingFilter-execute() from
 SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 53
 #4 » in sfFilterChain-execute() from
 SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 229
 #3 » in sfController-forward() from
 SF_SYMFONY_LIB_DIR/controller/sfFrontWebController.class.php line 48
 #2 » in sfFrontWebController-dispatch() from
 SF_SYMFONY_LIB_DIR/util/sfContext.class.php line 170
 #1 » in sfContext-dispatch() from SF_ROOT_DIR/web/backend_dev.php line 13
 #

 SELECT c.id AS c__id, c.organization_id AS c__organization_id, c.name
 AS c__name, c.description AS c__description, c.is_active AS
 c__is_active FROM campaign c WHERE (c.id = '')
 0.00s, doctrine connection Toggle debug stack
 #31 » in sfDoctrineConnectionProfiler-preStmtExecute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/EventListener/Chain.php
 line 494
 #30 » in Doctrine_EventListener_Chain-preStmtExecute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection/Statement.php
 line 231
 #29 » in Doctrine_Connection_Statement-execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php
 line 1006
 #28 » in Doctrine_Connection-execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
 line 976
 #27 » in Doctrine_Query_Abstract-_execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
 line 1026
 #26 » in Doctrine_Query_Abstract-execute() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php
 line 281
 #25 » in Doctrine_Query-fetchOne() from
 SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/validator/sfValidatorDoctrineUnique.class.php
 line 99
 #24 » in sfValidatorDoctrineUnique-doClean() from
 

[symfony-users] Re: Why this don't take the real ID values from DB?

2010-02-17 Thread Tom Ptacnik
Or ... http://www.symfony-project.org/api/1_3/sfWidgetFormDoctrineChoice

your can specify your key_method


On 16 ún, 16:38, ReynierPM rper...@uci.cu wrote:
 On 2/16/2010 10:12 AM, Tom Ptacnik wrote:

  Is  ID set as primary key in the TEspecialidad table?

 I found the problem, the PK is compound by 3 fields and Doctrine have
 problems with this (as far as I know). The solution: leave the PK with
 just one field.

 --
 Cheers
 ReynierPM

-- 
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] Certification programme

2010-02-17 Thread Apul Gupta
Hi,

Is there any certification program for symfony?

Thanks
Apul Gupta

-- 
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: How can I configure a route for a module using a 2-columns key ?

2010-02-17 Thread Tom Ptacnik
I think NOOVEO  must hit the reply button on your question, then
change subject and ask his question...?


On 16 ún, 20:14, Javier Garcia tirengar...@gmail.com wrote:
 Anyone knows why the subject of the thread change?

 Javi

 On Feb 16, 5:56 pm, NOOVEO - Christophe Brun c.b...@nooveo.fr
 wrote:



  Basically, the related table is an association table :
  VitrineLivre:
    actAs: { Timestampable: ~ }
    columns:
      vitrine_paragraphe_id: { type: integer(4), primary: true }
      livre_id: { type: integer(4), primary: true }
    relations:
      Livre:
        type: one
        local: livre_id
        foreign: id
      VitrineParagraphe:
        type: one
        local: vitrine_paragraphe_id
        foreign: id

  I doctrine:admin-generate-d the module. I insert one object in my
  database (the 'new' form works).
  Now, if I want to display the list, Symfony throws an Internal Server
  Error (500) :
  The /vitrinelivre/:Array/edit.:sf_format route has some missing
  mandatory parameters (:Array).

  The generated route is :
  vitrine_livre:
    class: sfDoctrineRouteCollection
    options:
      model:                VitrineLivre
      module:               vitrinelivre
      prefix_path:          /vitrinelivre
      column:               Array
      with_wildcard_routes: true

  The 'column' field must point to a unique column, and that's of course
  innapropriate in this case. What should I do to get it work ?

-- 
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: How can I configure a route for a module using a 2-columns key ?

2010-02-17 Thread Tom Ptacnik
Look there ... the last comment.

http://tohenk.wordpress.com/2009/04/22/using-multiple-primary-keys-in-admin-generator/


On 16 ún, 17:56, NOOVEO - Christophe Brun c.b...@nooveo.fr wrote:
 Basically, the related table is an association table :
 VitrineLivre:
   actAs: { Timestampable: ~ }
   columns:
     vitrine_paragraphe_id: { type: integer(4), primary: true }
     livre_id: { type: integer(4), primary: true }
   relations:
     Livre:
       type: one
       local: livre_id
       foreign: id
     VitrineParagraphe:
       type: one
       local: vitrine_paragraphe_id
       foreign: id

 I doctrine:admin-generate-d the module. I insert one object in my
 database (the 'new' form works).
 Now, if I want to display the list, Symfony throws an Internal Server
 Error (500) :
 The /vitrinelivre/:Array/edit.:sf_format route has some missing
 mandatory parameters (:Array).

 The generated route is :
 vitrine_livre:
   class: sfDoctrineRouteCollection
   options:
     model:                VitrineLivre
     module:               vitrinelivre
     prefix_path:          /vitrinelivre
     column:               Array
     with_wildcard_routes: true

 The 'column' field must point to a unique column, and that's of course
 innapropriate in this case. What should I do to get it work ?

-- 
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 frontend sort by th

2010-02-17 Thread Tom Ptacnik
If you want a native method you can look into generated backend
actions and templates and replicate this in your frontend.


On 16 ún, 19:05, ziclo lauren...@gmail.com wrote:
 Is there a native (doctrine or symfony) method ?

 Thanks

 On 14 fév, 14:52, Daniel Lohse annismcken...@googlemail.com wrote:



  You should take a look at the internal Sympal plugin 
  sfSympalDataGridPlugin. This will do what you want and there's also some 
  documentation about it on the Sympal homepage 
  here:http://www.sympalphp.org/documentation/1_0/book/data-grid/en.

  Jon recently committed some changes that should make it independent of 
  Sympal. I know it works without it because I've used it just recently on a 
  non-Sympal project.

  I also have some gems hidden inside that project's sfSympalDataGridPlugin 
  fork that should find their way into the Sympal repository soon-ish but 
  they don't have unit tests right now. :)

  Regards, Daniel

  On 14.02.2010, at 14:46, Dimitar wrote:

   I am looking for the same thing, with Doctrine and SF 1.4 If anyone
   can help I am very interested too.

   --
   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.