[symfony-users] I18n messages.xml doesn't work

2011-06-01 Thread cosmy
Hi all,
i've configured the I18n module for an application and it seems to
work fine: doctrine tables uses I18n fields in the right way, and the
backend works well too.
The default built-in language is italian, then I've exported it,
translated in english and added the english dir and file in apps/
frontend/i18n/en.
If I change language with the selector it doesn't translate the site,
as you can see with your eyes: http://tinyurl.com/3b5k2ra
I don't know why.. can you help me?

this is the english file: http://pastebin.com/ttgXFuZW
this is the italian one: http://pastebin.com/KuzQcS4M

And this is my settings.yml for the i18n part:
all:
  .settings:
i18n: true
default_culture: it_IT
standard_helpers: [Partial, Cache, I18N]
charset: utf-8

-- 
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] saving a form without displayig it

2010-08-26 Thread cosmy
Hi all.
I want to duplicate some inserted categories (retrieved by a query) of
my model changing some attribute.
I've written this code in a backend action but it doesn't work
foreach($categories as $category){
$c2 = new Category();
$c2 = clone $category;
$c2->setCustomer($customer);
$c2->setId_interview('NULL');
$c2->setId(''); //don't want the same id of
$category!!
$categoryform = new CategoryForm($c2);
$category2 = $categoryform->save();
}

I receive this error:

500 | Internal Server Error | sfValidatorErrorSchema

stack trace

* at ()
  in SF_ROOT_DIR/lib/form/doctrine/base/BaseCategoryForm.class.php
line 85 ...

   $this->widgetSchema->setNameFormat('category[%s]');

   $this->errorSchema = new
sfValidatorErrorSchema($this->validatorSchema);

   $this->setupInheritance();


What's wrong with it? the $categories i'm going to duplicate are
stored in the DB, so they wouldn't contain invalid values

-- 
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] "Delete" on this relation doesn't work: SQLSTATE[23000]: Integrity constraint violation

2010-08-24 Thread cosmy
Hi all. I have this class in my schema.yml:
Category:
  actAs: { Timestampable: ~ }
  columns:
name: { type: string(255), notnull: true }
cliente: { type: string(255), notnull: true, default: prova }
modalita: { type: string(255), notnull: true, default: normale }
id_interview: { type: integer }
gestionale1: { type: float, notnull: true, default: 1}
gestionale2: { type: float, notnull: true, default: 1}
gestionale3: { type: float, notnull: true, default: 1}
gestionale4: { type: float, notnull: true, default: 1}
gestionale5: { type: float, notnull: true, default: 1}
gestionale6: { type: float, notnull: true, default: 1}
relazionali1: { type: float, notnull: true, default: 1}
relazionali2: { type: float, notnull: true, default: 1}
relazionali3: { type: float, notnull: true, default: 1}
relazionali4: { type: float, notnull: true, default: 1}
relazionali5: { type: float, notnull: true, default: 1}
relazionali6: { type: float, notnull: true, default: 1}
relazionali7: { type: float, notnull: true, default: 1}
relazionali8: { type: float, notnull: true, default: 1}
intellettive1: { type: float, notnull: true, default: 1}
intellettive2: { type: float, notnull: true, default: 1}
intellettive3: { type: float, notnull: true, default: 1}
intellettive4: { type: float, notnull: true, default: 1}
intellettive5: { type: float, notnull: true, default: 1}
intellettive6: { type: float, notnull: true, default: 1}
ordine: { type: integer, default: 0 }
  relations:
Interview: { onDelete: CASCADE, local: id_interview, foreign:
id, , foreignAlias: Headmaster }
Utilizzi:
 class: Utilizzo
 local: category_id
 foreign: utilizzo_id
 type: many
 foreignAlias: Categories
 refClass: UtilizzoCategory
 onDelete: CASCADE
Utilizzo:
  actAs: { Timestampable: ~ }
  columns:
name: { type: string(255), notnull: true }
descrizione: { type: string(255) }
  relations:
categories:
 class: Category
 refClass: UtilizzoCategory
 local: utilizzo_id
 foreign: category_id
 type: many
 foreignAlias: Utilizzi
 onDelete: CASCADE
UtilizzoCategory:
  actAs: { Timestampable: ~ }
  columns:
category_id:
  type: integer
  primary: true
utilizzo_id:
  type: integer
  primary: true

If I tra to delete an item of this class i receive this error:

500 | Internal Server Error | Doctrine_Connection_Mysql_Exception
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or
update a parent row: a foreign key constraint fails
(`ssm`.`utilizzo_category`, CONSTRAINT
`utilizzo_category_category_id_category_id` FOREIGN KEY
(`category_id`) REFERENCES `category` (`id`))

-- 
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: Redirect on login

2010-08-23 Thread cosmy
You are right.. sorry but there are about 30 hours straigth in front
of my mac and my brain is not connecting any longer.. :)

On 23 Ago, 16:20, Daniel Lohse  wrote:
> I guess you're using sf(Doctrine)GuardPlugin? Look at the README, it's in 
> there. :)
>
> Cheers, Daniel
>
> On 23.08.2010, at 15:53, cosmy wrote:
>
>
>
> > Hi all.
> > I want that every time i do the login process the session to be
> > resetted, and the login process redirect to the home, and not the page
> > requested.
> > How ca i manage this?
>
> > --
> > 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] Redirect on login

2010-08-23 Thread cosmy
Hi all.
I want that every time i do the login process the session to be
resetted, and the login process redirect to the home, and not the page
requested.
How ca i manage this?

-- 
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] Translating the backend

2010-08-21 Thread cosmy
Hi all, here I am again.
What I have to modify to translate automatically the function buttons
of the backend (if it's possibile..)?
It's quite strange but I can't find anything about it (I don't need
the Il18 and multilanguage support... I only want my backend in
italian without correcting thousands of files) :)

Thank you in advance,
Cosimo

-- 
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] [model] sorting a collection of object

2010-08-20 Thread cosmy
Hi all,
 is there a decorator method to sort collections after i've retrieved
them, or do i have to write a query method in the model?

For example: after I've retrieved a collection of objects
(Personal.class.php) related to one Category using $category-
>getPersonals() method ("Personals" is the foreign alias for
"Category", that relate many Personal objects to one Category), i want
to order this collection by the "order" field of these objects.

Thank you in advance,
Cosimo Zecchi

