[symfony-users] Re: Unknown record property in more than one m-n relationships

2010-08-18 Thread Kostas
I did another test. The problem does not have to do with the
sfDoctrineGuardPlugin.
It has to do with the fact that there are more than one m-n
relationships with the same table (sfGuardUser). Tried it with a
custom table as well (not the sfGuardUser) and gives the same error.

Any thoughts?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: IS there any manual to correct unit test system for integrating with sfGuard auth symfony?

2010-08-18 Thread Maxim Oleinik
protected function authenticateUser(sfGuardUser $user)
{
// Init session
$context = $this->browser->getContext(true);

$context->getUser()->signIn($user);
$context->getUser()->shutdown();
$context->getStorage()->shutdown();
}

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: too many queries with embedded forms

2010-08-18 Thread Richtermeister
I've come across this as well, and the reason is that many of the
choice widgets fire off a query to populate themselves. if you have 4
relationships per object that gives you 4 queries, and by embedding
that many times, it multiplies quickly.
I don't think there's anything you can do about this other than
implement some kind of widget-level caching.

Daniel


On Aug 18, 4:07 pm, Daniel Lohse  wrote:
> Mhm, that sure sounds like a lot. :( In the example I've given in the README 
> I only have one additional query per embedded relation so something must be 
> going wrong.
>
> Can you post the content's of your CanardCategorie form's configure() method 
> please? And a couple of screenshots showing the admin interface (so I can see 
> the embedded forms and what they contain) and the "SQL queries" web debug bar 
> opened would be great! (you can also zip them up and send them to my Google 
> email address (annismcken...@gmail.com) directly so we don't burden the group 
> with this)
>
> Cheers, Daniel
>
> On 18.08.2010, at 16:39, spike3111 wrote:
>
> > Hello,
>
> > I use the plugi ahDoctrineEasyEmbeddedRelationsPlugin to embed forms.
> > My schema is basic, I have a pet that may have a type of crying, a
> > type of displacement, a place to live and belong to a group. So a four
> > relationships one to many.
>
> > I wanted my embed forms of animals in the middle of life. So I get the
> > opportunity to modify or remove an animal. But for 13 animals nested,
> > I get 60 requests!
> > Hey, it's a bit much ... How can we reduce this number? I searched
> > everywhere, but I can not find answers.
>
> > CanardCategorie:
> >  columns:
> >    vol_id:     { type: integer, notnull: true }
> >    cancan_id:  { type: integer, notnull: true }
> >    mare_id:    { type: integer, notnull: true }
> >    groupe_id:  { type: integer, notnull: false }
> >    intitule: { type: string(255), notnull: true, unique: true }
> >    description: { type: string(255), notnull: false }
> >    photo:       { type: string(255), notnull false }
> >  relations:
> >    CanardVol: { onDelete: CASCADE, local: vol_id, foreign: id,
> > foreignAlias: CanardVols }
> >    CanardCancan: { onDelete: CASCADE, local: cancan_id, foreign: id,
> > foreignAlias: CancardCancans }
> >    CanardMare:   { local: mare_id, foreign: id, foreignAlias:
> > CanardMaresA, alias: CanardMare, foreignType: many }
> >    CanardGroupe: { local: groupe_id, foreign: id, foreignAlias:
> > CanardGroupe }
>
> > CanardVol:
> >  columns:
> >    intitule: { type: string(255), notnull: true, unique: true }
>
> > CanardCancan:
> >  columns:
> >    intitule: { type: string(255), notnull: true, unique: true }
>
> > CanardMare:
> >  columns:
> >    intitule:    { type: string(255), notnull: true }
> >    temperature: { type: integer, notnull: true }
>
> > CanardGroupe:
> >  columns:
> >    intitule:      { type: string(255), notnull: true }
>
> > Thank you !
>
> > (I'm French, , Can be had noticed it !)
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to remove the TH elements in embedded forms in admin generator

2010-08-18 Thread Christian Fazzini
Yea but admin gen view is a mess. Isn't there a way to do this
directly in the form class? i.e. in the configure() method?

On Aug 19, 2:10 am, Gustavo Adrian 
wrote:
> Overriding the view for that special case? or creating your own collection
> form, assigning a friendly name instead of the numeric ones. Or you could
> simply use jQuery or css, as you said.
>
> On Wed, Aug 18, 2010 at 1:47 PM, Christian Fazzini <
>
> christian.fazz...@gmail.com> wrote:
> > At the following screenshot:http://imagebin.org/110208how do I
> > remove the  elements. i.e. the ones with "0,1,2"? I know I can
> > make css hide this. But I'd like to know a cleaner way of doing this?
>
> > Been struggling with this to no avail.
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] too many queries with embedded forms

2010-08-18 Thread Daniel Lohse
Mhm, that sure sounds like a lot. :( In the example I've given in the README I 
only have one additional query per embedded relation so something must be going 
wrong.

Can you post the content's of your CanardCategorie form's configure() method 
please? And a couple of screenshots showing the admin interface (so I can see 
the embedded forms and what they contain) and the "SQL queries" web debug bar 
opened would be great! (you can also zip them up and send them to my Google 
email address (annismcken...@gmail.com) directly so we don't burden the group 
with this)


Cheers, Daniel

On 18.08.2010, at 16:39, spike3111 wrote:

> Hello,
> 
> I use the plugi ahDoctrineEasyEmbeddedRelationsPlugin to embed forms.
> My schema is basic, I have a pet that may have a type of crying, a
> type of displacement, a place to live and belong to a group. So a four
> relationships one to many.
> 
> I wanted my embed forms of animals in the middle of life. So I get the
> opportunity to modify or remove an animal. But for 13 animals nested,
> I get 60 requests!
> Hey, it's a bit much ... How can we reduce this number? I searched
> everywhere, but I can not find answers.
> 
> CanardCategorie:
>  columns:
>vol_id: { type: integer, notnull: true }
>cancan_id:  { type: integer, notnull: true }
>mare_id:{ type: integer, notnull: true }
>groupe_id:  { type: integer, notnull: false }
>intitule: { type: string(255), notnull: true, unique: true }
>description: { type: string(255), notnull: false }
>photo:   { type: string(255), notnull false }
>  relations:
>CanardVol: { onDelete: CASCADE, local: vol_id, foreign: id,
> foreignAlias: CanardVols }
>CanardCancan: { onDelete: CASCADE, local: cancan_id, foreign: id,
> foreignAlias: CancardCancans }
>CanardMare:   { local: mare_id, foreign: id, foreignAlias:
> CanardMaresA, alias: CanardMare, foreignType: many }
>CanardGroupe: { local: groupe_id, foreign: id, foreignAlias:
> CanardGroupe }
> 
> CanardVol:
>  columns:
>intitule: { type: string(255), notnull: true, unique: true }
> 
> CanardCancan:
>  columns:
>intitule: { type: string(255), notnull: true, unique: true }
> 
> CanardMare:
>  columns:
>intitule:{ type: string(255), notnull: true }
>temperature: { type: integer, notnull: true }
> 
> CanardGroupe:
>  columns:
>intitule:  { type: string(255), notnull: true }
> 
> Thank you !
> 
> (I'm French, , Can be had noticed it !)
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : Unexpected extra form field named "Interests" error

2010-08-18 Thread Daniel Lohse
Hmm, this is a deeply nested embedded relation – am I right, that you're really 
not editing the profile but the user – which embeds the profile which embeds 
the interests? You could try to check out the trunk in the Subversion 
repository because nested embedded relations were added recently by a 
contributor. Just delete your plugin (how did you install it?) and either do 
"svn export 
http://svn.symfony-project.com/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/trunk
 plugins/ahDoctrineEasyEmbeddedRelationsPlugin" from the project root or add it 
as an external definition.

I'm the creator of this plugin and have recently gotten some really quality 
contributions – and I know it works because I'm using it in multiple projects. 
Maybe post the content of your form's configure() method? Anything that will 
help to identify the issue. If you have more questions, please ask. :)


Cheers, Daniel

On 18.08.2010, at 17:57, Rudth-Mael Galite wrote:

> Hello everyone.
> 
> I am trying to manage a user's profile which has interests.
> Here is the database structure :
> 
> Profile:
>  actAs: { Timestampable: ~ }
>  tableName: user_profile
>  columns:
>   ...
>  relations:
>Interests:
>  class: Interest
>  local: id
>  foreign: user_profile_id
>  type: many
> 
> Interest:
>  actAs: { Timestampable: ~ }
>  columns:
>title: { type: string(255), notnull: true }
>user_profile_id: { type: integer, notnull: false }
> 
> I followed this post : 
> http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/
> and also tried to use the ahDoctrineEasyEmbeddedRelationsPlugin but
> failed every time.
> 
> When submitting the form, I get this error : 'Unexpected extra form
> field named "Interests"'.
> Can you help me please ?
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] sfGuardAuth: where is the page after login defined?

2010-08-18 Thread Peter Peltonen
A simple question:

I'm new to sfGuardAuth. I have "inherited"  a symfony 1.2 application
which redirects the user to /profile module after login.

I would need to change this to the /mypage module but I cannot find
where this page where user is redirected after signing in is defined?

Best,
Peter

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Two caches, two cache manager ?

2010-08-18 Thread Antoine S.
Hi

Does anyone have an experience to have two different cache on a same
application ?

Maybe one cache manager able to store in two different cache
(sfCache) ?
or two cache manager ?


I am trying to have a normal cache by default, and a second cache when
the client has javascript activated. (in this case I can use the
with_layout more often)


Thank you


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Unknown record property in more than one m-n relationships

2010-08-18 Thread Kostas
Hi,

Iv been having a problem that bothers me for the last couple of
weeks.
My schema.yml file contains the following amongst others:

Book:
  actAs:
Timestampable: ~
I18n:
  fields: [name, subtitle, schema, color, description]
  columns:
name: { type: string(255), notnull: true }
subtitle: { type: string(255), notnull: true }

...

is_new: {type: boolean, notnull:true, default: false}
  relations:
Category: { class: BookCategory, onDelete: CASCADE, local:
category_id, foreign: id, foreignAlias: Books }
Authors:
  foreignAlias: Books
  class: sfGuardUser
  refClass: BookAuthor
Translators:
  foreignAlias: Books
  class: sfGuardUser
  refClass: BookTranslator
  local: book_id
  foreign: translator_id
Curators:
  foreignAlias: Books
  class: sfGuardUser
  refClass: BookCurator
  local: book_id
  foreign: curator_id
BookAuthor:
  columns:
sf_guard_user_id: {type: integer, primary: true}
book_id: { type: integer, primary: true }
  relations:
Book:
  foreignAlias: BookAuthors
  onUpdate: CASCADE
  onDelete: CASCADE
Author:
  class: sfGuardUser
  local: sf_guard_user_id
  foreignAlias: AuthorBooks
  onUpdate: CASCADE
  onDelete: CASCADE
BookTranslator:
  columns:
translator_id: { type: integer, primary: true }
book_id: { type: integer, primary: true }
  relations:
Book:
  foreignAlias: BookTranslators
  onUpdate: CASCADE
  onDelete: CASCADE
Translator:
  class: sfGuardUser
  local: translator_id
  foreignAlias: TranslatorBooks
  onUpdate: CASCADE
  onDelete: CASCADE
BookCurator:
  columns:
curator_id: { type: integer, primary: true }
book_id: { type: integer, primary: true }
  relations:
Book:
  foreignAlias: BookCurators
  onUpdate: CASCADE
  onDelete: CASCADE
Curator:
  class: sfGuardUser
  local: curator_id
  foreignAlias: CuratorBooks
  onUpdate: CASCADE
  onDelete: CASCADE

To sum it up there is the book table that has an m-n relationship
with
each of the other 3 tables (Author, Translator, Curator).
When I use only one of these tables (any of the 3) and comment out
the
other two along with their relationships with the Book table,
everything works fine. When I use any 2 of them or all 3, after a row
is succesfully inserted into the DB via symfony's backend, it breaks
in the edit book page and throws the following error:
Unknown record property / related component "Translators" on "Book"
Notice that just using the Translator and Book tables and their m-n
relationship works fine as I said. But it brakes when I introduce one
more table.
Im using the latest version of the sfDoctrineGuardPlugin.

Thanks in advance.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] How to remove the TH elements in embedded forms in admin generator

