[symfony-users] Using Swift_Mailer in sf 1.4

2010-05-27 Thread NOOVEO - Christophe Brun
Ladies  gentlemen, 
 
I'm stuck with some configuration issue (at least I guess it is one...).

 
I sent mails with the sfDoctrineApplyPlugin when a user registers, the
plugin uses ZendMail by default and things work as expected. 
In another module, I sue the default mailer for the application, hence
Swift_Mailer : 
 
 $mailer = $this-getMailer();
 $msg = $mailer-compose(
  array(sfConfig::get('app_mailer_email_from') =
sfConfig::get('app_mailer_email_fullname')),
  $this-commande-getUser()-getEmail(),
  sfConfig::get('app_mailer_sujet_devis'));
 $msg-setBody($this-renderMail($this-commande), 'text/html');
 $failures = array();
 $result = $mailer-send($msg, $failures);
 
$result is always set to 0 after this line and I don't understand why
Swift_Mailer thinks that the email address of the recipient is invalid
(yes, the address #is# valid !). 
I traced the code in Swift_Transport_AbstractSmtpTransport and I can see
that the _doMailTransaction() method fails at this line : 
 
  $this-_doRcptToCommand($forwardPath);

and throws an exception. 
 
Any idea will be welcome :o)

-- 
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] Exporting data to CSV (+Doctrine)

2010-04-28 Thread NOOVEO - Christophe Brun
Nope, listCsvReportSuccess.php, sorry for the typo. 

 
-Message d'origine-


So your action is called listCsvReport but your template is called
listCsvExportSuccess.php ?



-- 
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] manual ajax symfony 1.4

2010-04-27 Thread NOOVEO - Christophe Brun
Hola neoslink, 

I'm not sure to understand your question... The way symfony behaves regarding 
database operations is exactly the same, whether you activate your scripts with 
AJAX or a standard (synchronous) request. If you're looking for a tutorial 
about implementing AJAX itself in symfony, you should check the Jobeet tutorial 
as a starting point : 
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/18

And, of course, the jQuery documentation. 


-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de neoslink
Envoyé : lundi 26 avril 2010 21:05
À : symfony users
Objet : [symfony-users] manual ajax symfony 1.4

hola soy nuevo en symfony y lo que me hace falta es comprender como funciona 
toda la parte de inserciones consultas y eliminaciones de symfony a mysql por 
medio de ajax, y seria de gran ayuda si alguien tuviese un tutorial ya que eh 
estado navegando toda la tarde y no encuentro nada.


gracias de ante mano.

--
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] doSelect array result converted to ArrayDecorator in template

2010-04-23 Thread NOOVEO - Christophe Brun
In your template, the real array in $var is protected (for output safety 
purposes) by an sfOutputEscaperArrayDecorator. You can still access to the 
original (array) data with $var-getRawValues(). 

-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Joshua
Envoyé : jeudi 22 avril 2010 23:24
À : symfony users
Objet : [symfony-users] doSelect array result converted to ArrayDecorator in 
template


symfony version 1.4.4

In the action class I'm doing

$this-var = ClassPeer::doSelect($c);

When I print_r($this-var) it is an array but in the indexSuccess.php template 
it is sfOutputEscaperArrayDecorator Object

In the template when I try to
unset($var[$x]);

I get escape error
[22-Apr-2010 21:06:49] Cannot unset values.


WTF?

--
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] Routing + action : object lost in translation

2010-04-23 Thread NOOVEO - Christophe Brun
Ladies and gentlemen, 
 
I'm having again some trouble with the routing in symfony and I'm stuck.
Any help would be appreciated. 
Here is the problem : 
 
1/ My logs shows the following line, indicating that the url clicked is
parsed : 
Apr 23 15:50:02 symfony [info] {sfPatternRouting} Match route
vitrine_remove_paragraphe (/vitrine/removeParagraphe/:id_paragraphe)
for /vitrine/removeParagraphe/196 with parameters array (  'module' =
'vitrine',  'action' = 'removeParagraphe',  'id_paragraphe' = '196',)
 
2/ The correct action is called : 
Apr 23 15:50:03 symfony [info] {vitrineActions} Call
vitrineActions-executeRemoveParagraphe()
 
3/ In my routing.yml, the route is declared like this : 
vitrine_remove_paragraphe:
  url: vitrine/removeParagraphe/:id_paragraphe
  class: sfDoctrineRoute
  options: { model: VitrineParagraphe, type: object }
  params: { module: vitrine, action: removeParagraphe }
  requirements: { id_paragraphe: \d+, sf_method: [DELETE] }