-- 
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: retrieving sfuser in the model

2010-08-15 Thread cosmy
Wow!
thank you very much. I'll try this way

On 15 Ago, 17:22, Nibsirahsieu  wrote:
> Have a look at this tutorial..
>
> http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-wi...
> 
>
>
>
> On Sun, Aug 15, 2010 at 10:20 PM, Cosimo Zecchi  wrote:
> > Hi all.
> > I'd like to use the credentials of a user in several queries and in some
> > form class parameters.
> > How can I do this? I'm able to call sfuser only from the actions (but this
> > way is not suitable for my backend purposes).
>
> > Thank you in advance
>
> > Cosimo Zecchi
>
> > P.IVA: 02035150974
> > c.zec...@gmail.com
> > tel. 3475851188
>
> >  --
> > 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 > legroups.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: Change backend module views

2010-08-14 Thread cosmy
I've managed the problem without modifying the business and the
actions, in this way:
I've edited the editSuccess.php of the category backend module, saving
the category id and name in the user session. So every time i save a
category if it's successfull it goes to edit page and the page add it
to session.
If i want to take trace of where in the backend the user is, i can
edit all the templates using the sessions or the slots

Thank you for your help, hope to be usefull to anyone with this
solution

Cosimo

On 12 Ago, 00:40, Alexandre Salomé  wrote:
>   There are multiple answers to this problem :
>
>     * If it's business question, define this behavior in your model
>     * If it's action processing, define it in your form (overriding the
>       doSave() method)
>     * And if there is no other solution, take a look at generated code.
>       You have 2 classes associated to your module generation : the
>       configuration and the helper. Find the correct place for your
>       piece of code, and override the appropriate method
>
> Good luck ;)
>
> Le 11/08/10 14:00, cosmy a �crit :
>
>
>
>
>
> > Thank you a lot.. and if i want to override the behaviour of one
> > action in the backend?
> > (I want to save as user attributes a category (it is a module) id and
> > name when it is saved in the backend, to take trace of what the user
> > id doing in the menu.
> > I think the best way is to add this attributes in the new action of
> > category module, isn't it?)
>
> > On 10 Ago, 22:14, Alexandre Salom�  wrote:
> >> You can override templates. For example, a module :
>
> >> post/
> >>    config/
> >>      generator.yml
> >>    templates/
> >>      -- your templates
>
> >> Copy/paste files from the module, generated in the cache to your module
> >> folder.
>
> >> See the Reference Guide and documentations for more informations about 
> >> admin
> >> generator templates.
>
> >> 2010/8/10 Cosimo Zecchi
>
> >>> Hi all,
> >>>   if I want to change the view of the backend modules, how do i do.
> >>> There's only the layout template, but i want to add slots for every module
> >>> to realize an interactive menu.
> >>> Thank you in advance and sorry for my poor english
> >>>   Cosimo Zecchi
> >>> P.IVA: 02035150974
> >>> c.zec...@gmail.com
> >>> tel. 3475851188
> >>>   --
> >>> 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 >>>  legroups.com>
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/symfony-users?hl=en
> >> --
> >> Alexandre Salom�http://alexandre-salome.fr
>
> --
> ---
> Alexandre Salom� -http://alexandre.salome.fr

-- 
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: Change backend module views

2010-08-11 Thread cosmy
Thank you a lot.. and if i want to override the behaviour of one
action in the backend?
(I want to save as user attributes a category (it is a module) id and
name when it is saved in the backend, to take trace of what the user
id doing in the menu.
I think the best way is to add this attributes in the new action of
category module, isn't it?)


On 10 Ago, 22:14, Alexandre Salomé  wrote:
> You can override templates. For example, a module :
>
> post/
>   config/
>     generator.yml
>   templates/
>     -- your templates
>
> Copy/paste files from the module, generated in the cache to your module
> folder.
>
> See the Reference Guide and documentations for more informations about admin
> generator templates.
>
> 2010/8/10 Cosimo Zecchi 
>
>
>
>
>
> > Hi all,
> >  if I want to change the view of the backend modules, how do i do.
> > There's only the layout template, but i want to add slots for every module
> > to realize an interactive menu.
>
> > Thank you in advance and sorry for my poor english
>
> >  Cosimo Zecchi
>
> > P.IVA: 02035150974
> > c.zec...@gmail.com
> > tel. 3475851188
>
> >  --
> > 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 > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Alexandre Saloméhttp://alexandre-salome.fr

-- 
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: Sending mail from a Form class.

2010-07-04 Thread cosmy
Thank you Bernhard, this reply is very usefull! I'll call the mailer
in this way

For the others: now my function works. There was a problem in exim
configuration with one of the addresses (so one address not working is
enough to invalid the entire email).
I have to realize a newsletter now.. but i am a little bit scared
about testing it.. :D

On 4 Lug, 15:16, Bernhard Schussek  wrote:
> I disagree that this is a good use case for the event dispatcher. The
> event dispatcher is good for providing hooks for additional,
> _optional_ functionality (like logging, profiling etc.)
>
> Sending a mail upon form submission is not optional. This has to
> happen. You want to be able to test that it happens.
>
> The best solution IMHO is to inject the mailer into the form's
> constructor and use it in doSave() (unless you plan to embed that form
> somewhere else).
>
> And btw: NEVER use sfContext::getInstance(). Well, almost 
> never.http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/
>
> // /lib/form/doctrine/PostForm.class.php
> class PostForm extends BasePostForm
> {
>   protected $mailer;
>
>   public function __construct($object, sfMailer $mailer, array
> $options = array())
>   {
>     $this->mailer = $mailer;
>     parent::__construct($object, $options);
>   }
>
>   protected function doSave($con = null) {
>     parent::doSave($con);
>
>     $post = $this->getObject();
>
>     $mail = $this->mailer->compose();
>     $mail->setFrom("i...@teapartyitalia.it", 'Tea Party Italia');
>     $mail->setTo($array(
>     'myaddr...@yahoo.com',
>     'myaddr...@gmail.com',
>     ));
>     $mail->setSubject("prova");
>     $mail->setBody("Mail inviata da form");
>
>     $this->mailer->send($mail);
>   }
>
> }
>
> Bernhard

-- 
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: Sending mail from a Form class.

2010-07-03 Thread cosmy
I don't embed the form.. where should i put this function if I want
that an email is sent when a new article is posted (in the backend)?
And why it doesn't work into the form class using
sfContext::getInstance(), and it works in an action using $this ?

@Richtermeister: I've never used eventdispatcher

On 2 Lug, 15:25, Johannes  wrote:
> doSave() is probably not the right place since it never gets called if
> you embed the PostForm somewhere.
>
> Johannes
>
> On Jul 2, 3:12 pm, cosmy  wrote:
>
>
>
> > On 2 Lug, 05:58, pghoratiu  wrote:
>
> > > From the first one the actual send is missing:
>
> > >                   // send the email
> > >                   $this->getMailer()->send($mail);
>
> > >     gabriel
>
> > It still doesn't work..

-- 
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: Sending mail from a Form class.

2010-07-02 Thread cosmy
On 2 Lug, 05:58, pghoratiu  wrote:
> From the first one the actual send is missing:
>
>                   // send the email
>                   $this->getMailer()->send($mail);
>
>     gabriel
>

It still doesn't work..

-- 
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 use Filter Forms without Admin Generator?

2009-12-11 Thread cosmy
Interesting topic.. would you mind posting the solution when you have
done?
Thnak you in advance

On 10 Dic, 08:48, Christopher Schnell  wrote:
> Yeah, I thought so. But I can use the fieldset of the filter form
> anyway. I was mainly curious because the form filters are nowhere
> described, and I use filters to let the user select the records quite
> often. So it would have come handy earlier, but i just didn't know how
> to use them.
>
> Maybe I could make a documentation request :-)
>
> Regards,
> Christopher.
>

--

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




[symfony-users] custom postValidator on embedded forms

2009-12-10 Thread cosmy
hi all..
I have to write a post validator because i want to check that values
of different embedded forms shouldn't be the same.

I don't know the best practice to do this, so I've tried doing this
way:

In my configure() function of my main form class:

// add a post validator
$this->validatorSchema->setPostValidator(
new sfValidatorCallback(array('callback' => array($this,
'checkAttitudes')))
);


and this is the post validation function (supponing to have two
embedded forms A_situazione1_0 and A_situazione1_1, and to compare the
'val' field of them):

public function checkAttitudes($validator, $values){
if($values['A_situazione1_0']['val']==$values['A_situazione1_1']
['val']){
$error = new sfValidatorError($validator, 'ahahaah');
// throw an error bound to the val field
throw new sfValidatorErrorSchema($validator, array('val' => $error));
}
return $values;
}

But of course the last is not correct because I don't want to hit a
generic 'val' field but the 'val' field of embedded form
'A_situazione1_0'

--

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




[symfony-users] Personal validator

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

--

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




[symfony-users] Re: cant load data from fixture to database through doctrine:data-load

2009-11-19 Thread cosmy
post your fixtures and your schema

On 19 Nov, 10:01, Shahzeb Farooq  wrote:
> hi all ,
> i am facing a problem that i have created a project all gone well but
> im stuck at symfony doctrine:data-load when ever i tried to load data
> from /fixtures  to database.
> when i execute the command it shows following message
>
> >> doctrine  loading data fixtures from "/ho...fprojects/jobeet/data/fixtures"
> >> doctrine  Data was successfully loaded
>
> but still there is no data in the database.i have followed all steps
> as it is inhttp://www.symfony-project.org/jobeet/1_2/Doctrine/en/03
> but...
>
> please help me
> shahzeb Farooq Chohan
> sftra...@yahoo.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.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=.




[symfony-users] query or methods?

2009-11-10 Thread cosmy

Hi all,
I have a philosophical question.

I have a class method that calculates (nothing exotic some
comparations and additions) a lot of information from a string saved
in an object. Combining in serveral ways four numbers, comma separated
in only one record, it extracts around 16 different levels. very
compact and fast for a single object.

Now i want to build a report of these levels for all the objects in my
database, and i'm asking if is it better saving the levels in the
objects and then do some queries to extract them (to get the ones
under 0,5, the ones between 0,5 and 1, and so on...) directly, or if
is it better to calculate them every time from all the objects and
working on them with arrays and methods.
I don't know how to proceed: every way have pros and cons..
I think it's more a philophical problem that a real one, but if I have
a lot of records maybe a day should be the difference a method from
another..

--~--~-~--~~~---~--~~
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: form->Render() when embedding?

2009-11-09 Thread cosmy

Yes documentation is a great thing but maybe i haven't explained well
the situation.
I don't want to access the widget of the main form but a child one.
My form embed several forms of the same class, so the widgets of these
forms have the same names, but not the forms (I numerate them while
embedding).
My question is not how to access a different widget in the template,
but how to access a different child form (and so of course its
widgets).
I've read the documentation but it doesn't consider this case.

I hope to have been more clear in the explanation, thank you for the
response.

On 9 Nov, 11:31, Gareth McCumskey  wrote:
> render() ?>
> render() ?>
>
> Documentation is a wonderful thing:
>
> http://www.symfony-project.org/forms/1_2/en/03-Forms-for-web-Designer...

--~--~-~--~~~---~--~~
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] form->Render() when embedding?