2010-08-18 Thread Gustavo Adrian
Overriding the view for that special case? or creating your own collection
form, assigning a friendly name instead of the numeric ones. Or you could
simply use jQuery or css, as you said.

On Wed, Aug 18, 2010 at 1:47 PM, Christian Fazzini <
christian.fazz...@gmail.com> wrote:

> At the following screenshot: http://imagebin.org/110208 how do I
> remove the  elements. i.e. the ones with "0,1,2"? I know I can
> make css hide this. But I'd like to know a cleaner way of doing this?
>
> Been struggling with this to no avail.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] How to remove the TH elements in embedded forms in admin generator

2010-08-18 Thread Christian Fazzini
At the following screenshot: http://imagebin.org/110208 how do I
remove the  elements. i.e. the ones with "0,1,2"? I know I can
make css hide this. But I'd like to know a cleaner way of doing this?

Been struggling with this to no avail.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Problem with showing the atom

2010-08-18 Thread Barry
Hi! I am doing the Jobeet classes usingf Symfony 1.4 with Doctrine and
now I am on Day 14 trying to make work the Feeds:
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/14
But I have a problem: when I go to a feed link that should interprete
the indexSuccess.atom.php, it doesn´t work. I´ve already change the
first line like this: '; ?> because I have the problem of the short quotes disabled.
I think the problem maybe is in the routing.yml or some Symfony
interpretation that I maybe don´t know. My job key in the routing is:

job:
  class:   sfDoctrineRouteCollection
  options: { model: JobeetJob }

and when I debug with Firebug in Mozilla I have this error:

Failed to load source for: http://.../jobeet/web/frontend_dev.php/job.atom

I didn´t configure a virtual host, that´s why I access to the web
directory directly.
I appreciate any help. I am breaking my head trying to know what the
error will be.
Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Overriding files from a plugin within another plugin

2010-08-18 Thread Richtermeister
Yes, and yes. :)

On Aug 17, 12:11 pm, "Daniel Kucharski"  wrote:
> Hi,
>
> Is it possible to create a plugin which overrides various settings / classes
> from other symfony plugins (routing, schema, model classes)?
>
> If so, does the order how plugins are loaded (in the project configuration)
> matter?
>
> Kind regards,
>
> Daniel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] ahDoctrineEasyEmbeddedRelationsPlugin : Unexpected extra form field named "Interests" error

2010-08-18 Thread Rudth-Mael Galite
Hello everyone.

I am trying to manage a user's profile which has interests.
Here is the database structure :

Profile:
  actAs: { Timestampable: ~ }
  tableName: user_profile
  columns:
   ...
  relations:
Interests:
  class: Interest
  local: id
  foreign: user_profile_id
  type: many

Interest:
  actAs: { Timestampable: ~ }
  columns:
title: { type: string(255), notnull: true }
user_profile_id: { type: integer, notnull: false }

I followed this post : 
http://tech.cibul.org/embedded-forms-with-symfony-1-4-and-jquery/
and also tried to use the ahDoctrineEasyEmbeddedRelationsPlugin but
failed every time.

When submitting the form, I get this error : 'Unexpected extra form
field named "Interests"'.
Can you help me please ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [SOLVED] Re: Doctrine tutorial, Day 12 - Cannot see is_activated and expires_at in Admin section of the Job Form page.