so I expect symfony to pass a VitrineParagraphe object with id 196 to
the action. 
 
Unfortunately, the log also shows this : 
Apr 23 15:50:03 symfony [info] {Doctrine_Connection_Mysql} query :
SELECT v.id AS v__id, v.vitrine_id AS v__vitrine_id, v.libelle AS
v__libelle, v.rang AS v__rang, v.created_at AS v__created_at,
v.updated_at AS v__updated_at FROM vitrine_paragraphe v - ()

The request has been passed as if my params were declaring a list, not
an object. And of course, when I call
 
$this-getRoute()-getObject() 
 
in my action, I retrieve the first VitrineParagraphe object in the list,
which is of course not the one I want to delete. 
 
The odd point is that I'm using this exact pattern on another module and
it works. 
So : what am I doing wrong here ? 
 
 
 

 
 

-- 
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] Routing + action : object lost in translation

2010-04-23 Thread NOOVEO - Christophe Brun
Well, after all I found the solution : it's a mismatching in the columns names 
: in the VitrineParagraph model, the key is 'id', not 'id_paragraphe'. 
Sorry... 
 
 


De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de NOOVEO - Christophe Brun
Envoyé : vendredi 23 avril 2010 18:00
À : symfony-users@googlegroups.com
Objet : [symfony-users] Routing + action : object lost in translation


Ladies and gentlemen, 
 
I'm having again some trouble with the routing in symfony and I'm stuck. Any 
help would be appreciated. 
Here is the problem : 
 
1/ My logs shows the following line, indicating that the url clicked is parsed 
: 
Apr 23 15:50:02 symfony [info] {sfPatternRouting} Match route 
vitrine_remove_paragraphe (/vitrine/removeParagraphe/:id_paragraphe) for 
/vitrine/removeParagraphe/196 with parameters array (  'module' = 'vitrine',  
'action' = 'removeParagraphe',  'id_paragraphe' = '196',)
 
2/ The correct action is called : 
Apr 23 15:50:03 symfony [info] {vitrineActions} Call 
vitrineActions-executeRemoveParagraphe()
 
3/ In my routing.yml, the route is declared like this : 
vitrine_remove_paragraphe:
  url: vitrine/removeParagraphe/:id_paragraphe
  class: sfDoctrineRoute
  options: { model: VitrineParagraphe, type: object }
  params: { module: vitrine, action: removeParagraphe }
  requirements: { id_paragraphe: \d+, sf_method: [DELETE] }

so I expect symfony to pass a VitrineParagraphe object with id 196 to the 
action. 
 
Unfortunately, the log also shows this : 
Apr 23 15:50:03 symfony [info] {Doctrine_Connection_Mysql} query : SELECT v.id 
AS v__id, v.vitrine_id AS v__vitrine_id, v.libelle AS v__libelle, v.rang AS 
v__rang, v.created_at AS v__created_at, v.updated_at AS v__updated_at FROM 
vitrine_paragraphe v - ()

The request has been passed as if my params were declaring a list, not an 
object. And of course, when I call
 
$this-getRoute()-getObject() 
 
in my action, I retrieve the first VitrineParagraphe object in the list, which 
is of course not the one I want to delete. 
 
The odd point is that I'm using this exact pattern on another module and it 
works. 
So : what am I doing wrong here ? 
 
 
 

 
 

-- 
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] Colum alias in an aggregate query / Doctrine

2010-04-17 Thread NOOVEO - Christophe Brun
After the Doctrine documentation,
http://www.doctrine-project.org/documentation/manual/1_2/en/dql-doctrine
-query-language:select-queries:aggregate-values
I'm trying a query like this : 
 
$vp = Doctrine_Query::create()
  -select('MAX(v.rang) AS max_rang')
  -from('VitrineParagraphe v')
  -where('v.vitrine_id = ?', $vitrineId)
  -execute();
 
The executed query, is after the logs : 
SELECT MAX(v.rang) AS v__0 FROM vitrine_paragraphe v WHERE (v.vitrine_id
= ?) - (17)
 
and of course, the further $vp-max_rang used to retrieve the desired
value fails. 
Any ideas why the alias is not set ? 
 

-- 
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] Colum alias in an aggregate query / Doctrine

2010-04-17 Thread NOOVEO - Christophe Brun
Hi Andrei, 
most unfortunately, it doesn't work either. My alias is still v__0 :o(
 