2009-11-08 Thread cosmy

Hi all,
 I was asking my self... how do I do to access embedded forms if i
want to render my form widget by widget?
(I'd like to group forms widgets and divide my form in sections)
--~--~-~--~~~---~--~~
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: Unset embedded form

2009-11-08 Thread cosmy

I think the better way is to use an attribute to control the embedding
in the UserForm using a simpe if..
then the derivated class should set the attribute to false..

On 9 Nov, 00:51, HAUSa 
wrote:
> I have two classes: UserForm and UserSimpleForm. UserSimpleForm
> extends UserForm.
> In UserForm are several other forms embedded, like PhotoForm and
> AddressForm.
>
> For the simple version of the form, UserSimpleForm, I want to unset
> these embedded forms. Say unembed (is that an existing word?) them.
>
> How can I do that?
--~--~-~--~~~---~--~~
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: non ascii chars in Fixtures files

2009-11-06 Thread cosmy

Good Question... i'm working under macosx, so i think not.. :D
Holy Eclipse helped me to convert the File..

thank you very much!!!

On 6 Nov, 09:00, Georg Gell  wrote:
> Did you save the fixtures file in UTF8?
>
> cosmy schrieb:
>
>
>
> > Hi all,
> >  do you know a method to load fixtures data without losing chars like
> > àèìòù and others?
> > It exchanges them with a question mark during the data-load.
>
> > thank you in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: non ascii chars in Fixtures files

2009-11-05 Thread cosmy

It doesn't work:
Notice: iconv_strlen(): Detected an incomplete multibyte character in
input string in /Users/cosmy/workspace/ssm/lib/vendor/symfony/lib/
plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Validator.php on
line 125

Other ideas?

On 5 Nov, 16:22, HAUSa 
wrote:
> Try to put your text between quotes ( " )
>
> ClassName:
>   fixture_1: { name: "Esmée" }

--~--~-~--~~~---~--~~
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: generator.yml ignored

2009-11-04 Thread cosmy

It still doesn't work.. anyone could immagine why my app ignore the
modifies on the generator.yml
Is there  something to do apart cache:clear?

>
> > have you checked the indent?
The indent seems ok, but you can check the code i've posted
--~--~-~--~~~---~--~~
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.2 on debian etch

2009-11-04 Thread cosmy

In the end I've compiled a new php and i use it in the project virtual
host as CGI until debian will release an updated version of PHP, as
Alexandre suggested. I think it should be inserted (i can write two
lines if you want) in the guide as debian etch is very very used as
production server.
Thank you.

P.S.: are you posting with the same email address you have registered
in?

On 4 Nov, 15:52, ridcully  wrote:
> My test symfony installation on eth works with 5.2.0, just comment the
> message that symfony needs 5.2.4 out.
> The php from eth has the most Patches into that 5.2.10 has too, but it
> says 5.2.0-10 and that is the problem I think.
>
> But I don't use symfony on this Server for a productiv application, so
> there is no garentee is runs 100% stable, but it should I think.
>
> PS: Why I can't post via Email to this group?

--~--~-~--~~~---~--~~
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: Propel 1.3 Vs Doctrine 1.2

2009-11-04 Thread cosmy

Ah sorry, I was sure it wasn't supported anymore..

On 4 Nov, 14:12, Alan Bem  wrote:
> cosmo, you're wrong. Propel is much
> alive.
>
>
--~--~-~--~~~---~--~~
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.2 on debian etch

2009-11-04 Thread cosmy

On this server there are a lot of other sites and i'm not the only one
who use it.
I could compile php but i need to change less things possible on
production, and there is a risk that something could not work
However, I'll try to compile on the development serve;, if you know a
way to modify some class of symfony to make it works with the actual
configuration, please tell.
at the moment some modules work.. other have got problems with pdo.

500 | Internal Server Error | Doctrine_Connection_Mysql_Exception
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while
other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

I could add this attribute to the db connection, but i don't the class
where it is done

On 4 Nov, 13:43, Alexandre SALOME  wrote:
> You should update your Debian, or another solution is to compile your PHP
> version.
>
> 2009/11/4 cosmy 
>
>
>
> > Hi all,
> >  i have a production server based on Debian Etch and so with php
> > 5.2.0... but Symfony 1.2 needs at least php 5.24!
> > Anyone of you have managed to run newer version of Symfony on this
> > Debian version?
> > I have developed a project with Symfony 1.2 and I need to make it
> > run...
>
> > Thank you in advance.
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Propel 1.3 Vs Doctrine 1.2

2009-11-04 Thread cosmy

I think you should learn doctrine, because propel is no more
developed..

On 4 Nov, 10:39, Alexandru-Emil Lupu  wrote:
> HI!
> I dunno it was discussed before, but... could someone gimme some
> comparaisons between propel and Doctrine? We are facing at this point a
> critical point of a new application. Whatever work with propel or Doctrine.

--~--~-~--~~~---~--~~
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] Symfony >=1.2 on debian etch

2009-11-04 Thread cosmy

Hi all,
 i have a production server based on Debian Etch and so with php
5.2.0... but Symfony 1.2 needs at least php 5.24!
Anyone of you have managed to run newer version of Symfony on this
Debian version?
I have developed a project with Symfony 1.2 and I need to make it
run...

Thank you in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: generator.yml ignored

2009-11-03 Thread cosmy

Yes, it seems ok

On 3 Nov, 11:02, Sid Ferreira  wrote:
> have you checked the indent?
>

--~--~-~--~~~---~--~~
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] Embed form layout