2010-08-18 Thread Salsero
> BUT: the fileds do not show up yet.
> I also launched
> symfony cache:clear
>
> but maybe it is not the right clearing cache command. :-(


Sorry
I forgot to remove the "unset" command in the parent::config() method.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doctrine tutorial, Day 12 - Cannot see is_activated and expires_at in Admin section of the Job Form page.

2010-08-18 Thread Salsero
> Are they disabled somewhere? Do some configuration override the
> generator.yml?

I refactor this question :-D

I can answer myself.. I created the BackendJobeetJobForm...

BUT: the fileds do not show up yet.
I also launched
symfony cache:clear

but maybe it is not the right clearing cache command. :-(

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Doctrine tutorial, Day 12 - Cannot see is_activated and expires_at in Admin section of the Job Form page.

2010-08-18 Thread Salsero
Hello

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

The tutorial says I can split fields in two sections

  form:
display:
  Content: [category_id, type, company, logo, url, position,
location, description, how_to_apply, is_public, email]
  Admin:   [_generated_token, is_activated, expires_at]


But I only see "_generated_token" in the web page displayed.
No "is_activated" and no "expires_at"

Are they disabled somewhere? Do some configuration override the
generator.yml?


Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] How to: You can also delegate the rendering to a component by prefixing the field name by a tilde (~)

2010-08-18 Thread Salsero
Hello,
I am at day 12 of Doctrine Jobeet tutorial..


I've seen the note:
"You can also delegate the rendering to a component by prefixing the
field name by a tilde (~)."

But I cannot understand it.
When exactly could I prefix the tilde? in the generator.xml?


My knowledge is at "foggy" level ...

Can someone give me an example to explain that sentence?


Thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfWidgetFormDate datepicker range problem

2010-08-18 Thread Massimiliano Arione
On 17 Ago, 13:50, wueb  wrote:
> I'm using sfWidgetFormDate with a datepicker (http://
> garakkio.altervista.org/datepicker/)
>
> The code in the form is:
>
> $years = range(date("Y"),1980);
> $this->widgetSchema['date_const'] = new sfWidgetFormDate(array('years'
> => array_combine($years, $years),'format' => '%day% - %month% - %year
> %'));
>
> My problem is when i open the datepicker the default date  selected on
> the datepicker is always on the lowest. In this case the datepicker
> will be opened on the year of 1980, while i want it in 2010.
>
> Anyone knows how can i change this?
>
> Cheers.
>
> (PS: even if i change the positions, range(1980,date("Y")); the lower
> year come always first)

I'm the author (garakkio).
I advice you to use instead http://garakkio.altervista.org/datepickerui/
, that is more advanced, and automatically set the date to current
one, if date is empty.
Otherwise, you have to set the default date to the current one on
yourself.
The behaviour of calendar is to show the selected date when datepicker
is opened.

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] too many queries with embedded forms

2010-08-18 Thread spike3111
Hello,

I use the plugi ahDoctrineEasyEmbeddedRelationsPlugin to embed forms.
My schema is basic, I have a pet that may have a type of crying, a
type of displacement, a place to live and belong to a group. So a four
relationships one to many.

I wanted my embed forms of animals in the middle of life. So I get the
opportunity to modify or remove an animal. But for 13 animals nested,
I get 60 requests!
Hey, it's a bit much ... How can we reduce this number? I searched
everywhere, but I can not find answers.

CanardCategorie:
  columns:
vol_id: { type: integer, notnull: true }
cancan_id:  { type: integer, notnull: true }
mare_id:{ type: integer, notnull: true }
groupe_id:  { type: integer, notnull: false }
intitule: { type: string(255), notnull: true, unique: true }
description: { type: string(255), notnull: false }
photo:   { type: string(255), notnull false }
  relations:
CanardVol: { onDelete: CASCADE, local: vol_id, foreign: id,
foreignAlias: CanardVols }
CanardCancan: { onDelete: CASCADE, local: cancan_id, foreign: id,
foreignAlias: CancardCancans }
CanardMare:   { local: mare_id, foreign: id, foreignAlias:
CanardMaresA, alias: CanardMare, foreignType: many }
CanardGroupe: { local: groupe_id, foreign: id, foreignAlias:
CanardGroupe }

CanardVol:
  columns:
intitule: { type: string(255), notnull: true, unique: true }

CanardCancan:
  columns:
intitule: { type: string(255), notnull: true, unique: true }

CanardMare:
  columns:
intitule:{ type: string(255), notnull: true }
temperature: { type: integer, notnull: true }

CanardGroupe:
  columns:
intitule:  { type: string(255), notnull: true }

Thank you !

(I'm French, , Can be had noticed it !)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Country City problem

2010-08-18 Thread Andro Fumero
That was quick adriane. It helps me a lot.

Thanks





From: Gustavo Adrian 
To: symfony-users@googlegroups.com
Sent: Wed, August 18, 2010 8:39:16 AM
Subject: Re: [symfony-users] Country City problem

This could help:

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




On Wed, Aug 18, 2010 at 7:18 AM, Andro Fumero  wrote:

Good day,
>
>Does any one tried to make a drop down Countries, and when its clicked, it 
>will 
>display the list of cities based on the selected Country.
>
>I have read about steps in how to do this, but doesnt have a sample code. 
>I dont know where to start about this one coz im still new. I dont even know 
>where to put the onchange event in the drop down from 
>sfwidgetformdoctrinechoice.
>
>Any link, samples, tutorials would be great.
>
>Thanks
>
>-- 
>If you want to report a vulnerability issue on symfony, please send it to 
>security at symfony-project.com
> 
>You received this message because you are subscribed to the Google
>Groups "symfony users" group.
>To post to this group, send email to symfony-users@googlegroups.com
>To unsubscribe from this group, send email to
>symfony-users+unsubscr...@googlegroups.com
>For more options, visit this group at
>http://groups.google.com/group/symfony-users?hl=en
>
-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com
 
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-18 Thread Stéphane
Done : http://trac.apostrophenow.org/ticket/533


Cheers,

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


On Wed, Aug 18, 2010 at 3:24 PM, Tom Boutell  wrote:

> A specific task would be convenient for those who consider 'symfony
> cc' too heavy, and I could still invoke it automatically from a
> 'symfony cc' hook. Would you mind opening a ticket on
> trac.apostrophenow.org to remind me to look at this?
>
> On Aug 17, 9:54 am, Stéphane  wrote:
> > +1 for the specific task !
> >
> > Before Printing, Think about Your Environmental Responsibility!
> > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> >
> > On Tue, Aug 17, 2010 at 3:52 PM, Daniel Lohse
> > wrote:
> >
> > > Mhm, I somehow I knew that this would have been t easy. (:
> >
> > > But okay, so we do need to cache these relations array(bundle =>
> > > sha1sum.ccsgz) somewhere it gets loaded on every request and I'd guess
> the
> > > app.yml.php file is a good place. Still, using this approach does not
> > > necessitate – or even need for that matter – manual cache invalidation
> > > because we could send the far future Expires header everytime. If files
> in
> > > that bundle change, clear the files (not necessarily with a brute-force
> > > symfony cc) and they are rebuilt on the next page refresh. Maybe we
> could
> > > provide a apostrophe:clear-minified-resources [--js] [--css] [--all]
> > > [--env="dev|prod|staging"] task so as to not need the brute-force
> symfony cc
> > > or go hunting for these minified files manually?
> >
> > > Cheers, Daniel
> >
> > > On 17.08.2010, at 15:32, Tom Boutell wrote:
> >
> > > > Daniel, this almost works and I got pretty excited thinking about
> > > > it... but there's a tragic flaw.
> >
> > > > On the first page access you slurp up all the CSS files, minify them,
> > > > md5 that and create a cache file. Fine.
> >
> > > > On the second page access you... can't point to the cache file
> without
> > > > first doing all of that again (everything except actually writing the
> > > > file) just to figure out what the filename is. (:
> >
> > > > Opening all of the files, slurping them in and md5'ing them on every
> > > > page access is overhead we do not want. So it makes more sense to
> have
> > > > a cache key.
> >
> > > > On Aug 16, 9:13 am, Daniel Lohse 
> wrote:
> > > >> Sorry for being a bit slow today: why would we need cache
> invalidation?
> > > If the filename of the compacted file(s) is a hash generated from the
> > > contents of the file then after one file changes and the
> scripts/stylesheets
> > > are re-generated the filename changes. The browser then should just
> request
> > > the file because it doesn't about that file yet (filename is not the
> same).
> >
> > > >> Am I missing something here?
> >
> > > >> Cheers, Daniel
> >
> > > >> Sent from my iPad
> >
> > > >> On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
> >
> > > >>> You're right, we do need cache invalidation. I just came up with a
> > > >>> clean way to do it without tweaking app.yml settings, adding a
> table
> > > >>> or making glob() calls: just use a file in the asset-cache folder
> to
> > > >>> hold the current cache key. The OS should cache reads from that
> file
> > > >>> extremely well.
> >
> > > >>> It may even be possible to avoid the filesystem hit by writing it
> as a
> > > >>> PHP file in cache/frontend/prod/config that just calls
> > > >>> sfConfig::set(). Then with any luck it would be autoloaded and even
> > > >>> cached by APC until its modification date changes just like an
> app.yml
> > > >>> setting would. But plain old file_get_contents() calls to a simple
> > > >>> file with an asset cache version number in it would also get cached
> > > >>> nicely by the operating system so it might be overkill to try to
> wedge
> > > >>> it into Symfony's cache.
> >
> > > >>> On Aug 15, 11:44 am, pghoratiu  wrote:
> > > > It might be worthwhile to take things a step further by
> versioning
> > > > them in the URL so that they can be given an infinite cache
> > > expiration
> > > > date, although this requires a database hit or perhaps a glob
> call
> > > > when outputting the pages that contain them. The code is a big
> step
> > > > forward as-is if you are using unminimized, uncombined CSS and JS
> and
> > > > has no negative impact on your existing caching issues, but we'll
> > > > think about next steps.
> >
> > >  
> > >  I think think it's important to add cache invalidation as well. My
> > >  suggestion is to append another key
> > >  to app.yml to have a cache key that can be updated manually and
> append
> > >  that key too the minified resource
> > >  file:
> > >  all:
> > >    a:
> > >  ver:1
> > >  css/main.css?ver=1
> > >  This way css and js pages can be cached indefinitely on the client
> > > >

[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-18 Thread Tom Boutell
A specific task would be convenient for those who consider 'symfony
cc' too heavy, and I could still invoke it automatically from a
'symfony cc' hook. Would you mind opening a ticket on
trac.apostrophenow.org to remind me to look at this?

On Aug 17, 9:54 am, Stéphane  wrote:
> +1 for the specific task !
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> On Tue, Aug 17, 2010 at 3:52 PM, Daniel Lohse
> wrote:
>
> > Mhm, I somehow I knew that this would have been t easy. (:
>
> > But okay, so we do need to cache these relations array(bundle =>
> > sha1sum.ccsgz) somewhere it gets loaded on every request and I'd guess the
> > app.yml.php file is a good place. Still, using this approach does not
> > necessitate – or even need for that matter – manual cache invalidation
> > because we could send the far future Expires header everytime. If files in
> > that bundle change, clear the files (not necessarily with a brute-force
> > symfony cc) and they are rebuilt on the next page refresh. Maybe we could
> > provide a apostrophe:clear-minified-resources [--js] [--css] [--all]
> > [--env="dev|prod|staging"] task so as to not need the brute-force symfony cc
> > or go hunting for these minified files manually?
>
> > Cheers, Daniel
>
> > On 17.08.2010, at 15:32, Tom Boutell wrote:
>
> > > Daniel, this almost works and I got pretty excited thinking about
> > > it... but there's a tragic flaw.
>
> > > On the first page access you slurp up all the CSS files, minify them,
> > > md5 that and create a cache file. Fine.
>
> > > On the second page access you... can't point to the cache file without
> > > first doing all of that again (everything except actually writing the
> > > file) just to figure out what the filename is. (:
>
> > > Opening all of the files, slurping them in and md5'ing them on every
> > > page access is overhead we do not want. So it makes more sense to have
> > > a cache key.
>
> > > On Aug 16, 9:13 am, Daniel Lohse  wrote:
> > >> Sorry for being a bit slow today: why would we need cache invalidation?
> > If the filename of the compacted file(s) is a hash generated from the
> > contents of the file then after one file changes and the scripts/stylesheets
> > are re-generated the filename changes. The browser then should just request
> > the file because it doesn't about that file yet (filename is not the same).
>
> > >> Am I missing something here?
>
> > >> Cheers, Daniel
>
> > >> Sent from my iPad
>
> > >> On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
>
> > >>> You're right, we do need cache invalidation. I just came up with a
> > >>> clean way to do it without tweaking app.yml settings, adding a table
> > >>> or making glob() calls: just use a file in the asset-cache folder to
> > >>> hold the current cache key. The OS should cache reads from that file
> > >>> extremely well.
>
> > >>> It may even be possible to avoid the filesystem hit by writing it as a
> > >>> PHP file in cache/frontend/prod/config that just calls
> > >>> sfConfig::set(). Then with any luck it would be autoloaded and even
> > >>> cached by APC until its modification date changes just like an app.yml
> > >>> setting would. But plain old file_get_contents() calls to a simple
> > >>> file with an asset cache version number in it would also get cached
> > >>> nicely by the operating system so it might be overkill to try to wedge
> > >>> it into Symfony's cache.
>
> > >>> On Aug 15, 11:44 am, pghoratiu  wrote:
> > > It might be worthwhile to take things a step further by versioning
> > > them in the URL so that they can be given an infinite cache
> > expiration
> > > date, although this requires a database hit or perhaps a glob call
> > > when outputting the pages that contain them. The code is a big step
> > > forward as-is if you are using unminimized, uncombined CSS and JS and
> > > has no negative impact on your existing caching issues, but we'll
> > > think about next steps.
>
> >  
> >  I think think it's important to add cache invalidation as well. My
> >  suggestion is to append another key
> >  to app.yml to have a cache key that can be updated manually and append
> >  that key too the minified resource
> >  file:
> >  all:
> >    a:
> >      ver:1
> >  css/main.css?ver=1
> >  This way css and js pages can be cached indefinitely on the client
> >  side without having problems when manually
> >  updating the css or js files.
>
> >      gabriel
>
> > >>> --
> > >>> If you want to report a vulnerability issue on symfony, please send it
> > to security at symfony-project.com
>
> > >>> You received this message because you are subscribed to the Google
> > >>> Groups "symfony users" group.
> > >>> To post to this group, send email to symfony-users@googlegroups.com
> > >>> To unsubscribe from this group, send email to
> > >>> symfony-users+unsubscr...@google

[symfony-users] Re: Adding time to a date symfony 1.4

2010-08-18 Thread Massimiliano Arione
On 18 Ago, 10:34, François SEDE  wrote:
> Hi everyone.
>
> I want to add the value of an sfWidgetFormI18nTime to an
> sfWidgetFormJqueryDate and store it into a column in my database but
> it doesn't work.

Don't use sfWidgetFormJqueryDate.
See http://garakkio.altervista.org/datepickerui/

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-18 Thread Tom Boutell
I should probably just store the information via sfCache and allow
sfAPCCache etc. to be plugged in as an alternative to the default
sfFileCache to avoid overhead rather than being cute about it...

On Aug 17, 9:39 am, Stéphane  wrote:
> I didn't took a look at the implementation yet.
>
> PHP is caching filesystem infos AFAIK.
>
> Can't we use these file informations as part of the key cache to compute md5
> ? So their will be no more need to invalidate, it will invalidate by itself,
> or by calling (for hard-writting apps) clearstatcache() ?
>
> Cheers,
>
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
>
> On Tue, Aug 17, 2010 at 3:32 PM, Tom Boutell  wrote:
> > Daniel, this almost works and I got pretty excited thinking about
> > it... but there's a tragic flaw.
>
> > On the first page access you slurp up all the CSS files, minify them,
> > md5 that and create a cache file. Fine.
>
> > On the second page access you... can't point to the cache file without
> > first doing all of that again (everything except actually writing the
> > file) just to figure out what the filename is. (:
>
> > Opening all of the files, slurping them in and md5'ing them on every
> > page access is overhead we do not want. So it makes more sense to have
> > a cache key.
>
> > On Aug 16, 9:13 am, Daniel Lohse  wrote:
> > > Sorry for being a bit slow today: why would we need cache invalidation?
> > If the filename of the compacted file(s) is a hash generated from the
> > contents of the file then after one file changes and the scripts/stylesheets
> > are re-generated the filename changes. The browser then should just request
> > the file because it doesn't about that file yet (filename is not the same).
>
> > > Am I missing something here?
>
> > > Cheers, Daniel
>
> > > Sent from my iPad
>
> > > On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
>
> > > > You're right, we do need cache invalidation. I just came up with a
> > > > clean way to do it without tweaking app.yml settings, adding a table
> > > > or making glob() calls: just use a file in the asset-cache folder to
> > > > hold the current cache key. The OS should cache reads from that file
> > > > extremely well.
>
> > > > It may even be possible to avoid the filesystem hit by writing it as a
> > > > PHP file in cache/frontend/prod/config that just calls
> > > > sfConfig::set(). Then with any luck it would be autoloaded and even
> > > > cached by APC until its modification date changes just like an app.yml
> > > > setting would. But plain old file_get_contents() calls to a simple
> > > > file with an asset cache version number in it would also get cached
> > > > nicely by the operating system so it might be overkill to try to wedge
> > > > it into Symfony's cache.
>
> > > > On Aug 15, 11:44 am, pghoratiu  wrote:
> > > >>> It might be worthwhile to take things a step further by versioning
> > > >>> them in the URL so that they can be given an infinite cache
> > expiration
> > > >>> date, although this requires a database hit or perhaps a glob call
> > > >>> when outputting the pages that contain them. The code is a big step
> > > >>> forward as-is if you are using unminimized, uncombined CSS and JS and
> > > >>> has no negative impact on your existing caching issues, but we'll
> > > >>> think about next steps.
>
> > > >> 
> > > >> I think think it's important to add cache invalidation as well. My
> > > >> suggestion is to append another key
> > > >> to app.yml to have a cache key that can be updated manually and append
> > > >> that key too the minified resource
> > > >> file:
> > > >> all:
> > > >>   a:
> > > >>     ver:1
> > > >> css/main.css?ver=1
> > > >> This way css and js pages can be cached indefinitely on the client
> > > >> side without having problems when manually
> > > >> updating the css or js files.
>
> > > >>     gabriel
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it
> > to security at symfony-project.com
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-users@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
>

-- 
If you want to report a vulnerabilit

[symfony-users] Unhappy: sending mails with layout

2010-08-18 Thread Georg
Hello,

I am confused. I would like to send emails with layout and template from
any place in my project, application or a task.
Reading the docs
(http://www.symfony-project.org/more-with-symfony/1_4/en/04-Emails), it
tells me to put each email in a class, and "Of course, adding a base
class to centralize the shared headers like the From header, or to add a
common signature can be convenient".

Here comes the part why I am unhappy and confused, I have a cool MVC
framework, and for emails I should go back to home-brew PHP and mix view
and controller?

Wouldn't it be cleaner to put the email views in a plugin, and make them
accessible from everywhere?

I would have expected a plugin that makes this possible, but no.

How are you doing it, where do you put the presentation layers of your
emails?

Georg

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] AW: created_at gets deleted on edit

2010-08-18 Thread Christopher Schnell
A part of it, I can answer myself:

the updated_at column is set to null if I press "save" in the Form and do not 
really make an update (i.e. leave all values, as they are). However, updated_at 
is written if I really update a value.

Seems to me like a problem in Propel 1.5.

I guess, it will be better to ask in the propel list then.

Regards,
Christopher.


> -Ursprüngliche Nachricht-
> Von: symfony-users@googlegroups.com [mailto:symfony-
> us...@googlegroups.com] Im Auftrag von Christopher Schnell
> Gesendet: Dienstag, 17. August 2010 09:49
> An: symfony-users@googlegroups.com
> Betreff: [symfony-users] created_at gets deleted on edit
> 
> Hi all,
> 
> currently, I am facing a strange problem. My created_at and updated_at
> values get deleted when editing an object via its form.
> 
> Everything should be straightforward, both fields are in my schema.yml.
> I customize the corresponding Form class via $this-
> >useFields(array(...)), so that created_at and updated_at are not used
> and displayed. But anyway if I update the object, both values are set
> to null.
> 
> I user Symfony 1.4.7-DEV (Trunk as svn External) and sfPropel15Plugin.
> 
> Did anyone experience such a problem?
> 
> Thanks and regards,
> Christopher.
> 
> 
> Christopher Schnell
> 
> MdA Business Communications AG
> Unterer Rheinweg 86
> 4057 Basel
> Schweiz
> 
> Tel: +41 61 273 44 69
> Fax: +41 61 273 44 68
> 
> 
> --
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Please help me to get rid of these warning messages

2010-08-18 Thread Massimiliano Arione
On 18 Ago, 10:03, ajit  wrote:
> I am getting this warning messages...Please help me to get rid of
> those messages.
>
> Warning: constant() [function.constant]: Couldn't find constant
> Region::PEER in /var/www/dms/lib/symfony/plugins/sfPropelPlugin/lib/
> widget/sfWidgetFormPropelChoice.class.php on line 79
>
> Warning: call_user_func(Array) [function.call-user-func]: First
> argument is expected to be a valid callback in /var/www/dms/lib/
> symfony/plugins/sfPropelPlugin/lib/widget/
> sfWidgetFormPropelChoice.class.php on line 87
>
> Warning: Invalid argument supplied for foreach() in /var/www/dms/lib/
> symfony/plugins/sfPropelPlugin/lib/widget/
> sfWidgetFormPropelChoice.class.php on line 101

Looks like you're using sfWidgetFormPropelChoice with some wrong
parameters.

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-18 Thread Gustavo Adrian
Could you paste your RankDomain fixtures? the problem may be there

On Wed, Aug 18, 2010 at 3:12 AM, RusAlex  wrote:

> IT's a standart fixtures:
> sfGuardUser:
>  User_admin:
>first_name: John
>last_name:  Doe
>email_address:  john@gmail.com
>username:   admin
>password:   admin
>is_super_admin: true
>Groups: [Group_admin]
>
> sfGuardGroup:
>  Group_admin:
>name:   admin
>description:Administrator group
>Permissions:[Permission_admin]
>
> sfGuardPermission:
>  Permission_admin:
>name:   admin
>description:Administrator permission
>
> On Aug 17, 3:12 pm, Javier Garcia  wrote:
> >   Could paste the fixture?
> >
> > On 08/17/2010 12:50 PM, RusAlex wrote:
> >
> >
> >
> >
> >
> > > No im sorry i have mistake in pasting. I have a correct relations
> > > RankDomain:
> > >columns:
> > >  name: { type: string(255), notnull: true, unique: true }
> > >  user_id: { type: integer, notnull:true }
> > >relations:
> > >  sfGuardUser: { local: user_id, foreign: id }
> >
> > > but error still exist
> >
> > > On Aug 17, 11:44 am, Joep Brunsveld  wrote:
> > >> It seems that you forgot the "relations" indentation.
> >
> > >> It must be:
> > >> RankDomain:
> > >>columns:
> > >>  name: { type: string(255), notnull: true, unique: true }
> > >>  user_id: { type: integer, notnull:true }
> > >>relations:
> > >>  sfGuardUser: { local: user_id, foreign: id }
> >
> > >> On Aug 17, 7:33 am, RusAlex  wrote:
> >
> > >>> schema.yml
> > >>> RankDomain:
> > >>>columns:
> > >>>  name: { type: string(255), notnull: true, unique: true }
> > >>>  user_id: { type: integer, notnull:true }
> > >>>  sfGuardUser: { local: user_id, foreign: id }
> > >>> $php symfony doctrine:build --all --and-load
> > >>> and see red Error:
> > >>>SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add
> or
> > >>> update a child row: a foreign key constraint fails
> > >>> (`ranks`.`rank_domain`, CONSTRAINT
> > >>> `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> > >>> REFERENCES `sf_guard_user` (`id`))
> > >>> What im doing wrong ?
> >
> > --
> > Javi
> >
> > Ubuntu 8.04
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Country City problem

2010-08-18 Thread Gustavo Adrian
This could help:

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



On Wed, Aug 18, 2010 at 7:18 AM, Andro Fumero  wrote:

> Good day,
>
> Does any one tried to make a drop down Countries, and when its clicked, it
> will display the list of cities based on the selected Country.
> I have read about steps in how to do this, but doesnt have a sample code.
> I dont know where to start about this one coz im still new. I dont even
> know where to put the onchange event in the drop down from
> sfwidgetformdoctrinechoice.
>
> Any link, samples, tutorials would be great.
>
> Thanks
>
>  --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


RE: [symfony-users] APPs vs Modules/Actions: Pro's and Con's????

2010-08-18 Thread Benoit Montuelle
Hi,

If you have to share functionnality accross multiple apps / customers / access 
the best way imho is to put everithing in plugins.

As in symfony 1.4 the application is required to access plugins, you can use 3 
kinds of plugins :
- Application plugins : direct port from the current app. It contains routing, 
layout, etc.
- Functionnal plugins : organized by domain (admin, reporting,...) contains 
modules with templates, reusable components, etc
- Utility plugins : they can be either third party (db, formextra, 
generators,etc.) or business specific. They almost contains no modules.

With this organisation, Functionnal plugins uses Utilities plugins, and 
Application defines routes and navigation to the Functionnal modules.
The best is Application plugins can override Functionnal modules actions and 
templates to provide anything specific : presentation for one customer app, 
additional module, etc...

Using externals in your version control you can have a flexible organisation 
even with multiple similar projects.

This is just an example and relies on a lot of conventions. But whatever code 
organisation you choose, I think you should keep modules as small and 
independant from other ones as possible, it eases refactoring a lot.

Regards
Benoit


-Original Message-
From: Kei Takahashi 
Sent: mercredi 18 août 2010 06:39
To: symfony users 
Subject: [symfony-users] APPs vs Modules/Actions: Pro's and Con's

Hi, I am seeking opinions.

We have a group of about 5 developers and we are engaging in a
discussion about how to structure a project. In the past, each
developer has made a separate configuration system for various
websites. One is reporting, one is configurations and settings, etc.

Now, we are adopting symfony as a framework as these systems are
refactored. We want a centralized administrative application, and we
want to refactor the old systems all together to be accessed by this
one administration system. Now, here is where I am seeking opinions,
as none of us are authority's on symfony. Do we:

- create a 'backend' and put all the functionality under modules and
actions?
PROs:
CONs:

- create a separate APP for each within the PROJECT, and manipulate
the routing and layout to be shared for a consistent back end, css,
etc?
PROs:
CONs:

That is the conversation that is taking place. Pro's and Con's for
keeping them separated by Application or by having everyone use the
same backend application and put their functionality into modules and
actions.

Opinions from experienced symfony developers is highly appreciated.
We're really just searching for information (IE: Pro's/Con's) so we
can make informed decisions in our planning process. Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Country City problem

2010-08-18 Thread Andro Fumero
Good day,

Does any one tried to make a drop down Countries, and when its clicked, it will 
display the list of cities based on the selected Country.

I have read about steps in how to do this, but doesnt have a sample code. 
I dont know where to start about this one coz im still new. I dont even know 
where to put the onchange event in the drop down from 
sfwidgetformdoctrinechoice.

Any link, samples, tutorials would be great.

Thanks



  

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Where to place model integrity checks

2010-08-18 Thread axel at
Additional to FormValidation I often need model lowlevel
integritychecks before saving an object.

eg. to check if there are related objects before delete. I think these
checks should be placed in the model class, but it's neccessary to
call them from an actioncontroller and to deal there with the possible
thrown errors to generated userfriendly flash messages.

is there an existing pattern in the symfony framework that I could/
should use to implement this?

thx

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] sfWidgetFormDate datepicker range problem

2010-08-18 Thread wueb
I'm using sfWidgetFormDate with a datepicker (http://
garakkio.altervista.org/datepicker/)

The code in the form is:

$years = range(date("Y"),1980);
$this->widgetSchema['date_const'] = new sfWidgetFormDate(array('years'
=> array_combine($years, $years),'format' => '%day% - %month% - %year
%'));


My problem is when i open the datepicker the default date  selected on
the datepicker is always on the lowest. In this case the datepicker
will be opened on the year of 1980, while i want it in 2010.

Anyone knows how can i change this?

Cheers.


(PS: even if i change the positions, range(1980,date("Y")); the lower
year come always first)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Adding time to a date symfony 1.4

2010-08-18 Thread François SEDE
Hi everyone.

I want to add the value of an sfWidgetFormI18nTime to an
sfWidgetFormJqueryDate and store it into a column in my database but
it doesn't work.

here is my form.


$dateWidget = new sfWidgetFormI18nDate(array(
'format' => '%day%/%month%/%year%',
'month_format' => 'short_name',
'culture' => 'fr'));

$this->widgetSchema['begin_date'] = new
sfWidgetFormJqueryDate(array(
'image' => '/images/icons/calendar.png',
'culture' => 'fr',
'date_widget' => $dateWidget));

$this->widgetSchema['end_date'] = new
sfWidgetFormJqueryDate(array(
'image' => '/images/icons/calendar.png',
'culture' => 'fr',
'date_widget' => $dateWidget));

$this->widgetSchema['begin_hour'] = new
sfWidgetFormI18nTime(array(
'culture' => 'fr'));

$this->widgetSchema['end_hour'] = new sfWidgetFormI18nTime(array(
'culture' => 'fr'));

$this->validatorSchema['end_hour'] = new
sfValidatorDateTime(array('required' => false));
$this->validatorSchema['begin_hour'] = new
sfValidatorDateTime(array('required' => false));

my action :

...

$ev = $request->getPostParameter('event');
$form->getObject()-
>setBeginDate(self::_getTimeStamp($ev['begin_date'],
$ev['begin_hour']));
$form->getObject()->setEndDate(self::_getTimeStamp($ev['end_date'],
$ev['end_hour']));

...

private function _getTimeStamp($date , $time) {
return mktime($time['hour'],$time['minute'],
0,$date['month'],$date['day'],$date['year']);
}

When i do this i put a timestamp in my object attributes : Example :
1282154400 for 18/08/2010 18:00

but when i do

event = $form->save();

he doesn't take care of the time and i have only 18/08/2010 12:32

Can you help me please.

PS : don't tell me to use the datetime because it's not user friendly
at all. here i need the 2 separate widget for my future JS
PS2 : Thank you for reading.
PS3 : Here is the initial post : 
http://forum.symfony-project.org/viewtopic.php?f=22&t=29388

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Please help me to get rid of these warning messages

2010-08-18 Thread ajit
Hello All,

I am getting this warning messages...Please help me to get rid of
those messages.


Warning: constant() [function.constant]: Couldn't find constant
Region::PEER in /var/www/dms/lib/symfony/plugins/sfPropelPlugin/lib/
widget/sfWidgetFormPropelChoice.class.php on line 79

Warning: call_user_func(Array) [function.call-user-func]: First
argument is expected to be a valid callback in /var/www/dms/lib/
symfony/plugins/sfPropelPlugin/lib/widget/
sfWidgetFormPropelChoice.class.php on line 87

Warning: Invalid argument supplied for foreach() in /var/www/dms/lib/
symfony/plugins/sfPropelPlugin/lib/widget/
sfWidgetFormPropelChoice.class.php on line 101

Thanks In Advance!!!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: APPs vs Modules/Actions: Pro's and Con's????

2010-08-18 Thread Christian Schaefer

I'm not sure I got you correctly but it seems you are talking about
several administrative tasks that are executed by different persons/
roles, right?

if you would create an app per person/role you will likely encounter
duplicated code a lot. also you would have to maintain a far more
complex system.

what you want is one backend with all functionality and using the
symfony permission system to grant persons/roles access to these.
so every person/role would access the same application but with a
limited view/access to its functionality.


is that what you meant?


On Aug 18, 6:39 am, Kei Takahashi  wrote:
> Hi, I am seeking opinions.
>
> We have a group of about 5 developers and we are engaging in a
> discussion about how to structure a project. In the past, each
> developer has made a separate configuration system for various
> websites. One is reporting, one is configurations and settings, etc.
>
> Now, we are adopting symfony as a framework as these systems are
> refactored. We want a centralized administrative application, and we
> want to refactor the old systems all together to be accessed by this
> one administration system. Now, here is where I am seeking opinions,
> as none of us are authority's on symfony. Do we:
>
> - create a 'backend' and put all the functionality under modules and
> actions?
> PROs:
> CONs:
>
> - create a separate APP for each within the PROJECT, and manipulate
> the routing and layout to be shared for a consistent back end, css,
> etc?
> PROs:
> CONs:
>
> That is the conversation that is taking place. Pro's and Con's for
> keeping them separated by Application or by having everyone use the
> same backend application and put their functionality into modules and
> actions.
>
> Opinions from experienced symfony developers is highly appreciated.
> We're really just searching for information (IE: Pro's/Con's) so we
> can make informed decisions in our planning process. Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en