De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Andrei Dziahel
Envoyé : samedi 17 avril 2010 17:08
À : symfony-users@googlegroups.com
Objet : Re: [symfony-users] Colum alias in an aggregate query / Doctrine


hi. 


-select('MAX(v.rang) AS max_rang, v.*') should do the job.


Alias is not set because there's nothing to attach alias to. Because only 
one column is fetched by SELECT - an aggregate column itself.


2010/4/17 NOOVEO - Christophe Brun c.b...@nooveo.fr


After the Doctrine documentation, 
http://www.doctrine-project.org/documentation/manual/1_2/en/dql-doctrine-query-language:select-queries:aggregate-values
I'm trying a query like this : 
 
$vp = Doctrine_Query::create()
  -select('MAX(v.rang) AS max_rang')
  -from('VitrineParagraphe v')
  -where('v.vitrine_id = ?', $vitrineId)
  -execute();
 
The executed query, is after the logs : 
SELECT MAX(v.rang) AS v__0 FROM vitrine_paragraphe v WHERE 
(v.vitrine_id = ?) - (17)
 
and of course, the further $vp-max_rang used to retrieve the desired 
value fails. 
Any ideas why the alias is not set ? 
 



-- 
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 
mailto:symfony-users%2bunsubscr...@googlegroups.com 
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en





-- 
With the best regards, Andrei.


-- 
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] Strange Routing Behaviour

2010-04-14 Thread NOOVEO - Christophe Brun

Hi Lea. 

My guess is that symfony's routing is not responsible for this behaviour. AMOF, 
if your browser directs you to index.php or frontend_dev.php and if these files 
are well configured with some code like the following : 


require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
$configuration = 
ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false);

then there is no reason why you should display any page from any other 
application than the frontend one. 
I'd rather suspect some previous redirection, whether on your web server's 
initiative or after some directive found in the .htaccess, maybe a line like : 

RewriteRule ^([^.]+)$ $1.php [QSA]

? 


-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Lea Haensenberger
Envoyé : mercredi 14 avril 2010 11:30
À : symfony users
Objet : [symfony-users] Strange Routing Behaviour

Hi all,
I have the following apps and module in my project:
apps and their modules:
- admin
- frontend
 - retailer
 - ...
- retailer
 - retailer
 - ...

The frontend app is the default app.
When I enter the url project.lo/retailer it goes to the retailer module in the 
retailer app. Shouldn't that go the the retailer module in the frontend app? 
The retailer module in the retailer app should be accessed with 
project.lo/retailer/retailer. Or am I wrong?
Can someone explain to me that behavior and tell me, how I can fix
it besides renaming the modules or the app?

Thanks!

Cheers,
Lea

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

To unsubscribe, reply using remove me as the subject.


-- 
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] andWhereNotIn clause not working

2010-04-09 Thread NOOVEO - Christophe Brun
Hi everybody. 
 
Here are several Doctrine calls : 
 
These ones work (the request is compiled and processed with no errors) :

 
$q = Doctrine_Query::create()-from('Livre')-where(infos_aliga like
'%?%', 'something')-execute();
$q = Doctrine_Query::create()-from('Livre')-whereNotIn('id',
array(1,2,3))-execute();
$q = Doctrine_Query::create()-from('Livre')-andWhereNotIn('id',
array(1,2,3))-execute();
 
But this one fails with the following message : SQLSTATE[HY093]: Invalid
parameter number: number of bound variables does not match number of
tokens
 
$q = Doctrine_Query::create()-from('Livre')-where(infos_aliga like
'%?%', 'something'))-andWhereNotIn('id', array(1,2,3))-execute();
 
 
Any ideas of what I am doing wrong ? 



 
 

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

To unsubscribe, reply using remove me as the subject.


RE: [symfony-users] andWhereNotIn clause not working

2010-04-09 Thread NOOVEO - Christophe Brun
OK, found. The reason why the query throws an error is in the where clause. 
rewrting the query like this works : 
 
$q = Doctrine_Query::create()-from('Livre')-where(infos_aliga like ?, 
'%something%'))-andWhereNotIn('id', array(1,2,3))-execute();
 
BTW, I found the error while DOHing on very strange results I had with another 
similar query : the Doctrine_Collection obtained after and execute() was 49 
items long despite the fact that I only found 2 rows when running the SQL 
string (the one given in the logger-debug()) in MySQL Query Browser. The fact 
that the traces given by the debugger do not match the exact query passed to 
the database (and I have no idea what query was executed which retrieved those 
strange 49 rows...) is, to say the least, very confusing... 
 
 