2009-11-03 Thread cosmy

Hi again.. I have a stupid question whithout answer.
I don't want to display the embedded form name in my forms, but i
can't find the way to hide it.
It's placed in a th tag and i can't disable all the th in my layout..
anyone can help me?

Thank's
Cosimo
--~--~-~--~~~---~--~~
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] generator.yml ignored

2009-11-03 Thread cosmy

Hi all..
I've modified for a backend application the generator.yml but the
backend section seems to remain the same without the modifies.
I've tried also cache:clear but nothing happens.

Do you have any ideas?

Thank you in advance.

This is my generator:
generator:
  class: sfDoctrineGenerator
  param:
model_class:   Category
theme: admin
non_verbose_templates: true
with_show: false
singular:  ~
plural:~
route_prefix:  category_category
with_doctrine_route: 1

  config:
actions: ~
fields:  ~
list:
  title: Category Management
  display: [=name]
filter:  ~
form:~
edit:
  title: Editing Category "%%name%%" (#%%id%%)
new:
  title: New Category
--~--~-~--~~~---~--~~
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: Embedding forms: managing foreign keys with parent form primary key

2009-11-01 Thread cosmy


I've solved the problem using your suggestion in this way:
I've disabled the idFeature in the optionForm, and of course i've
deleted the not null option in the schema.
So i've modified the doSave method of the featureForm in this way:
public function doSave($con = null)
{
parent::doSave($con);
foreach($this->getObject()->Options as $p){
$p->setIdInterview($this->getObject()->id);
$p->save();
  }
where $this->getObject()->Options is the array we have set up in the
foreach in the configure() to relate every option to the feature.

In this way it inserts all the options and then it saves in the
options the id..
maybe too much queries, but i can't manage a different solution

Hoping to be usefull to other user.. this could be a solution to 1:m
nested forms...
--~--~-~--~~~---~--~~
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: Embedding forms: managing foreign keys with parent form primary key

2009-10-22 Thread cosmy

Maybe I haven't understand but it doesn't work.
Let's see the code i've written. I think i've forgot something..
In my code the Feature class is named Interview (generates the parent
form). The Options classes are named PersonalAnswers (generate the
related forms).
When i start a new Interview i have to fill several InterviewForms
(there is another class, PersonalInformation,  that indicates how many
PersonalAnswers you have per interview, and the details).
The real problem is to store in every PersonalAnswer the idInterview
(the id of interview object)

Interview.class.php:
class Interview extends BaseInterview
{
public $Personal = array(); //array will be used to relate the
PersonalAnswer to the form's object

public function getPersonals(){ //return an array of Personal
Questions
$personals = 
Doctrine::getTable('PersonalInformation')->getPersonals
();
return $personals;
}
}

InterviewForm.class.php
class InterviewForm extends BaseInterviewForm
{
public function configure() {
unset(
$this['created_at'], $this['updated_at'],
$this['expires_at'], $this['is_activated']
);

$i=0;
if($this->getObject()->isNew()){
foreach($this->getObject()->getPersonals() as $p) {  
//for every
question contained in PersonalInformations it adds a PersonalAnswer
form
$panswer = new PersonalAnswer();
$panswer->setIdPersonal($p->getId());
$this->getObject()->Personal[] = $panswer;
//$this->embedForm($p->getName(), new 
PersonalAnswerForm
($panswer)); //alternative with slugged name instead of counter
$this->embedForm('personal_'.$i, new 
PersonalAnswerForm
($panswer));
$i++;
}
} else {
foreach($this->getObject()->Personal as $panswer){
$this->embedForm('option_'.$i, new 
OptionForm($panswer));
$i++;
}
}
}

public function doSave($con = null)
{
parent::doSave($con);
}
}

PersonalAnswer.class.php
class PersonalAnswerForm extends BasePersonalAnswerForm
{
public function configure()
{
unset(
$this['created_at'], $this['updated_at'],
$this['expires_at'], $this['is_activated']
);
//Foreign key to PersonalInformation Id
$this->widgetSchema['idPersonal']= new 
sfWidgetFormInputHidden();
//Foreign key to Interview Id
$this->widgetSchema['idInterview']= new 
sfWidgetFormInputHidden();

}

public function doSave($con = null)
{
parent::doSave($con);
}
}

> This way, in the configure function the options become/stay related to
> the parent object in the new forms.  Whether you are using propel or
> doctrine, the for constructors take an object to create the form
> from.  So, if you are using OptionForm you would pass an Option
> object.  If there are values set in the Option object, the form's
> fields will express those values.  Now when the form's save function
> is called, it will call its parent object's save method(Feature->save
> ()), which in turn will call save all of the related objects.  Since
> objects are passed by reference, the Features object will have Options
> children that will be saved and related to the feature through their
> ids.  You don't need to know the Id, because the Feature object knows
> there are Options objects related to it and set the foreign keys
> before saving the objects to the database.  Thats all you have to do,
> you don't even need to add anything to the save()/doSave() methods.