De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de NOOVEO - Christophe Brun
Envoyé : vendredi 9 avril 2010 12:24
À : symfony-users@googlegroups.com
Objet : [symfony-users] andWhereNotIn clause not working


Hi everybody. 
 
Here are several Doctrine calls : 
 
These ones work (the request is compiled and processed with no errors) : 
 
$q = Doctrine_Query::create()-from('Livre')-where(infos_aliga like '%?%', 
'something')-execute();
$q = Doctrine_Query::create()-from('Livre')-whereNotIn('id', 
array(1,2,3))-execute();
$q = Doctrine_Query::create()-from('Livre')-andWhereNotIn('id', 
array(1,2,3))-execute();
 
But this one fails with the following message : SQLSTATE[HY093]: Invalid 
parameter number: number of bound variables does not match number of tokens
 
$q = Doctrine_Query::create()-from('Livre')-where(infos_aliga like '%?%', 
'something'))-andWhereNotIn('id', array(1,2,3))-execute();
 
 
Any ideas of what I am doing wrong ? 



 
 

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

To unsubscribe, reply using remove me as the subject.


RE: [symfony-users] Re: Customizing Doctrine's messages

2010-04-08 Thread NOOVEO - Christophe Brun
Hi saad, 
OK, I will look at this i18n process.  
Thanks for the tip ! 

-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de saad
Envoyé : mercredi 7 avril 2010 15:50
À : symfony users
Objet : [symfony-users] Re: Customizing Doctrine's messages

Hi Christophe,
You can define those messages in the french dictionary sf_admin.xml (in 
apps/MY_APP/i18n/fr/).

FYI: Those messages are outputted using the I18N (__()) helper. You can check 
admin/templates/templates/_flashes:
echo __($sf_user-getFlash('notice'), array(), 'sf_admin')

Also, Make sure that your default user culture is fr (or fr_FR, or fr_CA, 
or...).

For more info about the dictionary file format and the default culture, you can 
read the Day 19 of the practical Symfony guide:
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/19

Thanks,

On Apr 7, 6:45 am, NOOVEO - Christophe Brun c.b...@nooveo.fr
wrote:
 Hi everybody.

 When you save an object in your backend application, Doctrine 
 gracefully flashes a message like 'the object has been successfully 
 saved'. Same thing with newly created objects, deleted objects etc.

 I would like to change these messages (actually, my client is a french 
 speaker and of course english messages are not very friendly). I know 
 I can change them in the relevant file, namely :
 lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/default/t
 em plate/actions/processFormAction.php. But of course, modifying a 
 core lib file is the dirty way. So, what is the safe way to customize 
 these messages ?

 Regards,
 C.B.

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

To unsubscribe, reply using remove me as the subject.


-- 
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] Customizing Doctrine's messages

2010-04-07 Thread NOOVEO - Christophe Brun
Hi everybody. 
 
When you save an object in your backend application, Doctrine gracefully
flashes a message like 'the object has been successfully saved'. Same
thing with newly created objects, deleted objects etc. 
 
I would like to change these messages (actually, my client is a french
speaker and of course english messages are not very friendly). I know I
can change them in the relevant file, namely :
lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineModule/default/tem
plate/actions/processFormAction.php. But of course, modifying a core lib
file is the dirty way. So, what is the safe way to customize these
messages ? 
 
Regards, 
C.B.

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

To unsubscribe, reply using remove me as the subject.


RE: [symfony-users] access object from validator

2010-04-06 Thread NOOVEO - Christophe Brun
Hi. I'm #far# from mastering Symfony but here are my two cents. I would say 
that validators are not intented to know anything else than the bunch of values 
to clean and validate, hence I don't see any way for them to know the form's 
object. But the form has access to all the values you need : tainted values, 
cleaned values, his object. Hence, I suppose that you should process your 
comparisons somewhere in the form's method, maybe doBind() or doUpdateObject(). 


-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Mihai Rusoaie
Envoyé : jeudi 1 avril 2010 10:44
À : symfony users
Objet : [symfony-users] access object from validator

Hello, all!

Is there any way to access my object (the one before the form post) from a 
sfValidatorSchema ?

When I had my validator inside the Form.class.php file, I could access the 
object with $this-getObject(), but from the sfValidatorSchema class I cannot 
access it like this.

I need to compare the submitted values from a form with the previous values. Is 
there any other way to do this than to access the original object from the 
validator?

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

To unsubscribe, reply using remove me as the subject.


-- 
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] return redirect() breaks the code ?

2010-03-30 Thread NOOVEO - Christophe Brun
I want to catch some exceptions in my actions and to display nice and
informative messages for my users. 
 