--~--~-~--~~~---~--~~
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: Embedding forms: managing foreign keys with parent form primary key

2009-10-22 Thread cosmy

> There are methods to check if this is a new object or not (i.e. isNew()
> method in form). I would add a save() method that checks this and inserts
> the 'parent' object in the database before adding the related objects. If
> its not a new method, you can read the ID directly from the objects.

Where would you add this save() method exactly?

An alternative could be to fill the parent form and after the related
objects, but in this case i want the submit button to insert the
parent and forward me to the second part of the form (the part with
related objects).. it seems more complicated.. (it would be cool to
obtain this effect through ajax request with related object forms
appearing after the parent one, but it isn't my goal at the moment,
and i don't know how to do..)


> You could make it a hidden field in your configure() method...

I'm a stupid man.. yes you are 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-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] Embedding forms: managing foreign keys with parent form primary key

2009-10-22 Thread cosmy

Hi all, i'm always here to break your patience.. :)
I can't find valid resources and documentation about forms so i'm
writing in this group, so I hope this topic could be usefull to many
users.

I'm tryng to realize a nested form for a simple structure: I should
insert through an unique form a Feature and many Options related to
this by a foreign key (idFeature) on the primary key of the Feature
object (the id record).
So in the FeatureForm i embed many OptionForm with a simple foreach
construct. The matter is that i don't know the new Feature id because
I think it's setted by the DB during the insertion (it's an
auto_increment primary key), but i need this to fill the idFeature of
the Options.
I can't find anything but i don't want to think that symfony can't
manage this situation.. do you now how to manage this?

As second doubt about this form.. I don't want the idFeature to be
modified by user. But if I unset this field from the form how do i do
to insert it in the db?

thank you in advance,
Cosimo Zecchi

--~--~-~--~~~---~--~~
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: Retrieving data from different models after a join. Unknowns methods

2009-10-21 Thread cosmy

yes it works in both the ways.. i think it's best practice to assign
the object to a variable.. so you don't have every time you use a get
method to inizialize the object.
But it works also in you way.

On 21 Ott, 15:11, Eno  wrote:
> On Wed, 21 Oct 2009, cosmy wrote:
> > What does they return?
> > A Question object?
>
> Yes.
>
> > Something like:
> > $q=$p->getQuestion();
> > $q->getQuestionField();
>
> Probably should be:
>
> $field = $p->getQuestion()->getQuestionField();
>
> See 
> docs:http://www.symfony-project.org/book/1_2/08-Inside-the-Model-Layer#cha...
>
> --
--~--~-~--~~~---~--~~
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: Retrieving data from different models after a join. Unknowns methods

2009-10-21 Thread cosmy

What does they return?
A Question object?
Something like:
$q=$p->getQuestion();
$q->getQuestionField();

Do you mean this?

On 21 Ott, 13:03, Alexandre SALOME  wrote:
> Hello,
>
>   You can use $p->getQuestion() and $p->getInterview().
>

--~--~-~--~~~---~--~~
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] Retrieving data from different models after a join. Unknowns methods

2009-10-20 Thread cosmy

Hi all.
I'm trying to get field values in my View after having done multiple
joins between some tables (models) but i don't know how to do..
I have three tables: Interview, Answer and Question.
I want to show a single interview with all the Questions and the
Answers related to that Interview (by the way, every Answer has got a
related Question).

So in my actions i have:
  public function executeShow(sfWebRequest $request)
  {
$this->interview = Doctrine::getTable('Interview')->find($request-
>getParameter('id'));
$this->answers = Doctrine::getTable('Interview')->getAnswers
($request->getParameter('id'));
$this->forward404Unless($this->interview);
  }

And in my InterviewTable.class.php:
public function getAnswers($id){
$q = Doctrine_Query::create()
->from('Answer a')
->leftJoin('a.Question q')
->leftJoin('a.Interview i')
->where('a.idInterview = ?', $id );

return $q->execute();
}

But how do i do to get a parameter of Question in the View code?

If i do:
   
getAnswerField() ?>
getQuestionField() ?>">


it gives me this error:
Unknown method Answer::getQuestionField

Of Course - i say - QuestionField is in Question model not in Answer
one!! but i don't know how to make it works..

Thank you in advance and sorry for my poor english. I hope you have
understood what i want to say..

--~--~-~--~~~---~--~~
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: Error creating database on ALTER TABLE..

2009-10-20 Thread cosmy

Maybe.. i've done what you sai, setting "setnull: true" o these
fields, but the error persist.
It seems to be fault on the "onDelete: SET NULL" property on doctrine
schemas foreign keys.
If i remove these it works!!!
But i don't want to remove the foreign field..

On 18 Ott, 11:04, Yahel  wrote:
> Hi.
>
> I think its because you're trying to set idCategory as null (in the
> forien key) while the field defined as 'notnull: true' .
> you should change the forien key (under relation) or idCategory
> definition.
--~--~-~--~~~---~--~~
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: Error creating database on ALTER TABLE..

2009-10-18 Thread cosmy

No, on doctrine it's SET NULL separated.

On 17 Ott, 18:06, Gábor Fási  wrote:
> Never used doctrine, but in propel it is "setnull", so without the space.
>

--~--~-~--~~~---~--~~
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 Build-all problem with 2 databases

2009-10-17 Thread cosmy

I'm sorry I've just posted a similar question..
However i have the same problem, only on one database but I think it's
a problem of alter table or foreign keys, and it doesn't work if I
execute doctrine:insert-sql.. so you can delete my post if you want,
and we'll continue on this.

I use mysql Server version 5.1.37 under macosx, if it could be
usefull..

Thank you and sorry again

On 17 Ott, 12:00, Bertrand Zuchuat  wrote:
> Hi Jon,
>
> I have a problem with doctrine command line on symfony 1.3. For my  
> project, i use 2 databases with some cross join db.
>
> if i start the doctrine:build-all, i have this error:
> SQLSTATE[HY000]: General error: 1005 Can't create table './db1/
> #sql-64_2d.frm' (errno: 150). Failing Query: ALTER TABLE  
> db1.review_list ADD CONSTRAINT reviewlist_ils_login_fk FOREIGN KEY  
> (ils_login_id) REFERENCES db2.ils_login(id) ON DELETE RESTRICT
>
> But if i use separate command
> ./symfony doctrine:drop-db
> ./symfony doctrine:build-db
> ./symfony doctrine:build-model
> ./symfony doctrine:build-sql
> ./symfony doctrine:insert-sql
>
> This is ok.
>
> Why ? I don't understand.
>
> Thank you for your help.
>
> Bertrand (Garfield-fr)
--~--~-~--~~~---~--~~
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] Error creating database on ALTER TABLE..

2009-10-17 Thread cosmy

Hi all.
I'm receving this error while i do doctrine:build-all or insert-sql:
SQLSTATE[HY000]: General error: 1005 Can't create table
'ssm.#sql-9cc_12' (errno: 150). Failing Query: ALTER TABLE skill ADD
CONSTRAINT skill_idcategory_category_id FOREIGN KEY (idcategory)
REFERENCES category(id) ON DELETE SET NULL

However it creates the tables (the first part of the generated SQL)
and gets this error without going forward.
Do you have an idea about this problem?
Should this error be connected to another error i receive if i try to
make a leftJoin between Interview and Category in my model?

Thank you in advance

P.S.: This is my schema:
#schema modello

Category:
  actAs: { Timestampable: ~ }
  columns:
name: { type: string(255), notnull: true, unique: true }

Skill:
  actAs: { Timestampable: ~ }
  columns:
idCategory:{ type: integer, notnull: true }
tipo:  { type: string(255) }
question:  { type: string(255), notnull: true }
name:  { type: string(255) }
  relations:
Category: { onDelete: SET NULL, local: idCategory, foreign: id,
foreignAlias: Skills }

Attitude:
  actAs: { Timestampable: ~ }
  columns:
tipo:  { type: string(255) }
question:  { type: string(255), notnull: true }
name:  { type: string(255) }

PersonalInformation:
  actAs: { Timestampable: ~ }
  columns:
tipo:  { type: string(255) }
question:  { type: string(255), notnull: true }
name:  { type: string(255) }

Answer:
  actAs: { Timestampable: ~ }
  columns:
idSkill: { type: integer }
idAttitude:  { type: integer }
idPersonal:  { type: integer }
idInterview: { type: integer, notnull: true }
val: { type: string(255) }
  relations:
Skill:   { onDelete: SET NULL, local: idSkill,
foreign: id }
PersonalInformation: { onDelete: SET NULL, local: idPersonal,
foreign: id }
Attitude:{ onDelete: SET NULL, local: idAttitude,
foreign: id }
Interview:   { onDelete: SET NULL, local: idInterview,
foreign: id }

Interview:
  actAs: { Timestampable: ~ }
  columns:
idCategory:   { type: integer, notnull: true }
author:   { type: string(255), notnull: true }
customer: { type: string(255), notnull: true }
agency:   { type: string(255) }
candidate:{ type: string(255), notnull: true }
  relations:
Category: { onDelete: SET NULL, local: idCategory, foreign:
id, foreignAlias: Interviews }

--~--~-~--~~~---~--~~
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: entity-relationship editors?

2009-10-14 Thread cosmy