class utilisateursActions extends autoUtilisateursActions {
public function executeDelete(sfWebRequest $request) {
   try {
  // do stuff...
  sfContext::getInstance()-getLogger()-err(__METHOD__. ligne
.__LINE__); // line 50
  return $this-redirect('@avalidroute');
   }
   catch(Exception $x) {
  sfContext::getInstance()-getLogger()-err(__METHOD__. ligne
.__LINE__); // line 54
  $this-getUser()-setFlash('error', 'KO');
   }
}
}
 
Unfortunately, the flash and the log tells me that the code goes through
50, redirects to the required route, AND goes on to line 54 + flashes
the error. 
 
I already knew that $action-redirect() has the side effect (very
unfortunate as all side effects are IMHO) to break the standard flow of
code, that's why you must return $action-redirect() instead. 
But what if return $obj-redirect() also breaks the flow ? 
Or am I missing some elephant hidden in my kitchen ? 

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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


RE: [symfony-users] Re: Using subqueries under Doctrine

2010-03-17 Thread NOOVEO - Christophe Brun
Yep, I already spotted the 2 last link but they were of no help. But I didn't 
found the first link, which is the one I needed.  
Thanks for the link ! 

-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Tom Ptacnik
Envoyé : mercredi 17 mars 2010 07:27
À : symfony users
Objet : [symfony-users] Re: Using subqueries under Doctrine

Did you try to google it?


http://www.symfony-project.org/cookbook/1_2/en/retrieving_data_with_doctrine#chapter_f6fc97d827760d5157133eaf9798ddaf_sub_queries
http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language:subqueries
http://groups.google.com/group/doctrine-user/browse_thread/thread/cfa13d4beebaccaf


On 15 bře, 17:44, NOOVEO - Christophe Brun c.b...@nooveo.fr wrote:
 I'm trying to create a query like this one :

 select commande_id, statut_commande_id, id from historique_commande h 
 where h.id = (select max(j.id) from historique_commande j where 
 j.commande_id = h.commande_id group by j.commande_id) having 
 h.statut_commande_id = 1 ;

 This is to be used as a table_method for a backend list.

 I tried this :
 $alias = $q-getRootAlias();
 $q-where($alias.id = (select max(j.id) from historique_commande j 
 where j.commande_id = $alias.commande_id group by j.commande_id))
   -having($alias.StatutsCommandes.statut_commande_id = ?, 
 StatutCommande::DEMANDE_DEVIS);

 but it fails : error 500, couldn't find class j.

 And :
 $alias = $q-getRootAlias();
 $q-where($alias.id = (select max(id) from historique_commande where 
 commande_id = $alias.commande_id group by commande_id))
   -having($alias.StatutsCommandes.statut_commande_id = ?, 
 StatutCommande::DEMANDE_DEVIS);

 leads to : error 500, unknown colum commande_id.

 I'm stuck with this, any help would be greatly appreciated !

--
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] Using subqueries under Doctrine

2010-03-15 Thread NOOVEO - Christophe Brun
I'm trying to create a query like this one : 
 
select commande_id, statut_commande_id, id from historique_commande h
where h.id = (select max(j.id) from historique_commande j where
j.commande_id = h.commande_id group by j.commande_id)
having h.statut_commande_id = 1
;
 
This is to be used as a table_method for a backend list. 
 
I tried this : 
$alias = $q-getRootAlias();
$q-where($alias.id = (select max(j.id) from historique_commande j
where j.commande_id = $alias.commande_id group by j.commande_id))
  -having($alias.StatutsCommandes.statut_commande_id = ?,
StatutCommande::DEMANDE_DEVIS);

but it fails : error 500, couldn't find class j. 
 
And : 
$alias = $q-getRootAlias();
$q-where($alias.id = (select max(id) from historique_commande where
commande_id = $alias.commande_id group by commande_id))
  -having($alias.StatutsCommandes.statut_commande_id = ?,
StatutCommande::DEMANDE_DEVIS);

leads to : error 500, unknown colum commande_id. 
 
I'm stuck with this, any help would be greatly appreciated !

-- 
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] Routing problem with sfGuardUserProfile

2010-03-10 Thread NOOVEO - Christophe Brun
I'm trying to use sfDoctrineApplyPlugin, I have been asked to display 2
backend pages : one to handle administrators, the other one to handle
other users. 
I have generated 2 modules on the backend side. 
 
In routing.yml, the 2 routes are identical : 
utilisateurs:
  class: sfDoctrineRouteCollection
  options:
model:sfGuardUserProfile
module:   utilisateurs
prefix_path:  /utilisateurs
column:   id
with_wildcard_routes: true
 
administrateurs:
  class: sfDoctrineRouteCollection
  options:
model:sfGuardUser
module:   administrateurs
prefix_path:  /administrateurs
column:   id
with_wildcard_routes: true
 
In both config/generator.yml, the params are also identical : 
(utilisateurs)
  class: sfDoctrineGenerator
  param:
model_class:   sfGuardUserProfile
theme: admin
non_verbose_templates: true
with_show: false
singular:  ~
plural:~
route_prefix:  utilisateurs
with_doctrine_route:   true
actions_base_class:sfActions
 
(administrateurs)
  class: sfDoctrineGenerator
  param:
model_class:   sfGuardUser
theme: admin
non_verbose_templates: true
with_show: false
singular:  ~
plural:~
route_prefix:  administrateurs
with_doctrine_route:   true
actions_base_class:sfActions
 
 
But the behaviour of the application is not the same : if I try to list
the 'utilisateurs' backend page, symfony throws a routing error : 
The /utilisateurs/:id.:sf_format route has some missing mandatory
parameters
 
An url like backend_dev.php/utilisateurs/6/edit throws the same error. 
Any idea of what I am missing here ? 

-- 
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 can I save null values with Doctrine

2010-03-08 Thread NOOVEO - Christophe Brun
My table has a varchar(13) field which can be null. 
 
schema.yml : 
myfield: { type: string(13), default: null }
 
When I create a new object using the related form, the object is
recorded in the database with an empty string, not with a null value. 
How can I force Doctrine to set a null value here ? 

-- 
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] Using a customized table_method on sfGuardUser

2010-03-01 Thread NOOVEO - Christophe Brun
I'm working on the backend side of a web application, with the
sfDoctrineGuardPlugin. 
In sfGuardUser/config/generator.yml, I add the line : 
  list:
table_method: retrieveAdminsList
 
and in the model : 
class sfGuardUserTable extends PluginsfGuardUserTable {
public function retrieveAdminsList(Doctrine_Query $q) {
   $rootAlias = $q-getRootAlias();
   $q-leftJoin($rootAlias.'.groups g');
   return $q;
}
}
 
The generated SQL is : 
SELECT s.id AS s__id, s.username AS s__username, s.algorithm AS
s__algorithm, s.salt AS s__salt, s.password AS s__password, s.is_active
AS s__is_active, s.is_super_admin AS s__is_super_admin, s.last_login AS
s__last_login, s.created_at AS s__created_at, s.updated_at AS
s__updated_at, s2.id AS s2__id, s2.name AS s2__name, s2.description AS
s2__description, s2.created_at AS s2__created_at, s2.updated_at AS
s2__updated_at FROM sf_guard_user s LEFT JOIN sf_guard_user_group s3 ON
(s.id = s3.user_id) LEFT JOIN sf_guard_group s2 ON s2.id = s3.group_id
WHERE s.id IN ('16', '1', '3')
 
I don't understand why this 
WHERE s.id IN ('16', '1', '3')
is appended to the request. 
 
NB : 1, 3, 16 are the 3 ids registered in the sf_guard_user table. 
 
Moreover, this behaviour leads to an incorrect  request if I want to
display only administrators : 

class sfGuardUserTable extends PluginsfGuardUserTable {
public function retrieveAdminsList(Doctrine_Query $q) {
   $rootAlias = $q-getRootAlias();
   $q-leftJoin($rootAlias.'.groups g')
   -andWhere('g.id = ?', sfGuardUserGroup::ADMIN);
   return $q;
}
}
 
Generated SQL : 
SELECT s.id AS s__id, s.username AS s__username, s.algorithm AS
s__algorithm, s.salt AS s__salt, s.password AS s__password, s.is_active
AS s__is_active, s.is_super_admin AS s__is_super_admin, s.last_login AS
s__last_login, s.created_at AS s__created_at, s.updated_at AS
s__updated_at, s2.id AS s2__id, s2.name AS s2__name, s2.description AS
s2__description, s2.created_at AS s2__created_at, s2.updated_at AS
s2__updated_at FROM sf_guard_user s LEFT JOIN sf_guard_user_group s3 ON
(s.id = s3.user_id) LEFT JOIN sf_guard_group s2 ON s2.id = s3.group_id
WHERE s.id IN ('1') AND (s2.id = 1)
!! 
 