thank you all.. mysql workbench seems interesting, but it doesn't work
on my macosx 10.4 :(

--~--~-~--~~~---~--~~
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: Macosx, problem with mysql while inserting from console

2009-10-14 Thread cosmy

There were a problem with imap.so extension which had blocked all the
other extensions..
now it seems ok.
Thank you.

On 14 Ott, 19:11, david  wrote:
> That's the configure compile options for php - not what's being used.
>
> You need to ensure the extension is loaded.
> If you check your php -i output you'll either have a single php.ini being  
> used or have multiple .ini files (if you have --with-config-file-path set).
>
> The latter is more flexible but makes tracking down config issues a little  
> more complex.
>
> Essentially you're looking to have an entry like: extension=pdo_mysql.so
>
>
>
>
>
> On Wed, 14 Oct 2009 17:13:31 +0200, cosmy  wrote:
>
> > I don't know what's the matter.. this is my php configuration for
> > mysql:
>
> > --with-mysqli=/Applications/MAMP/Library/bin/mysql_config
> > --with-pdo-mysql=shared,/Applications/MAMP/Library
>
> > do you have an idea?
>
> > On 14 Ott, 15:39, cosmy  wrote:
> >> Great, you were right
> >> PDO
> >> PDO support => enabled
> >> PDO drivers => sqlite, sqlite2
> >> PDO Driver for SQLite 3.x => enabled
>
> >> there's no drivers for mysql, but i have this line enabled in
> >> php.ini:
> >> extension=pdo_mysql.so
>
> >> But i've learnt something new ;)
> >> Sharing knowledge is a great thing,
> >> thank you very much
>
> >> On 14 Ott, 15:26, Gareth McCumskey  wrote:
>
> >> > Hah! You learn something new everyday
>
> >> > On Wed, Oct 14, 2009 at 3:21 PM, Eno  wrote:
>
> >> > > On Wed, 14 Oct 2009, Gareth McCumskey wrote:
>
> >> > > > To make sure about this create a php file (lets call it  
> >> php_info.php)that
> >> > > > only contains:
>
> >> > > >  >> > > > phpinfo();
> >> > > > ?>
>
> >> > > > Then run it on command line as:
>
> >> > > > php php_info.php | grep PDO
>
> >> > > Or just run:
>
> >> > > php -i |grep PDO
>
> >> > > --
>
> >> > --
> >> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> >> > twitter: @garethmcc
>
> --
> Using Opera's revolutionary e-mail client:http://www.opera.com/mail/
--~--~-~--~~~---~--~~
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: Macosx, problem with mysql while inserting from console

2009-10-14 Thread cosmy

I don't know what's the matter.. this is my php configuration for
mysql:

--with-mysqli=/Applications/MAMP/Library/bin/mysql_config
--with-pdo-mysql=shared,/Applications/MAMP/Library

do you have an idea?

On 14 Ott, 15:39, cosmy  wrote:
> Great, you were right
> PDO
> PDO support => enabled
> PDO drivers => sqlite, sqlite2
> PDO Driver for SQLite 3.x => enabled
>
> there's no drivers for mysql, but i have this line enabled in
> php.ini:
> extension=pdo_mysql.so
>
> But i've learnt something new ;)
> Sharing knowledge is a great thing,
> thank you very much
>
> On 14 Ott, 15:26, Gareth McCumskey  wrote:
>
>
>
> > Hah! You learn something new everyday
>
> > On Wed, Oct 14, 2009 at 3:21 PM, Eno  wrote:
>
> > > On Wed, 14 Oct 2009, Gareth McCumskey wrote:
>
> > > > To make sure about this create a php file (lets call it 
> > > > php_info.php)that
> > > > only contains:
>
> > > >  > > > phpinfo();
> > > > ?>
>
> > > > Then run it on command line as:
>
> > > > php php_info.php | grep PDO
>
> > > Or just run:
>
> > > php -i |grep PDO
>
> > > --
>
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Macosx, problem with mysql while inserting from console

2009-10-14 Thread cosmy

Great, you were right
PDO
PDO support => enabled
PDO drivers => sqlite, sqlite2
PDO Driver for SQLite 3.x => enabled

there's no drivers for mysql, but i have this line enabled in
php.ini:
extension=pdo_mysql.so

But i've learnt something new ;)
Sharing knowledge is a great thing,
thank you very much



On 14 Ott, 15:26, Gareth McCumskey  wrote:
> Hah! You learn something new everyday
>
>
>
>
>
> On Wed, Oct 14, 2009 at 3:21 PM, Eno  wrote:
>
> > On Wed, 14 Oct 2009, Gareth McCumskey wrote:
>
> > > To make sure about this create a php file (lets call it php_info.php)that
> > > only contains:
>
> > >  > > phpinfo();
> > > ?>
>
> > > Then run it on command line as:
>
> > > php php_info.php | grep PDO
>
> > Or just run:
>
> > php -i |grep PDO
>
> > --
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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: Macosx, problem with mysql while inserting from console

2009-10-14 Thread cosmy

they are enabled and i use the same php.ini

On 14 Ott, 14:32, Gábor Fási  wrote:
> The command line php uses a different php.ini, locate it, and enable
> both the pdo and the pdo_mysql extensions.
>
>
>
> On Wed, Oct 14, 2009 at 14:16, cosmy  wrote:
>
> > Hi all,
> > I have a problem with console scripts.
> > When i try to make  doctrine:insert-sql from my console (i'm under
> > macosx) i receive this error:
> > Couldn't locate driver named mysql
>
> > ..And of course it's a matter also if i try to load data or build all.
> > I could insert by myself the sql, but i want to make it work with the
> > command line.
>
> > I've tried exporting the correct path of the php executable, and it's
> > the same of the apache one.. but it still doesn't work.
>
> > Thank you in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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] Macosx, problem with mysql while inserting from console

2009-10-14 Thread cosmy

Hi all,
I have a problem with console scripts.
When i try to make  doctrine:insert-sql from my console (i'm under
macosx) i receive this error:
Couldn't locate driver named mysql

..And of course it's a matter also if i try to load data or build all.
I could insert by myself the sql, but i want to make it work with the
command line.

I've tried exporting the correct path of the php executable, and it's
the same of the apache one.. but it still doesn't work.

Thank you in advance

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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] entity-relationship editors?

2009-10-13 Thread cosmy

Hi all.
Generally i use Argouml for designing my uml model diagrams.
I was wondering if does exist an editor that generate yml code for my
symfony (doctrine) projects, or sql code for my mysql-server..

Thank you in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-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] different labels for a form

2009-09-18 Thread cosmy

Hi all,
i have to work on a poll site where some users should create a form
and present it to other people. The form is always the same, but the
definitions/labels of the field should be decided by the form-maker.
 what's the better method to let my users change and personalize the
labels of forms and tables?
The data will be stored in the same culumn of the same table of the
databases, but i want that several users should change the lables
trhoug a panel and show the forms with their own text.
Is it possible? How do you manage a thing like that?

Sorry for my poor english and thanks in advance,
Cosimo
--~--~-~--~~~---~--~~
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: dynamic tables/forms/models with symfony

2009-08-14 Thread cosmy

Very very interesting. Thank you very much, this is what i want.
One thing I don't understand: should UllFlowDoc and UllFlowValue be
the same table? why are they separated?


On 9 Ago, 23:15, klemens_u  wrote:
> Hi cosmy,
>
> Bernhard pointed out that we did something similar in ullright.
>
> The actual project site ishttp://www.ullright.org.
>
> We use such virtual tables especially for our workflow module
> "ullFlow".
>
> Have a look at the database 
> structure:http://trac.ullright.org/browser/trunk/plugins/ullFlowPlugin/doc/sche...
>
> The main points of interest are the definition of "virtual tables" in
> "UllFlowApp"
> and the definition of the virtual tables's columns in
> "UllFlowColumnConfig".
> The equivalent to rows is then stored in "UllFlowDoc", and the
> column's values in "UllFlowValue".
>
> You are also kindly invited to visit the backend of our demo
> installation:http://demo.ullright.org/ullAdmin(login with admin/test)
> In the section "Workflow" you'll find "Manage applications" and
> "Manage columns".
>
> From a technical point of view much logic resides in the "UllFlowDoc"
> model:http://trac.ullright.org/browser/trunk/plugins/ullFlowPlugin/lib/mode...
>
> We also have a powerful generator which dynamically builds a sfForm.
> Here's an frontend example of a form of such virtual 
> table:http://demo.ullright.org/ullFlow/create/app/purchase_request
>
> Klemens
>
> On Aug 9, 10:35 am, Bernhard Schussek  wrote:
>
>
>
> > Hi,
>
> > In my opinion you should really create a virtual schema as the previous
> > poster mentioned. Create one table "Table" that stores the custom tables,
> > one table "Field" for the field definitions (like display name, type,
> > default value etc.), one table "TableEntry" for the virtual objects and one
> > table "FieldValue" for the values of the virtual fields.
>
> > A colleague of mine did this in his open-source project "Ullright" which is
> > a available athttp://ull.at. I suggest to look at its source if you want to
> > know more.
>
> > Bernhard
> > --
> > Sent from my HTC Hero
>
> > 7. Aug 2009 11:56 vorm. schrieb am "cosmy" :
>
> > Ok, i think it could be a solution but.. how do i manage the
> > persistence of this data?
> > In other words, how do i save the data of these forms in the database?
> > Maybe as an unique string in a specific table ( in example:
> > [attribute: value | attribute2: value2] ) ?
> > but how do i manage the queries? i have to use LIKE or regexp and it
> > will be very slow to get out data of a specific type of entry, won't
> > it?
>
> > Is there an api of symfony to manage this kind of things?
>
> > On 7 Ago, 08:22, Alan Bem  wrote: > You shouldn't change
> > database schema on "li...
>
> > > On Fri, Aug 7, 2009 at 5:50 AM, Alan Candido  wrote: > >
>
> > Hi, > > > I don't tried...
>
> > > > 2009/8/3 cosmy 
> > > > >> Hi all, > >>  I need to realize an application that let the
>
> > possibility to make > >> dynamic ...
--~--~-~--~~~---~--~~
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: dynamic tables/forms/models with symfony

2009-08-07 Thread cosmy

Ok, i think it could be a solution but.. how do i manage the
persistence of this data?
In other words, how do i save the data of these forms in the database?
Maybe as an unique string in a specific table ( in example:
[attribute: value | attribute2: value2] ) ?
but how do i manage the queries? i have to use LIKE or regexp and it
will be very slow to get out data of a specific type of entry, won't
it?

Is there an api of symfony to manage this kind of things?

On 7 Ago, 08:22, Alan Bem  wrote:
> You shouldn't change database schema on "livin' thing".
>
> Don't tread forms only as objects related with existing tables. Take my
> previous advise into consideration and create tables that could store your
> form schema and user inputs along with some module for visual designing
> those forms.
>
> Cheers, Alan
>
>
>
> On Fri, Aug 7, 2009 at 5:50 AM, Alan Candido  wrote:
> > Hi,
>
> > I don't tried, it is only an idea, create and run the
> > sfPropelGenerateAdminTask class ou some similar thing.
>
> > PS Sorry my bad english
>
> > 2009/8/3 cosmy 
>
> >> Hi all,
> >>  I need to realize an application that let the possibility to make
> >> dynamic forms and tables determinated by an admin in the backend
> >> interface of the site (not by command-line, it should be fool proof).
> >> Does symfony is able to do it or is it an hard and long hack?
>
> > --
> > [:>} Alan Cândido ><>
--~--~-~--~~~---~--~~
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: dynamic tables/forms/models with symfony

2009-08-06 Thread cosmy

Yes the forms must be connected because they are the interface for
filling the db tables.

The matter is that my admin users, through an admin panel of course,
should define on their own some tables (very simple tables, not
related each other) of the database. So i don't know the structure at
the beginning.
I've thought that through the admin panel the user should compile a
yml file and than the system could create the tables, the form ( i
want all the created tables editable ) and the model. But i don't know
if it's possibile, if it could be done dynamically without overwriting
anything, and if it's easy.

Have i been more clear?

On 3 Ago, 16:07, Alan Bem  wrote:
> Do you mean forms that are connected with those tables?
>
> If answer is yes... this is not the way. Instead, You can store your form
> data in well designed tables.
> Create your own sfFormVisual that will manage saving, editing and building
> visual representation of the form based on database data and of course some
> kind of frontend tool for users (Javascript w/ Ajax?).
>
> This will take some time, but it's doable.
>
>
>
> On Mon, Aug 3, 2009 at 12:29 PM, cosmy  wrote:
>
> > Hi all,
> >  I need to realize an application that let the possibility to make
> > dynamic forms and tables determinated by an admin in the backend
> > interface of the site (not by command-line, it should be fool proof).
> > Does symfony is able to do it or is it an hard and long hack?
--~--~-~--~~~---~--~~
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] dynamic tables/forms/models with symfony

2009-08-03 Thread cosmy

Hi all,
 I need to realize an application that let the possibility to make
dynamic forms and tables determinated by an admin in the backend
interface of the site (not by command-line, it should be fool proof).
Does symfony is able to do it or is it an hard and long hack?

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