s2.id = 1 is OK, this is my filter.
But s.id IN ('1') is wrong. 
 
What did I miss here ? How can I configure the module to display only
one specific group of users ? 

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

2010-02-19 Thread NOOVEO - Christophe Brun
I'm not sure since I'm still a beginner on symfony and doctrine, but if your 
variable is a Doctrine_Collection, I would try something like : 

$it = $amigos_miembro-getIterator();
while($it-next()) {
  do_stuff();
}


-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Javier Garcia
Envoyé : vendredi 19 février 2010 10:50
À : symfony users
Objet : [symfony-users] Re: Is there anyway to go to the next element in a 
Doctrine collection?

No idea about this?

Javi

On Feb 17, 9:44 pm, Javier Garcia tirengar...@gmail.com wrote:
 Maybe this time the image is attached correctly..:)..

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

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

  Cheers,

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

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

      I wrote this below inside the loop:

      ?php next($amigos_miembro) ?

      But it doesn't work..

      Javi

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

      next($my_collection); should work

      Cheers,

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

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

          Hi,

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

           foreach ($friends as $friend) { ?

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

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

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

          ?php }       ?

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

          Regards

          Javi

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

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

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

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



  grid.jpg
 36KViewDownload

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



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



[symfony-users] How can I configure a route for a module using a 2-columns key ?

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

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

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

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


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



[symfony-users] Filtering a list from the action

2010-02-15 Thread NOOVEO - Christophe Brun
I am working on the 'list' view of a module. 
The filtered list is displayed via a call to the executeFilter() method, as 
usual. 
 
Now, I create a route and the appropriate method myModuleActions : 
 
public function executeUseMyFilter(sfWebRequest $request) {
$id = $this-getRoute()-getObject()-getId();

// force the filter value to myotherobj_id = #the id in the route //
// ?? //

 return $this-executeFilter($request);
}
 
But I can't find the way to modify the filters and to force the exceuteFilter() 
method to display only the list of objects having myotherobj_id = $id. 
 

 
 


De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Javier Garcia
Envoyé : lundi 15 février 2010 14:23
À : symfony-users@googlegroups.com
Objet : [symfony-users] Trying to give a default value to a filter form


Hi,

im trying to give a default value to a field of a filter.

I have no problems giving a default value to a form this way:

$m = new Birthday();
$m-setName('Peter');
$this-filter = new BirthdayForm($m);

But when i try this:

$m = new Birthday();
$m-setName('Peter');
$this-filter = new BirthdayFormFilter($m);

this error appears:

Warning: array_merge() [function.array-merge 
http://rs.localhost/frontend_dev.php/function.array-merge ]: Argument #2 is 
not an array in 
/opt/lampp/htdocs/rs/lib/vendor/symfony/lib/form/sfForm.class.php on line 1023

Any idea?

Javi


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

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



RE: [symfony-users] Edit form with a plain text input + save action : incorrect routing under Apache

2010-02-12 Thread NOOVEO - Christophe Brun
Autoreply to this post, in case the tip could help other developpers stuck on 
this. 

I eventually gained access to the Apache logs on the sever and spotted this 
line : 
[Fri Feb 12 09:52:05 2010] [error] [client 193.251.184.33] ModSecurity: Access 
denied with code 501 (phase 2). Pattern match ^(?:ht|f)tp:/ at 
ARGS:phrase_jour[lien]. [file 
/etc/modsecurity/modsecurity_crs_42_tight_security.conf] [line 32] [id 
950117] [msg Remote File Inclusion Attack] [severity CRITICAL] [hostname 
nooveo.atelierjmd.fr] [uri /backend_dev.php/phrasejour/1] [unique_id 
S3UWtVPzFKkAAEnVLsoL]

After some search on the Web, this bug seems to be related to the Apache + 
mod_security combination, and to the rules used by this firewall. Some 
references here if needed : 

http://www.linuxquestions.org/questions/linux-server-73/apache-modsecurity-fixing-false-positives-613609/
http://beginlinux.com/blog/2009/05/getting-started-with-modsecurity/
http://www.mighty-studio.net/wp-content/uploads/2008/12/securiser-les-applications-web-de-l-entreprise.pdf
The later for french speakers. 

Regards, 
CB


-Message d'origine-
De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de NOOVEO - Christophe Brun
Envoyé : mardi 9 février 2010 17:22
À : symfony-users@googlegroups.com
Objet : [symfony-users] Edit form with a plain text input + save action : 
incorrect routing under Apache

I'm working on the backend side of a web application. The backend has been 
generated via doctrine:generate-admin. I have a simple objet with a plain url 
attribute declared as : 
url: { type: string(128) }
in schema.yml. 

On the edit page, if the user type any text not begining by 'http:/' and clicks 
the SAVE button, the data is saved and the user is redirected to
: 
http://mysite/backend.php/mymodule/1/edit
That's OK. 

But if he types and saves a text begining by 'http:/', no data is saved and he 
is redirected to : 
http://mysite/backend.php/mymodule/1
This incorrect route launches a 'Method Not Implemented, POST to
/backend.php/mymodule/1 not supported.' error. 

This behaviour shows under Linux (Debian) + Apache. On my local PC (windows XP 
+ Apache), I don't have such errors. 
I don't have a single idea about a way to fix 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



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



[symfony-users] How may I add HTML code to a generated form field ?

2010-02-10 Thread NOOVEO - Christophe Brun
I'm still working on a backend form of my app. The form has several
input fields, one of them allows the user to type an identifier pointing
to an object stored on an external database. Let's call this field
ExternalId (string 25). 
Now, I have to add a button after the input field to allow the user to
click it and to check whether the identifier is valid or not (plus some
other stuff...). 

I checked the _form_field.php partial for this Form but I don't see how
I can customize my field. I also checked the sfWidget but I still don't
ctach the point. If somebody could point me to the right direction, I
may save a lot of time. 

NB : the form I'm customizing is also used as embedded form. The button
shall be added on both flavours of the form. 


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



RE: [symfony-users] Admin generator without CSS

2010-02-09 Thread NOOVEO - Christophe Brun
You should run the 
plugin:publish-assets
task from your CLI to fix that



De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Samuel Morhaim
Envoyé : mardi 9 février 2010 16:21
À : symfony-users@googlegroups.com
Objet : [symfony-users] Admin generator without CSS


Hi,

I am just testing a bit the admin generator on sf 1.4 and it shows completly 
without any CSS.. so I looked at the source code and it is pointing to CSS on 
the sfDoctrinePlugin , of course it can't find it...

Any ideas how to fix it?  I thought doctrine was included ?


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

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



[symfony-users] Edit form with a plain text input + save action : incorrect routing under Apache

2010-02-09 Thread NOOVEO - Christophe Brun
I'm working on the backend side of a web application. The backend has
been generated via doctrine:generate-admin. I have a simple objet with a
plain url attribute declared as : 
url: { type: string(128) }
in schema.yml. 

On the edit page, if the user type any text not begining by 'http:/' and
clicks the SAVE button, the data is saved and the user is redirected to
: 
http://mysite/backend.php/mymodule/1/edit
That's OK. 

But if he types and saves a text begining by 'http:/', no data is saved
and he is redirected to : 
http://mysite/backend.php/mymodule/1
This incorrect route launches a 'Method Not Implemented, POST to
/backend.php/mymodule/1 not supported.' error. 

This behaviour shows under Linux (Debian) + Apache. On my local PC
(windows XP + Apache), I don't have such errors. 
I don't have a single idea about a way to fix 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-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] Embedded forms and embedde relations problem

2010-02-05 Thread NOOVEO - Christophe Brun
I'm trying to use embedded forms on such a schema as : 

News:
  actAs: { Timestampable: ~ }
  columns:
titre: { type: string(125), notnull: true }
texte: { type: string() }
date_News: { type: date(25), notnull: true }
actif: { type: boolean, notnull: true, default: true }

Book:
  actAs: { Timestampable: ~ }
  columns:
News_id: { type: integer(4) }
ean13: { type: string(13), notnull: true }
cmd_dedicace: { type: boolean, notnull: true, default: false }
actif: { type: boolean, notnull: true, default: true }
  relations:
News:
  alias:News
  foreignType:  many
  foreignAlias: Books
  onDelete: cascade

One News can have many Book. 
Thus, I embed an BookForm in the NewsForm like this : 

class NewsForm extends BaseNewsForm {
public function configure() {
$actuLivre = new Book();
$actu = $this-getObject();
$actuLivre-setNews($actu);

$addBookForm = new BookForm($actuLivre);
$this-embedForm('add_book', $addBookForm);
$this-embedRelation('Books');
Etc...

and the embedded form has : 

class BookForm extends BaseBookForm {
public function configure() {
$this-widgetSchema['News_id'] = new sfWidgetFormInputHidden();
Etc...
}
}

Now, if I try to create a new News and to add an Book in one step, I
have this error: 
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'News_id'
cannot be null

Any idea of what I am missing here ? 


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