[symfony-users] [sf2] Trying to import resources (routing)

2011-06-10 Thread Javier Garcia
Hi,

I'm gettin this error:

Cannot import resource 'UserBundle/Resources/config/routing/
registration.xml' from '/home/me/Symfony/app/config/routing.yml'.

This is my

user_registration:
resource: UserBundle/Resources/config/routing/registration.xml
prefix: /register

I've extracted the FOSUserBunle here:

/home/me/Symfony/vendor/bundles/FOS/UserBundle

Any idea?

Javi

-- 
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: [sf2] Trying to import resources (routing)

2011-06-10 Thread Javier Garcia
Thanks, but the error is the same.

On Jun 10, 1:18 pm, Michael Holm ho...@hollo.dk wrote:
 Hi,

 I think you are missing an @ before you resource.. does it help?

 Best regards,
 Michael Holm







 On Fri, Jun 10, 2011 at 1:17 PM, Javier Garcia tirengar...@gmail.com wrote:
  Hi,

  I'm gettin this error:

  Cannot import resource 'UserBundle/Resources/config/routing/
  registration.xml' from '/home/me/Symfony/app/config/routing.yml'.

  This is my

  user_registration:
     resource: UserBundle/Resources/config/routing/registration.xml
     prefix: /register

  I've extracted the FOSUserBunle here:

  /home/me/Symfony/vendor/bundles/FOS/UserBundle

  Any idea?

  Javi

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

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

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

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


[symfony-users] Re: Trying to import resources (routing)

2011-06-10 Thread Javier Garcia
Thanks Cristophe, that worked! Don't you think you should correct the
documentation (index.rst)?

-- 
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: Trying to import resources (routing)

2011-06-10 Thread Javier Garcia
Well, it's not bad documented: the line you mention it is written also
in index.rst, but before this paragraph

The login form and all the routes used to create a user and reset the
password
have to be available to unauthenticated users but using the same
firewall as
the pages you want to securize with the bundle. Assuming you import
the
registration.xml routing file with the ``/register`` prefix and
resetting.xml
with the ``/resetting`` prefix they will be::

maybe could be mention how the resources should be imported
(/@FOSUserBundle/Resources/config/routing/registration.xml)...:).

Javi

On Jun 10, 1:34 pm, Javier Garcia tirengar...@gmail.com wrote:
 Thanks Cristophe, that worked! Don't you think you should correct the
 documentation (index.rst)?

-- 
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] Question about security in sf2

2011-06-06 Thread Javier Garcia
Hi,

in the section of security of the sf2's manual there is this
configuration:

security:
firewalls:
secured_area:
pattern:^/
anonymous: ~
http_basic:
realm: Secured Demo Area

access_control:
- { path: ^/admin, roles: ROLE_ADMIN }

providers:
in_memory:
users:
ryan:  { password: ryanpass, roles: 'ROLE_USER' }
admin: { password: kitten, roles: 'ROLE_ADMIN' }

encoders:
Symfony\Component\Security\Core\User\User: plaintext


And about that configuration is written this:

Any URL matching /admin/* is secured, and only the admin user can
access it;

but..where is that define exactly?

Second question: can someone explain me about what is exactly
anonymous parameter?

Regards

Javi

-- 
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: Question about security in sf2

2011-06-06 Thread Javier Garcia
On Jun 6, 5:10 pm, Christophe COEVOET s...@notk.org wrote:

 This is defined in the access_control section which requires having the
 ROLe_ADMIN role to access all url starting by /admin (and the provider
 section tells you that the admin user has this role).


Thanks C, But the access_control section is about the authorization,
not about the security, isn't it?

I repeat my question..The manual says:

Any URL matching /admin/* is secured, and only the admin user can
access it;

In what line/s exactly is defined that?

Javi

-- 
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: Question about security in sf2

2011-06-06 Thread Javier Garcia
Thanks for your effort C :), I want to ask you something more:

If authentication is defined in the section firewalls, why do you
say the line /- { path: ^/admin, roles: ROLE_ADMIN }/  becomes this
sentence: Any URL matching /admin/* is secured, and only the admin
user can access it. ???

Javi

On Jun 6, 5:42 pm, Christophe COEVOET s...@notk.org wrote:
 Le 06/06/2011 17:31, Javier Garcia a �crit :

  On Jun 6, 5:10 pm, Christophe COEVOETs...@notk.org  wrote:

  This is defined in the access_control section which requires having the
  ROLe_ADMIN role to access all url starting by /admin (and the provider
  section tells you that the admin user has this role).

  Thanks C, But the access_control section is about the authorization,
  not about the security, isn't it?

  I repeat my question..The manual says:

  Any URL matching /admin/* is secured, and only the admin user can
  access it;

  In what line/s exactly is defined that?

  Javi

 Well, authorization is part of the security (and it requires the
 authentication first). And as I said, this is defined by the
 access_control section by this line:

 /- { path: ^/admin, roles: ROLE_ADMIN }/

 --
 Christophe | Stof

-- 
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: Question about security in sf2

2011-06-06 Thread Javier Garcia
On Jun 6, 6:10 pm, Christophe COEVOET s...@notk.org wrote:

 the firewall section defines the authentication, not the authorization.

Yes I know that.

My question is:

If authentication is defined in the section firewalls (as the manual
says), why do you
say the line /- { path: ^/admin, roles: ROLE_ADMIN }/  becomes this
sentence: Any URL matching /admin/* is secured, and only the admin
user can access it. ???

Javi

-- 
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: Trying to generate entities (doctrine)

2011-05-26 Thread Javier Garcia
Thanks that worked!

On May 25, 11:09 pm, Pierre p...@pierre-minnieur.de wrote:
 I bet the following will result in a could not guess where to put the
 classes in error:

     php app/console doctrine:generate:entities Jander\\CalendarBundle

 But this should work right now:

     php app/console doctrine:generate:entities --path=src
 Jander\\CalendarBundle

-- 
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] Trying to generate entities (doctrine)

2011-05-25 Thread Javier Garcia
Hi,

I'm using this command:

php app/console doctrine:generate:entities ClanderBundle

and I'm getting this error:

[ErrorException]
Notice: Undefined index: Jander\ClanderBundle\Entity\Jander
\ClanderBundle\Entity\User in /home/me/Symfony/vendor/doctrine/lib/
Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php line 121

In src/Jander/ClanderBundle/Resources/config/doctrine/
Jander.ClanderBundle.Entity.User.orm.yml I have this:

Acme\HelloBundle\Entity\User:
type: entity
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
name:
type: string
length: 255

Any idea?

sf2

Javi

-- 
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: Trying to generate entities (doctrine)

2011-05-25 Thread Javier Garcia
Thanks Christophe but now I'm getting this:

Namespace ClanderBundle does not contain any mapped entities.

This is my what I have in /src/Jander/ClanderBundle/Resources/config/
doctrine/User.orm.yml

Jander\ClanderBundle\Entity\User:
type: entity
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
name:
type: string
length: 255

I removed my old /src/Jander/ClanderBundle/Resources/config/doctrine/
metadata/orm/Jander.ClanderBundle.Entity.User.dcm.yml/ and clean the
cache.

Javi


On May 25, 5:18 pm, Christophe COEVOET s...@notk.org wrote:
 Le 25/05/2011 17:15, Javier Garcia a �crit :

  Hi,

  I'm using this command:

  php app/console doctrine:generate:entities ClanderBundle

  and I'm getting this error:

  [ErrorException]
  Notice: Undefined index: Jander\ClanderBundle\Entity\Jander
  \ClanderBundle\Entity\User in /home/me/Symfony/vendor/doctrine/lib/
  Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php line 121

  In src/Jander/ClanderBundle/Resources/config/doctrine/
  Jander.ClanderBundle.Entity.User.orm.yml I have this:

  Acme\HelloBundle\Entity\User:
       type: entity
       table: user
       id:
           id:
               type: integer
               generator:
                   strategy: AUTO
       fields:
           name:
               type: string
               length: 255

  Any idea?

  sf2

  Javi

 The mapping file path is wrong. If you are using beta1 or older it
 should be
 /src/Jander/ClanderBundle/Resources/config/doctrine/metadata/orm/Jander.ClanderBundle.Entity.User.dcm.yml/

 And if you use beta2 it should be
 /src/Jander/ClanderBundle/Resources/config/doctrine/User.orm.yml/

 --
 Christophe | Stof

-- 
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] Fatal error: Cannot redeclare class...

2011-05-23 Thread Javier Garcia
Hi,

I have downloaded this PayPal API:

https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PHP_SOAP_SDK.tar.gz

And I'm getting this error:

Fatal error: Cannot redeclare class SOAP_Client in /home/me/app1/
plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
line 83

The strange thing is: if I change the name of the class to what ever
else, for example SOAP_Client_foo, I get

Fatal error: Cannot redeclare class SOAP_Client_foo in /home/me/app1/
plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
line 83

So I removed the content in Client.php and wrote this:

pre
?php
debug_print_backtrace();
?
/pre
hr /

And this is the output:

#0  require() called at [/home/me/app1/lib/vendor/symfony/lib/autoload/
sfAutoload.class.php:188]
#1  sfAutoload-loadClass(SOAP_Client) called at [/home/me/app1/lib/
vendor/symfony/lib/autoload/sfAutoload.class.php: 163]
#2  sfAutoload-autoload(SOAP_Client)
#4  spl_autoload_call(SOAP_Client) called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/CallerServices.php:36]
#5  PayPal-getWSDLVersion() called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:126]
#6  Profile-loadEnvironments() called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:104]
#7  Profile-_load() called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/API.php:328]
#8  APIProfile::getInstance(, ProfileHandler_Array...

Any help?

sf 1.4

Javi

-- 
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: Fatal error: Cannot redeclare class...

2011-05-23 Thread Javier Garcia
Well, I just want to add that when I type .../paypal$ grep -R
'Client.php' *, and I'm getting this:

PayPal/CallerServices.php://require_once 'PayPal/SOAP/Client.php';
PayPal/SOAP/Client.php:// $Id: Client.php,v 1.1.1.1 2006/02/19
PayPal/SOAP/WSDL.php: //require_once 'PayPal/SOAP/Client.php

Javi

On May 23, 11:45 am, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I have downloaded this PayPal API:

 https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PHP_SO...

 And I'm getting this error:

 Fatal error: Cannot redeclare class SOAP_Client in /home/me/app1/
 plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
 line 83

 The strange thing is: if I change the name of the class to what ever
 else, for example SOAP_Client_foo, I get

 Fatal error: Cannot redeclare class SOAP_Client_foo in /home/me/app1/
 plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
 line 83

 So I removed the content in Client.php and wrote this:

 pre
 ?php
     debug_print_backtrace();
 ?
 /pre
 hr /

 And this is the output:

 #0  require() called at [/home/me/app1/lib/vendor/symfony/lib/autoload/
 sfAutoload.class.php:188]
 #1  sfAutoload-loadClass(SOAP_Client) called at [/home/me/app1/lib/
 vendor/symfony/lib/autoload/sfAutoload.class.php: 163]
 #2  sfAutoload-autoload(SOAP_Client)
 #4  spl_autoload_call(SOAP_Client) called at [/home/me/app1/plugins/
 mbpPlatformFrontendPlugin/lib/paypal/PayPal/CallerServices.php:36]
 #5  PayPal-getWSDLVersion() called at [/home/me/app1/plugins/
 mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:126]
 #6  Profile-loadEnvironments() called at [/home/me/app1/plugins/
 mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:104]
 #7  Profile-_load() called at [/home/me/app1/plugins/
 mbpPlatformFrontendPlugin/lib/paypal/PayPal/API.php:328]
 #8  APIProfile::getInstance(, ProfileHandler_Array...

 Any help?

 sf 1.4

 Javi

-- 
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] About the order of autoloading

2011-05-18 Thread Javier Garcia
Hi,

I'm getting this error:

Declaration of PayPal::raiseError() should be compatible with that of
PEAR::raiseError()

These are PayPal::raiseError() and PEAR::raiseError() respectively:

function raiseError($message = null,
 $code = null,
 $mode = null,
 $options = null,
 $userinfo = null,
 $error_class = null,
 $skipmsg = false)
{


class PayPal extends PEAR
{
function raiseError($message, $code = null)
{
return parent::raiseError($message, $code, null, null, null,
'PayPal_Error');
}


I have found also this:

http://bugs.php.net/bug.php?id=46851
http://www.devnetwork.net/viewtopic.php?f=19t=79211

The problem is maybe the class PEAR.php is been loading before
Paypal.php? How to control that in symfony?

sf 1.4

Javi

-- 
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] No Metadata Classes to process when trying to create the schema.

2011-05-12 Thread Javier Garcia
Hi,

after doing php app/console doctrine:schema:create I'm getting the
message No Metadata Classes to process..

My steps are just these:

- Download sf2, create the bundle Jander/ClarBlundle.
- Create Jander/ClarBundle/Resources/config/doctrine/
Jander.ClarBundle.Entity.User.orm.dcm.yml with this content:

Jander\ClarBundle\Entity\User:
type: entity
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
name:
type: string
length: 255

I don't have any problems with doctrine:database:create.

Any idea?

sf2 beta1.

Javier

-- 
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: No Metadata Classes to process when trying to create the schema.

2011-05-12 Thread Javier Garcia
 On Thu, May 12, 2011 at 5:51 PM, Christophe COEVOET s...@notk.org wrote:

  Or place it in Resources/config/doctrine/metadata/orm/ and remove the .orm
  part if you are using beta1


I did that but now when I do schema:create I get:

PHP Warning:  class_parents(): Class Jander\ClarBundle\Entity\User
does not exist and could not be loaded in /home/me/programacion/
Symfony/vendor/doctrine/lib/Doctrine/ORM/Mapping/
ClassMetadataFactory.php on line 222
...

[ReflectionException]
Class Jander\ClarBundle\Entity\User does not exist



Javier

-- 
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: No Metadata Classes to process when trying to create the schema.

2011-05-12 Thread Javier Garcia
But I change the location and I'm getting that ReflectionException (in
my second post)..or maybe I don't understand..

On May 12, 12:41 pm, Christophe COEVOET s...@notk.org wrote:
 Le 12/05/2011 12:31, Zolzaya Erdenebaatar a crit : Can you put your code 
 please?

 no need to put the code. I still gave the answer: the location of the
 mapping file is wrong.

 --
 Christophe | Stof

-- 
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: Symfony2 returning a JSON object

2011-05-12 Thread Javier Garcia


On May 12, 1:51 pm, Christophe COEVOET s...@notk.org wrote:

 the render method is not about creating a response. It is about creating
 a response *with a content set by a template*.

Yes, but.. why not implement render() to create responses whose
*content could be 'anything' (JSON data for example, you know, beyond
the templates..)* ??

It's just a proposal. I know that it now works in the way you say.

Javi

-- 
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: R: Functional test: how to set JSON data in a POST method?

2011-04-28 Thread Javier Garcia
Thanks Massimiliano, you're right. I found the example below here
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/09:

$browser-
  get('/')-
  click('Design')-
  get('/category/programming?page=2')-
  get('/category/programming', array('page' = 2))-
  post('search', array('keywords' = 'php'));


but in the action, I'm retrieving the JSON data through $request-
getContent(). So, if I write the JSON data as an associative
array ,as in the example I have pasted, and then run the test, the
call to $request-getContent() returns NULL, (of course, if I use
normal browser like FF, $request-getContent() returns the JSON data
correctly) ...

Any help?


On Apr 22, 3:21 pm, Massimiliano Arione garak...@gmail.com wrote:
 Il giorno giovedì 21 aprile 2011 17:48:41 UTC+2, Javier Garcia ha scritto:



  I want to create a functional test for an action that receives a POST
  method with data in JSON format.

  This is what I have:

    info('set car')-
    post('/user/'.$user-getId().'/set-car/'.$car-getId()'-

    with('request')-ifFormat('json')-begin()-
      isParameter('module', 'myModule')-
      isParameter('action', 'myAction')-
    end()-

  But..where should I set the receiving json data?

  sf 1.4

 You should pass data as second argument to post()

 cheers
 Massimiliano

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

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


[symfony-users] symfony: trying to run all the tests of an app.

2011-04-21 Thread Javier Garcia
Hi,

I'm trying to launch all the functional tests of an app, but when I do
it, I get this:

[mbpPlatformApi]
functionaldistritoActionsTest...dubious
Test returned status 255
Failed tests: 0
[mbpPlatformApi]
functionaleventoActionsTest..dubious
Test returned status 255
Failed tests: 0

Failed Test Stat  Total   Fail  Errors  List of
Failed
--
 functionaldistritoActionsTest255  1  1  0  0
pi] functionaleventoActionsTest   255  1  1  0  0
pi]
Failed 10/10 test scripts, 0.00% okay. 10/0 subtests failed, 0.00%
okay.

No problem if I run the tests separatelly.

Any idea?

sf 1.4

Regards

Javi

-- 
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: Changing the validator of an embedded form field

2011-04-07 Thread Javier Garcia
On Mar 27, 1:01 am, Javier Garcia tirengar...@gmail.com wrote:


 But.. why if paginas has a validator-pass?


Well, I have learned the validatorPass doesn't mean it always passes
validation...Now I have change my code but it neither works...This is
my new code:

var_dump($this-embeddedForms['Libro']-validatorSchema['newLibro1']
['paginas']);
$this-embeddedForms['Libro']-validatorSchema['newLibro1']['paginas']
= new sfValidatorPass(array('required' = false));
var_dump($this-embeddedForms['Libro']-validatorSchema['newLibro1']
['paginas']);

It prints this:

object(sfValidatorString)[152]
  protected 'requiredOptions' =
array
  empty
  protected 'defaultMessages' =
array
  'required' = string 'Required.' (length=9)
  'invalid' = string 'Invalid.' (length=8)
  'max_length' = string '%value% is too long (%max_length%
characters max).' (length=52)
  'min_length' = string '%value% is too short (%min_length%
characters min).' (length=53)
  protected 'defaultOptions' =
array
  'required' = boolean true
  'trim' = boolean false
  'empty_value' = string '' (length=0)
  'max_length' = null
  'min_length' = null
  protected 'messages' =
array
  'required' = string 'Required.' (length=9)
  'invalid' = string 'Invalid.' (length=8)
  'max_length' = string '%value% is too long (%max_length%
characters max).' (length=52)
  'min_length' = string '%value% is too short (%min_length%
characters min).' (length=53)
  protected 'options' =
array
  'required' = boolean true
  'trim' = boolean false
  'empty_value' = string '' (length=0)
  'max_length' = int 255
  'min_length' = null

object(sfValidatorPass)[196]
  protected 'requiredOptions' =
array
  empty
  protected 'defaultMessages' =
array
  'required' = string 'Required.' (length=9)
  'invalid' = string 'Invalid.' (length=8)
  protected 'defaultOptions' =
array
  'required' = boolean true
  'trim' = boolean false
  'empty_value' = null
  protected 'messages' =
array
  'required' = string 'Required.' (length=9)
  'invalid' = string 'Invalid.' (length=8)
  protected 'options' =
array
  'required' = boolean false   FALSE

  'trim' = boolean false
  'empty_value' = null

The problem is still the same: when i try to submit the form, the
field 'paginas is still required. Why?

Javi

-- 
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 do something after user is authorized

2011-04-06 Thread Javier Garcia
Could you give more details, please?

On Apr 6, 1:33 pm, Azat a3at.m...@gmail.com wrote:
 How can I update some field in DB (i.e. Last time of login) ?

-- 
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] Symfony + CMS

2011-03-30 Thread Javier Garcia
Hi,

someone to tell me what pros and cons combining symfony with drupal?
Should i use better any other CMS based on symfony (sympal,
diem,...) ? What is your experience?

Bye

Javi

-- 
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] Trying to set a form field value before saving the form

2011-03-15 Thread Javier Garcia
Hi,

I have a many-to-many relationship (User-UserGroup-Group). When I
generate the User form class I find a field called user_group_list
that is is showed in a module based on User model.

As I read here below, it is possible to set the value of a field
before saving the form:

http://groups.google.com/group/symfony-users/browse_thread/thread/390b0efff76c74da

So I created this function:

updateUserGroupList(){
  return array(1,2)
}

but when I submit the form it doesn't create a UserGroup row...

The user_group_list has two elements with the values 1 and 2 that i
created in the fixtures file. I put inside that function a
die(entro) and entro is showed.

Any idea?

sf 1.4/propel 1.6

Javi

-- 
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] Question about a .css file that is not loaded in all the pages of the backend.

2011-03-14 Thread Javier Garcia
Hi,

I have this file apps/backend/config/view.yml.

default:
  http_metas:
content-type: text/html

  metas:
#title:symfony project
#description:  symfony project
#keywords: symfony, project
#language: en
#robots:   index, follow

  stylesheets:[backend.css]

  javascripts:[]

  has_layout: true
  layout: layout

But the file web/backend.css it is not loaded in all pages of the
backend.

Any idea?

sf 1.4/propel 1.6

Javier

-- 
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: Question about a .css file that is not loaded in all the pages of the backend.

2011-03-14 Thread Javier Garcia
Yes, i have included  ?php include_stylesheets() ? in the layout.

What is a [-background] directive?

Just if I include backend.css in the view.yml of the module it is
loaded.

Javier

On Mar 14, 1:26 pm, Gábor Fási maerl...@gmail.com wrote:
 Do you have include_stylesheets in your layout? Any of your view.ymls
 contain a [-background] directive?

 On Mon, Mar 14, 2011 at 12:03, Javier Garcia tirengar...@gmail.com wrote:
  Hi,

  I have this file apps/backend/config/view.yml.

  default:
   http_metas:
     content-type: text/html

   metas:
     #title:        symfony project
     #description:  symfony project
     #keywords:     symfony, project
     #language:     en
     #robots:       index, follow

   stylesheets:    [backend.css]

   javascripts:    []

   has_layout:     true
   layout:         layout

  But the file web/backend.css it is not loaded in all pages of the
  backend.

  Any idea?

  sf 1.4/propel 1.6

  Javier

  --
  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] 1:1 relation, is there any way to show the colums of the daughter model just writing in the generator?

2011-03-11 Thread Javier Garcia
Hi,

for example I have created with symfony a module based on sfGuardUser.
Now, in the list of elements of that module I want to show the
sfGuardUserProfile columns (name, surname..).

I know i can create a query, but is there any way just writing in the
generator?

sf 1.4/propel 1.6

Javi

-- 
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] 1:m and m:m relations: give some information about the associated elements in the backend list.

2011-03-10 Thread Javier Garcia
Hi,

I have created a module using the sfGuardUser model. I'd like to show
in the list of the backend of that module, the groups that a user
belongs to.

I know the backend is not initially prepared for that, but is there
any plugin or any other way to do easily?

sf 1.4/propel 1.6

Javier

-- 
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] Trying to set a field in executeUpdate()

2011-03-09 Thread Javier Garcia
Hi,

I have just generated a module and I'm trying to set the value of a
field before saving it this way:

  public function executeUpdate(sfWebRequest $request)
  {

$this-process = $this-getRoute()-getObject();
$this-form = $this-configuration-getForm($this-process);

$this-form['user_process_list'] = array(1,2); //this is my code

but I'm getting this error:

Cannot update form fields.

So, how can i set it?

sf 1.4

Javier

-- 
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: sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-03-07 Thread Javier Garcia
http://trac.symfony-project.org/ticket/8171

what to do when someone has assigned a ticket since 1 year and it has
not been resolved or deleted?

On Mar 1, 7:27 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi again..

 I'm following the tutorial/snippet I mentioned before.

 I have followed it, but when the form is showed, it shows the word
 Array inside the autocompletion field.

 Any idea?

 On Mar 1, 5:22 pm, Javier Garcia tirengar...@gmail.com wrote:

  I just wanted to add taht in that snippet tags_list is not a casual
  name, is the name of the field generated by symfony that shows the
  elements of the other side of the relation. In that way you will
  overwrite it. I'm missing a comment like that in the snippet.

  On Mar 1, 5:20 pm, Javier Garcia tirengar...@gmail.com wrote:

   I found this snippet maybe will be usefull:

  http://snippets.symfony-project.org/snippets/from/antitoxic/order_by/...

   On Feb 28, 10:40 am, Javier Garcia tirengar...@gmail.com wrote:

Alex, what do you mean with It's maybe more along the lines of a
feature that
would be nice to have. Sorry because my english..

On 26 Feb, 20:27, Alex Pilon alex.pi...@gmail.com wrote:

 I don't think its a bug. It's maybe more along the lines of a feature 
 that
 would be nice to have.

 Maybe try 
 thishttp://www.symfony-project.org/plugins/sfDoctrineFBAutocompletePlugin

 On Sat, Feb 26, 2011 at 11:23, Javier Garcia tirengar...@gmail.com 
 wrote:
  Ok, now I understand how this widget works..When you create this 
  kind
  of widget, it actually creates two fields: autocomplete_my_field 
  (the
  field that is showed and where you insert the data (values of the
  array elements) and my_field (a hidden field, where the keys are
  inserted).

  This widget works ok when you insert only an element but when you
  insert more than an element the key of the elements are overwritten
  (the id of the second element overwrites the id of the the first 
  one,
  the id of the third element overwrites the id of the second
  one, ), so you can not retrieve all them. So it's a bug I 
  think..

  Javier

  On Feb 24, 4:27 pm, Javier Garcia tirengar...@gmail.com wrote:
   Hi,

   i have this widget :

       $this-widgetSchema['user']  = new sfWidgetFormChoice(array(
         'choices'          = array(),
         'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
         'renderer_options' = array('url' = 'autocomplete', 
   'config' =
   '{ multiple:true }'),
       ));

   And this is the autocomplete function:

     public function executeAutocomplete($request)
     {

       $this-getResponse()-setContentType('application/json');

       $q = % . $request-getParameter('q') . %;

       $limit = $request-getParameter('limit');

       //Criteria code

       return $this-renderText(json_encode($cli));

     }

   that returns this (Response tab in Firebug):

   {17:John,18:Ann}   //the numbers are the values in the id
   field.

   Then i choose both names in the autocomplete input this way:

   [John, Peter]

   When i submit the form, the getPostParameters() method returns 
   this:

   array
     'example' =
       array
         'id' = string '' (length=0)
         '_csrf_token' = string
   '388774046d0f5c8b4a3f114ddb15af7b' (length=32)
         'user' = string '18' (length=2)
     'autocomplete_example' =
       array
         'user' = string 'John, Ann, '

   So what should i do to retrieve the id's of the users?

   sf 1.4.

   Javier

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

 --
 Alex Pilon
 (613) 608-1480

-- 
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] Trying to unset a field before saving it, using offsetUnset()

2011-03-07 Thread Javier Garcia
Hi,

I'm trying to unset a field before saving it, exactly in the
executeCreate() function generated by sf. I'm using this:

$this-configuration-getForm()-getWidgetSchema()-
offsetUnset('clienti');
var_dump($this-configuration-getForm()-getWidgetSchema());

But after that the field clients is still there:

object(sfWidgetFormSchema)[180]
  protected 'formFormatters' =
array
  empty
  protected 'fields' =
array
  'id' =
object(sfWidgetFormInputHidden)[211]
  protected 'parent' =
object(sfWidgetFormSchema)[180]
  protected 'requiredOptions' =
array
  ...
  protected 'attributes' =
array
  ...
  protected 'options' =
array
  ...
  'name' =
object(sfWidgetFormInputText)[212]
  protected 'parent' =
object(sfWidgetFormSchema)[180]
  protected 'requiredOptions' =
array
  ...
  protected 'attributes' =
array
  ...
  protected 'options' =
array
  ...
  'clients' =
object(sfWidgetFormInputText)[184]
  protected 'parent' =
object(sfWidgetFormSchema)[180]
  protected 'requiredOptions' =
array
  ...
  protected 'attributes' =
array
  ...
  protected 'options' =
array
  ...
  '_csrf_token' =
object(sfWidgetFormInputHidden)[203]
  protected 'parent' =
object(sfWidgetFormSchema)[180]
  protected 'requiredOptions' =
array
  ...
  protected 'attributes' =
array
  ...
  protected 'options' =
array
  ...

Any idea?

sf 1.4

Javi

-- 
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: Trying to unset a field before saving it, using offsetUnset()

2011-03-07 Thread Javier Garcia
Well I mean $this-configuration-getForm()-getWidgetSchema()-
offsetUnset('clients');

On Mar 7, 7:40 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I'm trying to unset a field before saving it, exactly in the
 executeCreate() function generated by sf. I'm using this:

     
 $this-configuration-getForm()-getWidgetSchema()-offsetUnset('clienti');

     var_dump($this-configuration-getForm()-getWidgetSchema());

 But after that the field clients is still there:

 object(sfWidgetFormSchema)[180]
   protected 'formFormatters' =
     array
       empty
   protected 'fields' =
     array
       'id' =
         object(sfWidgetFormInputHidden)[211]
           protected 'parent' =
             object(sfWidgetFormSchema)[180]
           protected 'requiredOptions' =
             array
               ...
           protected 'attributes' =
             array
               ...
           protected 'options' =
             array
               ...
       'name' =
         object(sfWidgetFormInputText)[212]
           protected 'parent' =
             object(sfWidgetFormSchema)[180]
           protected 'requiredOptions' =
             array
               ...
           protected 'attributes' =
             array
               ...
           protected 'options' =
             array
               ...
       'clients' =
         object(sfWidgetFormInputText)[184]
           protected 'parent' =
             object(sfWidgetFormSchema)[180]
           protected 'requiredOptions' =
             array
               ...
           protected 'attributes' =
             array
               ...
           protected 'options' =
             array
               ...
       '_csrf_token' =
         object(sfWidgetFormInputHidden)[203]
           protected 'parent' =
             object(sfWidgetFormSchema)[180]
           protected 'requiredOptions' =
             array
               ...
           protected 'attributes' =
             array
               ...
           protected 'options' =
             array
               ...

 Any idea?

 sf 1.4

 Javi

-- 
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] Remember: how to create a Doctrine project in symfony 1.2?

2011-03-02 Thread Javier Garcia
Hi,

someone can remember how to create a Doctrine project in symfony 1.2?

Regards

Javi

-- 
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: Remember: how to create a Doctrine project in symfony 1.2?

2011-03-02 Thread Javier Garcia
Thanks! anyway it's necessary write something like this in
databases.yml.


dev:
  doctrine:
class: sfDoctrineDatabase
param:
  dsn: mysql:host=localhost;dbname=prueba2;
  username: symfony
  password: 

On Mar 2, 11:43 am, Gábor Fási maerl...@gmail.com wrote:
 Remember has nothing to do with it, when you have the documentation.

 public function setup()
 {
   $this-enablePlugins(array('sfDoctrinePlugin'));
   $this-disablePlugins(array('sfPropelPlugin'));

 }
 On Wed, Mar 2, 2011 at 10:29, Javier Garcia tirengar...@gmail.com wrote:
  Hi,

  someone can remember how to create a Doctrine project in symfony 1.2?

  Regards

  Javi

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

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

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

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


[symfony-users] Re: Remember: how to create a Doctrine project in symfony 1.2?

2011-03-02 Thread Javier Garcia
Sorry..I was in a hurry..

On Mar 2, 2:36 pm, Gareth McCumskey gmccums...@gmail.com wrote:
 What do you need to remember? Go read!

 On 02/03/2011 11:29, Javier Garcia wrote:

  Hi,

  someone can remember how to create a Doctrine project in symfony 1.2?

  Regards

  Javi

-- 
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: sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-03-01 Thread Javier Garcia
I found this snippet maybe will be usefull:

http://snippets.symfony-project.org/snippets/from/antitoxic/order_by/popularity

On Feb 28, 10:40 am, Javier Garcia tirengar...@gmail.com wrote:
 Alex, what do you mean with It's maybe more along the lines of a
 feature that
 would be nice to have. Sorry because my english..

 On 26 Feb, 20:27, Alex Pilon alex.pi...@gmail.com wrote:

  I don't think its a bug. It's maybe more along the lines of a feature that
  would be nice to have.

  Maybe try 
  thishttp://www.symfony-project.org/plugins/sfDoctrineFBAutocompletePlugin

  On Sat, Feb 26, 2011 at 11:23, Javier Garcia tirengar...@gmail.com wrote:
   Ok, now I understand how this widget works..When you create this kind
   of widget, it actually creates two fields: autocomplete_my_field (the
   field that is showed and where you insert the data (values of the
   array elements) and my_field (a hidden field, where the keys are
   inserted).

   This widget works ok when you insert only an element but when you
   insert more than an element the key of the elements are overwritten
   (the id of the second element overwrites the id of the the first one,
   the id of the third element overwrites the id of the second
   one, ), so you can not retrieve all them. So it's a bug I think..

   Javier

   On Feb 24, 4:27 pm, Javier Garcia tirengar...@gmail.com wrote:
Hi,

i have this widget :

    $this-widgetSchema['user']  = new sfWidgetFormChoice(array(
      'choices'          = array(),
      'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
      'renderer_options' = array('url' = 'autocomplete', 'config' =
'{ multiple:true }'),
    ));

And this is the autocomplete function:

  public function executeAutocomplete($request)
  {

    $this-getResponse()-setContentType('application/json');

    $q = % . $request-getParameter('q') . %;

    $limit = $request-getParameter('limit');

    //Criteria code

    return $this-renderText(json_encode($cli));

  }

that returns this (Response tab in Firebug):

{17:John,18:Ann}   //the numbers are the values in the id
field.

Then i choose both names in the autocomplete input this way:

[John, Peter]

When i submit the form, the getPostParameters() method returns this:

array
  'example' =
    array
      'id' = string '' (length=0)
      '_csrf_token' = string
'388774046d0f5c8b4a3f114ddb15af7b' (length=32)
      'user' = string '18' (length=2)
  'autocomplete_example' =
    array
      'user' = string 'John, Ann, '

So what should i do to retrieve the id's of the users?

sf 1.4.

Javier

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

  --
  Alex Pilon
  (613) 608-1480

-- 
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: sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-03-01 Thread Javier Garcia
I just wanted to add taht in that snippet tags_list is not a casual
name, is the name of the field generated by symfony that shows the
elements of the other side of the relation. In that way you will
overwrite it. I'm missing a comment like that in the snippet.

On Mar 1, 5:20 pm, Javier Garcia tirengar...@gmail.com wrote:
 I found this snippet maybe will be usefull:

 http://snippets.symfony-project.org/snippets/from/antitoxic/order_by/...

 On Feb 28, 10:40 am, Javier Garcia tirengar...@gmail.com wrote:

  Alex, what do you mean with It's maybe more along the lines of a
  feature that
  would be nice to have. Sorry because my english..

  On 26 Feb, 20:27, Alex Pilon alex.pi...@gmail.com wrote:

   I don't think its a bug. It's maybe more along the lines of a feature that
   would be nice to have.

   Maybe try 
   thishttp://www.symfony-project.org/plugins/sfDoctrineFBAutocompletePlugin

   On Sat, Feb 26, 2011 at 11:23, Javier Garcia tirengar...@gmail.com 
   wrote:
Ok, now I understand how this widget works..When you create this kind
of widget, it actually creates two fields: autocomplete_my_field (the
field that is showed and where you insert the data (values of the
array elements) and my_field (a hidden field, where the keys are
inserted).

This widget works ok when you insert only an element but when you
insert more than an element the key of the elements are overwritten
(the id of the second element overwrites the id of the the first one,
the id of the third element overwrites the id of the second
one, ), so you can not retrieve all them. So it's a bug I think..

Javier

On Feb 24, 4:27 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i have this widget :

     $this-widgetSchema['user']  = new sfWidgetFormChoice(array(
       'choices'          = array(),
       'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
       'renderer_options' = array('url' = 'autocomplete', 'config' =
 '{ multiple:true }'),
     ));

 And this is the autocomplete function:

   public function executeAutocomplete($request)
   {

     $this-getResponse()-setContentType('application/json');

     $q = % . $request-getParameter('q') . %;

     $limit = $request-getParameter('limit');

     //Criteria code

     return $this-renderText(json_encode($cli));

   }

 that returns this (Response tab in Firebug):

 {17:John,18:Ann}   //the numbers are the values in the id
 field.

 Then i choose both names in the autocomplete input this way:

 [John, Peter]

 When i submit the form, the getPostParameters() method returns this:

 array
   'example' =
     array
       'id' = string '' (length=0)
       '_csrf_token' = string
 '388774046d0f5c8b4a3f114ddb15af7b' (length=32)
       'user' = string '18' (length=2)
   'autocomplete_example' =
     array
       'user' = string 'John, Ann, '

 So what should i do to retrieve the id's of the users?

 sf 1.4.

 Javier

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

   --
   Alex Pilon
   (613) 608-1480

-- 
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: sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-03-01 Thread Javier Garcia
Hi again..

I'm following the tutorial/snippet I mentioned before.

I have followed it, but when the form is showed, it shows the word
Array inside the autocompletion field.

Any idea?


On Mar 1, 5:22 pm, Javier Garcia tirengar...@gmail.com wrote:
 I just wanted to add taht in that snippet tags_list is not a casual
 name, is the name of the field generated by symfony that shows the
 elements of the other side of the relation. In that way you will
 overwrite it. I'm missing a comment like that in the snippet.

 On Mar 1, 5:20 pm, Javier Garcia tirengar...@gmail.com wrote:

  I found this snippet maybe will be usefull:

 http://snippets.symfony-project.org/snippets/from/antitoxic/order_by/...

  On Feb 28, 10:40 am, Javier Garcia tirengar...@gmail.com wrote:

   Alex, what do you mean with It's maybe more along the lines of a
   feature that
   would be nice to have. Sorry because my english..

   On 26 Feb, 20:27, Alex Pilon alex.pi...@gmail.com wrote:

I don't think its a bug. It's maybe more along the lines of a feature 
that
would be nice to have.

Maybe try 
thishttp://www.symfony-project.org/plugins/sfDoctrineFBAutocompletePlugin

On Sat, Feb 26, 2011 at 11:23, Javier Garcia tirengar...@gmail.com 
wrote:
 Ok, now I understand how this widget works..When you create this kind
 of widget, it actually creates two fields: autocomplete_my_field (the
 field that is showed and where you insert the data (values of the
 array elements) and my_field (a hidden field, where the keys are
 inserted).

 This widget works ok when you insert only an element but when you
 insert more than an element the key of the elements are overwritten
 (the id of the second element overwrites the id of the the first one,
 the id of the third element overwrites the id of the second
 one, ), so you can not retrieve all them. So it's a bug I think..

 Javier

 On Feb 24, 4:27 pm, Javier Garcia tirengar...@gmail.com wrote:
  Hi,

  i have this widget :

      $this-widgetSchema['user']  = new sfWidgetFormChoice(array(
        'choices'          = array(),
        'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
        'renderer_options' = array('url' = 'autocomplete', 'config' 
  =
  '{ multiple:true }'),
      ));

  And this is the autocomplete function:

    public function executeAutocomplete($request)
    {

      $this-getResponse()-setContentType('application/json');

      $q = % . $request-getParameter('q') . %;

      $limit = $request-getParameter('limit');

      //Criteria code

      return $this-renderText(json_encode($cli));

    }

  that returns this (Response tab in Firebug):

  {17:John,18:Ann}   //the numbers are the values in the id
  field.

  Then i choose both names in the autocomplete input this way:

  [John, Peter]

  When i submit the form, the getPostParameters() method returns this:

  array
    'example' =
      array
        'id' = string '' (length=0)
        '_csrf_token' = string
  '388774046d0f5c8b4a3f114ddb15af7b' (length=32)
        'user' = string '18' (length=2)
    'autocomplete_example' =
      array
        'user' = string 'John, Ann, '

  So what should i do to retrieve the id's of the users?

  sf 1.4.

  Javier

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

--
Alex Pilon
(613) 608-1480

-- 
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: sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-02-28 Thread Javier Garcia
Alex, what do you mean with It's maybe more along the lines of a
feature that
would be nice to have. Sorry because my english..

On 26 Feb, 20:27, Alex Pilon alex.pi...@gmail.com wrote:
 I don't think its a bug. It's maybe more along the lines of a feature that
 would be nice to have.

 Maybe try 
 thishttp://www.symfony-project.org/plugins/sfDoctrineFBAutocompletePlugin



 On Sat, Feb 26, 2011 at 11:23, Javier Garcia tirengar...@gmail.com wrote:
  Ok, now I understand how this widget works..When you create this kind
  of widget, it actually creates two fields: autocomplete_my_field (the
  field that is showed and where you insert the data (values of the
  array elements) and my_field (a hidden field, where the keys are
  inserted).

  This widget works ok when you insert only an element but when you
  insert more than an element the key of the elements are overwritten
  (the id of the second element overwrites the id of the the first one,
  the id of the third element overwrites the id of the second
  one, ), so you can not retrieve all them. So it's a bug I think..

  Javier

  On Feb 24, 4:27 pm, Javier Garcia tirengar...@gmail.com wrote:
   Hi,

   i have this widget :

       $this-widgetSchema['user']  = new sfWidgetFormChoice(array(
         'choices'          = array(),
         'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
         'renderer_options' = array('url' = 'autocomplete', 'config' =
   '{ multiple:true }'),
       ));

   And this is the autocomplete function:

     public function executeAutocomplete($request)
     {

       $this-getResponse()-setContentType('application/json');

       $q = % . $request-getParameter('q') . %;

       $limit = $request-getParameter('limit');

       //Criteria code

       return $this-renderText(json_encode($cli));

     }

   that returns this (Response tab in Firebug):

   {17:John,18:Ann}   //the numbers are the values in the id
   field.

   Then i choose both names in the autocomplete input this way:

   [John, Peter]

   When i submit the form, the getPostParameters() method returns this:

   array
     'example' =
       array
         'id' = string '' (length=0)
         '_csrf_token' = string
   '388774046d0f5c8b4a3f114ddb15af7b' (length=32)
         'user' = string '18' (length=2)
     'autocomplete_example' =
       array
         'user' = string 'John, Ann, '

   So what should i do to retrieve the id's of the users?

   sf 1.4.

   Javier

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

 --
 Alex Pilon
 (613) 608-1480

-- 
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: sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-02-26 Thread Javier Garcia
Ok, now I understand how this widget works..When you create this kind
of widget, it actually creates two fields: autocomplete_my_field (the
field that is showed and where you insert the data (values of the
array elements) and my_field (a hidden field, where the keys are
inserted).

This widget works ok when you insert only an element but when you
insert more than an element the key of the elements are overwritten
(the id of the second element overwrites the id of the the first one,
the id of the third element overwrites the id of the second
one, ), so you can not retrieve all them. So it's a bug I think..

Javier

On Feb 24, 4:27 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i have this widget :

     $this-widgetSchema['user']  = new sfWidgetFormChoice(array(
       'choices'          = array(),
       'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
       'renderer_options' = array('url' = 'autocomplete', 'config' =
 '{ multiple:true }'),
     ));

 And this is the autocomplete function:

   public function executeAutocomplete($request)
   {

     $this-getResponse()-setContentType('application/json');

     $q = % . $request-getParameter('q') . %;

     $limit = $request-getParameter('limit');

     //Criteria code

     return $this-renderText(json_encode($cli));

   }

 that returns this (Response tab in Firebug):

 {17:John,18:Ann}   //the numbers are the values in the id
 field.

 Then i choose both names in the autocomplete input this way:

 [John, Peter]

 When i submit the form, the getPostParameters() method returns this:

 array
   'example' =
     array
       'id' = string '' (length=0)
       '_csrf_token' = string
 '388774046d0f5c8b4a3f114ddb15af7b' (length=32)
       'user' = string '18' (length=2)
   'autocomplete_example' =
     array
       'user' = string 'John, Ann, '

 So what should i do to retrieve the id's of the users?

 sf 1.4.

 Javier

-- 
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] sfWidgetFormJQueryAutocompleter: how to retrieve the keys of the selected elements?

2011-02-24 Thread Javier Garcia
Hi,

i have this widget :

$this-widgetSchema['user']  = new sfWidgetFormChoice(array(
  'choices'  = array(),
  'renderer_class'   = 'sfWidgetFormJQueryAutocompleter',
  'renderer_options' = array('url' = 'autocomplete', 'config' =
'{ multiple:true }'),
));

And this is the autocomplete function:

  public function executeAutocomplete($request)
  {

$this-getResponse()-setContentType('application/json');

$q = % . $request-getParameter('q') . %;

$limit = $request-getParameter('limit');

//Criteria code

return $this-renderText(json_encode($cli));

  }

that returns this (Response tab in Firebug):

{17:John,18:Ann}   //the numbers are the values in the id
field.

Then i choose both names in the autocomplete input this way:

[John, Peter]

When i submit the form, the getPostParameters() method returns this:

array
  'example' =
array
  'id' = string '' (length=0)
  '_csrf_token' = string
'388774046d0f5c8b4a3f114ddb15af7b' (length=32)
  'user' = string '18' (length=2)
  'autocomplete_example' =
array
  'user' = string 'John, Ann, '


So what should i do to retrieve the id's of the users?

sf 1.4.

Javier

-- 
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] Is there any way to set post parameters?

2011-02-23 Thread Javier Garcia
Hi,

is there any way to set post parameters?

When i submit a form I would like to set a variable (that I give a
value dinamically) as a post parameter.

Is that possible?

sf 1.4

Javi

-- 
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] Is sfWidgetFormPropelChoiceMany class deprecated in sf 1.4?

2011-02-21 Thread Javier Garcia
Hi,

is sfWidgetFormPropelChoiceMany class deprecated? why? what class
should i use?

Javier

-- 
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: Trying to send emails

2011-02-08 Thread Javier Garcia
No idea?

On Feb 7, 7:14 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I'm trying to send emails using this code:

      var_dump($this-getMailer()-composeAndSend(   //this outputs '0'
         'f...@example.com',
         'j.gar...@jander.eu',
         'Subject',
         'Body'
      ));

 The factories configuration is this (I have the same configuration in
 my project before and and the code above sends the email):

 all:
   mailer:
     class: sfMailer
     param:
       logging:           %SF_LOGGING_ENABLED%
       charset:           %SF_CHARSET%
       delivery_strategy: realtime
       transport:
         class: Swift_SmtpTransport
         param:
           host:       mail.jander.eu
           port:       25
           username:   i...@jander.eu
           password:   x

 This is the log:

 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
 sf_guard_password (/request_password)
 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
 sf_guard_do_password (/request_password/do)
 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
 sf_guard_forgot_password_reset_password (/reset_password/:key/:id)
 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
 sf_guard_signin (/login)
 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
 sf_guard_signout (/logout)
 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
 sf_guard_password (/request_password)
 Feb 07 18:09:55 symfony [info] {sfPatternRouting} Match route
 sf_guard_password (/request_password) for /request_password with
 parameters array (  'module' = 'sfGuardForgotPassword',  'action' =
 'password',)
 Feb 07 18:09:55 symfony [info] {sfFilterChain} Executing filter
 sfRenderingFilter
 Feb 07 18:09:55 symfony [info] {sfFilterChain} Executing filter
 sfExecutionFilter
 Feb 07 18:09:55 symfony [info] {sfGuardForgotPasswordActions} Call
 sfGuardForgotPasswordActions-executePassword()
 Feb 07 18:09:56 symfony [info] {sfMailerMessageLoggerPlugin} Sending
 email Subject to j.gar...@jander.eu
 Feb 07 18:09:56 symfony [info] {sfPHPView} Render /home/javier/
 programazione/sv_ok/apps/frontend/modules/sfGuardForgotPassword/
 templates/passwordSuccess.php
 Feb 07 18:09:56 symfony [info] {sfPHPView} Decorate content with /
 home/javier/programazione/sv_ok/apps/frontend/templates/layout.php
 Feb 07 18:09:56 symfony [info] {sfPHPView} Render /home/javier/
 programazione/sv_ok/apps/frontend/templates/layout.php
 Feb 07 18:09:56 symfony [info] {main} Call sfGuardAuth-executeSignin()

 Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
 programazione/sv_ok/apps/frontend/modules/sfGuardAuth/templates/
 _signin.php
 Feb 07 18:09:56 symfony [info] {main} Call default-executeHeader()
 Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
 programazione/sv_ok/apps/frontend/modules/default/templates/
 _header.php
 Feb 07 18:09:56 symfony [info] {main} Call default-executeMenuPrincipale()

 Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
 programazione/sv_ok/apps/frontend/modules/default/templates/
 _menuPrincipale.php
 Feb 07 18:09:56 symfony [info] {main} Call default-executeFooter()
 Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
 programazione/sv_ok/apps/frontend/modules/default/templates/
 _footer.php
 Feb 07 18:09:56 symfony [warning] {sfWebDebugLogger}  Warning at /home/
 javier/programazione/sv_ok/lib/vendor/symfony/lib/response/
 sfWebResponse.class.php on line 336 (Cannot modify header information
 - headers already sent by (output started at /home/javier/
 programazione/sv_ok/apps/frontend/modules/sfGuardForgotPassword/
 actions/actions.class.php:28))
 Feb 07 18:09:56 symfony [info] {sfWebResponse} Send status HTTP/1.1
 200 OK
 Feb 07 18:09:56 symfony [warning] {sfWebDebugLogger}  Warning at /home/
 javier/programazione/sv_ok/lib/vendor/symfony/lib/response/
 sfWebResponse.class.php on line 357 (Cannot modify header information
 - headers already sent by (output started at /home/javier/
 programazione/sv_ok/apps/frontend/modules/sfGuardForgotPassword/
 actions/actions.class.php:28))
 Feb 07 18:09:56 symfony [info] {sfWebResponse} Send header Content-
 Type: text/html; charset=utf-8
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Configuration 2.80
 ms (13)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Factories 14.09 ms
 (1)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Action
 sfGuardForgotPassword/password 178.64 ms (1)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} View Success for
 sfGuardForgotPassword/password 22.97 ms (1)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Component
 sfGuardAuth/signin 1.70 ms (1)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Partial sfGuardAuth/
 _signin 3.80 ms (1)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Component default/
 header 0.02 ms (1)
 Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Partial default/
 _header

[symfony-users] Re: Trying to send emails

2011-02-08 Thread Javier Garcia
Hi, my problem: no email is sent.


On Feb 8, 5:01 pm, stof s...@notk.org wrote:
 On Tue, 8 Feb 2011 06:21:36 -0800 (PST), Javier Garcia

 tirengar...@gmail.com wrote:
  No idea?

 Well, what is your problem exactly ? You don't ask any question in your
 previous mail.

 Thus, the logs say the mail is sent.

 --
 Christophe | Stof

-- 
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] Trying to send emails

2011-02-07 Thread Javier Garcia
Hi,

I'm trying to send emails using this code:

 var_dump($this-getMailer()-composeAndSend(   //this outputs '0'
'f...@example.com',
'j.gar...@jander.eu',
'Subject',
'Body'
 ));

The factories configuration is this (I have the same configuration in
my project before and and the code above sends the email):

all:
  mailer:
class: sfMailer
param:
  logging:   %SF_LOGGING_ENABLED%
  charset:   %SF_CHARSET%
  delivery_strategy: realtime
  transport:
class: Swift_SmtpTransport
param:
  host:   mail.jander.eu
  port:   25
  username:   i...@jander.eu
  password:   x

This is the log:

Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
sf_guard_password (/request_password)
Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
sf_guard_do_password (/request_password/do)
Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
sf_guard_forgot_password_reset_password (/reset_password/:key/:id)
Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
sf_guard_signin (/login)
Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
sf_guard_signout (/logout)
Feb 07 18:09:55 symfony [info] {sfPatternRouting} Connect sfRoute
sf_guard_password (/request_password)
Feb 07 18:09:55 symfony [info] {sfPatternRouting} Match route
sf_guard_password (/request_password) for /request_password with
parameters array (  'module' = 'sfGuardForgotPassword',  'action' =
'password',)
Feb 07 18:09:55 symfony [info] {sfFilterChain} Executing filter
sfRenderingFilter
Feb 07 18:09:55 symfony [info] {sfFilterChain} Executing filter
sfExecutionFilter
Feb 07 18:09:55 symfony [info] {sfGuardForgotPasswordActions} Call
sfGuardForgotPasswordActions-executePassword()
Feb 07 18:09:56 symfony [info] {sfMailerMessageLoggerPlugin} Sending
email Subject to j.gar...@jander.eu
Feb 07 18:09:56 symfony [info] {sfPHPView} Render /home/javier/
programazione/sv_ok/apps/frontend/modules/sfGuardForgotPassword/
templates/passwordSuccess.php
Feb 07 18:09:56 symfony [info] {sfPHPView} Decorate content with /
home/javier/programazione/sv_ok/apps/frontend/templates/layout.php
Feb 07 18:09:56 symfony [info] {sfPHPView} Render /home/javier/
programazione/sv_ok/apps/frontend/templates/layout.php
Feb 07 18:09:56 symfony [info] {main} Call sfGuardAuth-
executeSignin()
Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
programazione/sv_ok/apps/frontend/modules/sfGuardAuth/templates/
_signin.php
Feb 07 18:09:56 symfony [info] {main} Call default-executeHeader()
Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
programazione/sv_ok/apps/frontend/modules/default/templates/
_header.php
Feb 07 18:09:56 symfony [info] {main} Call default-
executeMenuPrincipale()
Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
programazione/sv_ok/apps/frontend/modules/default/templates/
_menuPrincipale.php
Feb 07 18:09:56 symfony [info] {main} Call default-executeFooter()
Feb 07 18:09:56 symfony [info] {sfPartialView} Render /home/javier/
programazione/sv_ok/apps/frontend/modules/default/templates/
_footer.php
Feb 07 18:09:56 symfony [warning] {sfWebDebugLogger}  Warning at /home/
javier/programazione/sv_ok/lib/vendor/symfony/lib/response/
sfWebResponse.class.php on line 336 (Cannot modify header information
- headers already sent by (output started at /home/javier/
programazione/sv_ok/apps/frontend/modules/sfGuardForgotPassword/
actions/actions.class.php:28))
Feb 07 18:09:56 symfony [info] {sfWebResponse} Send status HTTP/1.1
200 OK
Feb 07 18:09:56 symfony [warning] {sfWebDebugLogger}  Warning at /home/
javier/programazione/sv_ok/lib/vendor/symfony/lib/response/
sfWebResponse.class.php on line 357 (Cannot modify header information
- headers already sent by (output started at /home/javier/
programazione/sv_ok/apps/frontend/modules/sfGuardForgotPassword/
actions/actions.class.php:28))
Feb 07 18:09:56 symfony [info] {sfWebResponse} Send header Content-
Type: text/html; charset=utf-8
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Configuration 2.80
ms (13)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Factories 14.09 ms
(1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Action
sfGuardForgotPassword/password 178.64 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} View Success for
sfGuardForgotPassword/password 22.97 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Component
sfGuardAuth/signin 1.70 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Partial sfGuardAuth/
_signin 3.80 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Component default/
header 0.02 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Partial default/
_header 0.68 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Component default/
menuPrincipale 0.02 ms (1)
Feb 07 18:09:56 symfony [info] {sfWebDebugLogger} Partial default/

[symfony-users] Question about sfOutputEscaperArrayDecorator

2011-02-07 Thread Javier Garcia
Hi,

when i do a sfGuardUserPeer::doSelect(new Criteria()), i get an object
like this:

object(sfOutputEscaperArrayDecorator)[114]
  private 'count' = int 1
  protected 'value' =
array
  0 =
object(sfGuardUser)[108]
  protected 'profile' = null
  protected 'groups' = null
  protected 'permissions' = null
  protected 'allPermissions' = null
  protected 'id' = int 2
  protected 'username' = string 'sv (length=13)
  protected 'algorithm' = string 'sha1' (length=4)
  protected 'salt' = string
'473229c98974bde4977f318d65695b4f' (length=32)
  protected 'password' = string
'4ffdda9d9a980aa7d076911da05f717eff48907a' (length=40)
  protected 'created_at' = string '2011-02-07
18:51:40' (length=19)
  protected 'last_login' = null
  


As you can see what I get is an sfOutputEscaperArrayDecorator object.
But what does it serve for/is usefull? If I have to show the users
retrieved, I have to use allways getRaw()..

sf 1.4/propel

Regards

Javi

-- 
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] format_currency() adds an space before the number

2011-02-04 Thread Javier Garcia
Hi

when i do this:

var_dump(format_currency('1004.569'));

I get:

string ' 1.004,56' (length=10)

Notice that there is a space before the 1.

Any idea?

sf 1.4.

Javi

-- 
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] What are the URL for the pages using PropelPager ?

2011-01-20 Thread Javier Garcia
Hi,

I have an action with this code:

$c = new Criteria();
$c-addJoin(sfGuardUserProfilePeer::USER_ID,
sfGuardUserGroupPeer::USER_ID, Criteria::INNER_JOIN);
$c-add(sfGuardUserGroupPeer::GROUP_ID, 2 );

$this-pager = new PropelPager($c, 'sfGuardUserProfilePeer',
'doSelect', $page = 2, $rowsPerPage = 1);

And in the corresponding template this:

table
?php foreach ($pager-getResult() as $book): ?
  tr
td?php echo $book-getName() ?/td
td?php echo $book-getSurname() ?/td
  /tr
?php endforeach; ?
/table

When i call the action I get the first page with the first results,
but what is the URL for the page 2 ?

Thanks!

sf 1.4/pr 1.5

Javi

-- 
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: After installing sfPropel15Plugin: error when i try to build classes

2011-01-18 Thread Javier Garcia
Sorry, I was commeting/removing also this line below in config/
propel.ini:

propel.behavior.default = symfony,symfony_i18n

Javier


On Jan 17, 10:15 pm, Gabriel Petchesi pghora...@gmail.com wrote:
 Check the autoloader cache, it's found in cache/.
 In my app is cache/frontend/dev/config/config_autoload.yml.php
 Look for a class related to Propel like sfpropelroute and make sure the path
 listed there is the one from the
 plugins/sfPropel15Plugin/lib/routing/sfPropelRoute.class.php.
 If it's something different than it means the classes are not found for some
 reason.

    gabriel

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

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


[symfony-users] Re: After installing sfPropel15Plugin: error when i try to build classes

2011-01-17 Thread Javier Garcia
?php

require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/
sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
//$this-enablePlugins('sfPropelPlugin');
$this-enablePlugins('sfPropel15Plugin');
  }
}

And I did plugin:publish-assets.

Javier

On Jan 13, 5:53 pm, Gabriel Petchesi pghora...@gmail.com wrote:
 Do you have propel 1.5 plugin activated in
 config/ProjectConfiguration.class.php ?
 The getUniqueColumnNames() shows up with propel 1.5 and was not available
 with propel 1.4 shiped with Symfony (double check this).

     gabriel

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

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


[symfony-users] Many to many relationship: complete iteration.

2011-01-17 Thread Javier Garcia
Hi,

I have a many-to-many relationship between two tables.

I would like to show the elements of a table with the corresponding
elements of the other table.

For example:

user1-group2
   group5
user2-group1
   group3
   group4
...

In an easy and smart way, of course.

sf 1.4/propel 1.4.

Any advice or tutorial?

Javi

-- 
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: Many to many relationship: complete iteration.

2011-01-17 Thread Javier Garcia
I used a join and I get the objects from the exchange table, so if I
iterate it I get:

user1-group2
user1-group5
user2-group1
user2-group3
user2-group4

But I'm wondering how could i get the group objects from the user
objects...


On Jan 17, 11:04 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I have a many-to-many relationship between two tables.

 I would like to show the elements of a table with the corresponding
 elements of the other table.

 For example:

 user1-group2
        group5
 user2-group1
        group3
        group4
 ...

 In an easy and smart way, of course.

 sf 1.4/propel 1.4.

 Any advice or tutorial?

 Javi

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

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


[symfony-users] How to hide the label of the object actions in the backend list?

2011-01-13 Thread Javier Garcia
Hi,

how to hide the label of the object actions?

I've tried these below (separately of course...) but noone of them
works ok.


object_actions:
  _delete: {label: ' '}
  _delete: {label: '  '}
  _delete: {label: false}
  _delete: {label: none}


sf 1.4

Javier

-- 
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: After installing sfPropel15Plugin: error when i try to build classes

2011-01-13 Thread Javier Garcia
no idea?



On Jan 11, 5:07 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 when i do propel:build --all-classes i get these errors below.

 I have followed the instructions that are in the README.

 sf 1.4

  schema    converting /home/javier/program...rueba1/config/schema.yml to 
  XML
  schema    putting 
  /home/javier/programazio...eba1/config/generated-schema.xml
  schema    converting /home/javier/program...Plugin/config/schema.yml to 
  XML
  schema    putting 
  /home/javier/programazio...nerated-sfGuardPlugin-schema.xml
  file+     config/generated-sfGuardPlugin-schema.xml
  file-     
  /home/javier/programazione/prueb...nerated-sfGuardPlugin-schema.xml
  propel    Running om phing task
  file-     
  /home/javier/programazione/prueb...nerated-sfGuardPlugin-schema.xml
  file-     /home/javier/programazione/prueba1/config/generated-schema.xml
  autoload  Resetting application autoloaders
  file-     
  /home/javier/programazione/prueb...v/config/config_autoload.yml.php
  propel    generating form classes

 PHP Warning:  call_user_func() expects parameter 1 to be a valid
 callback, class 'sfGuardUserPermissionPeer' does not have a method
 'getUniqueColumnNames' in /home/javier/programazione/prueba1/plugins/
 sfPropel15Plugin/lib/generator/sfPropelFormGenerator.class.php on line
 485
 PHP Stack trace:
 PHP   1. {main}() /home/javier/programazione/prueba1/symfony:0
 PHP   2. include() /home/javier/programazione/prueba1/symfony:14
 PHP   3. sfSymfonyCommandApplication-run() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/command/cli.php:20
 PHP   4. sfTask-runFromCLI() /home/javier/programazione/prueba1/lib/
 vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
 PHP   5. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
 vendor/symfony/lib/task/sfTask.class.php:97
 PHP   6. sfPropelBuildTask-execute() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
 PHP   7. sfTask-run() /home/javier/programazione/prueba1/plugins/
 sfPropel15Plugin/lib/task/sfPropelBuildTask.class.php:135
 PHP   8. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
 vendor/symfony/lib/task/sfTask.class.php:173
 PHP   9. sfPropelBuildFormsTask-execute() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
 PHP  10. sfGeneratorManager-generate() /home/javier/programazione/
 prueba1/plugins/sfPropel15Plugin/lib/task/
 sfPropelBuildFormsTask.class.php:72
 PHP  11. sfPropelFormGenerator-generate() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/generator/sfGeneratorManager.class.php:
 113
 PHP  12. sfGenerator-evalTemplate() /home/javier/programazione/
 prueba1/plugins/sfPropel15Plugin/lib/generator/
 sfPropelFormGenerator.class.php:106
 PHP  13. require() /home/javier/programazione/prueba1/lib/vendor/
 symfony/lib/generator/sfGenerator.class.php:84
 PHP  14. sfPropelFormGenerator-getUniqueColumnNames() /home/javier/
 programazione/prueba1/plugins/sfPropel15Plugin/data/generator/
 sfPropelForm/default/template/sfPropelFormGeneratedTemplate.php:34
 PHP  15. call_user_func() /home/javier/programazione/prueba1/plugins/
 sfPropel15Plugin/lib/generator/sfPropelFormGenerator.class.php:485
 PHP Warning:  Invalid argument supplied for foreach() in /home/javier/
 programazione/prueba1/plugins/sfPropel15Plugin/lib/generator/
 sfPropelFormGenerator.class.php on line 485
 PHP Stack trace:
 PHP   1. {main}() /home/javier/programazione/prueba1/symfony:0
 PHP   2. include() /home/javier/programazione/prueba1/symfony:14
 PHP   3. sfSymfonyCommandApplication-run() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/command/cli.php:20
 PHP   4. sfTask-runFromCLI() /home/javier/programazione/prueba1/lib/
 vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
 PHP   5. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
 vendor/symfony/lib/task/sfTask.class.php:97
 PHP   6. sfPropelBuildTask-execute() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
 PHP   7. sfTask-run() /home/javier/programazione/prueba1/plugins/
 sfPropel15Plugin/lib/task/sfPropelBuildTask.class.php:135
 PHP   8. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
 vendor/symfony/lib/task/sfTask.class.php:173
 PHP   9. sfPropelBuildFormsTask-execute() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
 PHP  10. sfGeneratorManager-generate() /home/javier/programazione/
 prueba1/plugins/sfPropel15Plugin/lib/task/
 sfPropelBuildFormsTask.class.php:72
 PHP  11. sfPropelFormGenerator-generate() /home/javier/programazione/
 prueba1/lib/vendor/symfony/lib/generator/sfGeneratorManager.class.php:
 113
 PHP  12. sfGenerator-evalTemplate() /home/javier/programazione/
 prueba1/plugins/sfPropel15Plugin/lib/generator/
 sfPropelFormGenerator.class.php:106
 PHP  13. require() /home/javier/programazione/prueba1/lib/vendor/
 symfony/lib/generator

[symfony-users] Column not found: 1054 Unknown column 'sf_guard_group.ID' in 'where clause'

2011-01-13 Thread Javier Garcia

Hi,

i have this code:

$c-addMultipleJoin(array(
array(UserProceduraPeer::USER_ID, 
sfGuardUserProfilePeer::USER_ID ),
array(UserProceduraPeer::USER_ID, 
sfGuardGroupPeer::ID), CRITERIA::INNER_JOIN));


but I'm getting this error:


   [wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column
   'sf_guard_group.ID' in 'where clause']


This is the model in the sfGuardPlugin schema:

   sf_guard_group:
_attributes:{ phpName: sfGuardGroup }
id: ~
name:   { type: varchar, size: 255, required: true, index: 
unique }

description:{ type: longvarchar }


I don't have any problems doing build-all-load and the column in the 
database has been created.


Any idea?

sf 1.4/propel

Regards

Javier


--
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] Simulating an enum type in Propel: error trying to generate form classes

2011-01-12 Thread Javier Garcia
Hi,

documento: {type: varchar, sqltype: enum, size:
'F','DDT','RC','FOURTH_ELEMENT','PM','KV','VN','CMS', required:
true, defaultValue: 'F', required: true}


I get the next error message (always with the fourth element, I mean
if i write 3 or less elements it doesn't give any error):

 propelgenerating form classes

Cannot fetch TableMap for undefined table: FOURTH_ELEMENT

[?php

/**
 * sfGuardUserProfile form base class.
 *
 * @method sfGuardUserProfile getObject() Returns the current form's
model object
 *
 * @package##PROJECT_NAME##
 * @subpackage form
 * @author ##AUTHOR_NAME##
 * @versionSVN: $Id: sfPropelFormGeneratedTemplate.php 24171
2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BasesfGuardUserProfileForm extends BaseFormPropel
{
  public function setup()
  {
$this-setWidgets(array(


Javier

-- 
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: Simulating an enum type in Propel: error trying to generate form classes

2011-01-12 Thread Javier Garcia
Sorry I'm using sf 1.4.

On Jan 12, 1:53 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 documento: {type: varchar, sqltype: enum, size:
 'F','DDT','RC','FOURTH_ELEMENT','PM','KV','VN','CMS', required:
 true, defaultValue: 'F', required: true}

 I get the next error message (always with the fourth element, I mean
 if i write 3 or less elements it doesn't give any error):

  propel    generating form classes

 Cannot fetch TableMap for undefined table: FOURTH_ELEMENT

 [?php

 /**
  * sfGuardUserProfile form base class.
  *
  * @method sfGuardUserProfile getObject() Returns the current form's
 model object
  *
  * @package    ##PROJECT_NAME##
  * @subpackage form
  * @author     ##AUTHOR_NAME##
  * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171
 2009-11-19 16:37:50Z Kris.Wallsmith $
  */
 abstract class BasesfGuardUserProfileForm extends BaseFormPropel
 {
   public function setup()
   {
     $this-setWidgets(array(

 Javier

-- 
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] Save the output of a task.

2011-01-11 Thread Javier Garcia
Hi,

i have a long error message when i execute a task. In order to save
the output i'm writing task  foo.txt.

But when i open foo.txt the error messages are not there.

Any idea? Any alternative?

Regards

Javi

-- 
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] After installing sfPropel15Plugin: error when i try to build classes

2011-01-11 Thread Javier Garcia
Hi,

when i do propel:build --all-classes i get these errors below.

I have followed the instructions that are in the README.

sf 1.4

 schemaconverting /home/javier/program...rueba1/config/schema.yml to XML
 schemaputting /home/javier/programazio...eba1/config/generated-schema.xml
 schemaconverting /home/javier/program...Plugin/config/schema.yml to XML
 schemaputting /home/javier/programazio...nerated-sfGuardPlugin-schema.xml
 file+ config/generated-sfGuardPlugin-schema.xml
 file- /home/javier/programazione/prueb...nerated-sfGuardPlugin-schema.xml
 propelRunning om phing task
 file- /home/javier/programazione/prueb...nerated-sfGuardPlugin-schema.xml
 file- /home/javier/programazione/prueba1/config/generated-schema.xml
 autoload  Resetting application autoloaders
 file- /home/javier/programazione/prueb...v/config/config_autoload.yml.php
 propelgenerating form classes
PHP Warning:  call_user_func() expects parameter 1 to be a valid
callback, class 'sfGuardUserPermissionPeer' does not have a method
'getUniqueColumnNames' in /home/javier/programazione/prueba1/plugins/
sfPropel15Plugin/lib/generator/sfPropelFormGenerator.class.php on line
485
PHP Stack trace:
PHP   1. {main}() /home/javier/programazione/prueba1/symfony:0
PHP   2. include() /home/javier/programazione/prueba1/symfony:14
PHP   3. sfSymfonyCommandApplication-run() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/command/cli.php:20
PHP   4. sfTask-runFromCLI() /home/javier/programazione/prueba1/lib/
vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
PHP   5. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
vendor/symfony/lib/task/sfTask.class.php:97
PHP   6. sfPropelBuildTask-execute() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP   7. sfTask-run() /home/javier/programazione/prueba1/plugins/
sfPropel15Plugin/lib/task/sfPropelBuildTask.class.php:135
PHP   8. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
vendor/symfony/lib/task/sfTask.class.php:173
PHP   9. sfPropelBuildFormsTask-execute() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP  10. sfGeneratorManager-generate() /home/javier/programazione/
prueba1/plugins/sfPropel15Plugin/lib/task/
sfPropelBuildFormsTask.class.php:72
PHP  11. sfPropelFormGenerator-generate() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/generator/sfGeneratorManager.class.php:
113
PHP  12. sfGenerator-evalTemplate() /home/javier/programazione/
prueba1/plugins/sfPropel15Plugin/lib/generator/
sfPropelFormGenerator.class.php:106
PHP  13. require() /home/javier/programazione/prueba1/lib/vendor/
symfony/lib/generator/sfGenerator.class.php:84
PHP  14. sfPropelFormGenerator-getUniqueColumnNames() /home/javier/
programazione/prueba1/plugins/sfPropel15Plugin/data/generator/
sfPropelForm/default/template/sfPropelFormGeneratedTemplate.php:34
PHP  15. call_user_func() /home/javier/programazione/prueba1/plugins/
sfPropel15Plugin/lib/generator/sfPropelFormGenerator.class.php:485
PHP Warning:  Invalid argument supplied for foreach() in /home/javier/
programazione/prueba1/plugins/sfPropel15Plugin/lib/generator/
sfPropelFormGenerator.class.php on line 485
PHP Stack trace:
PHP   1. {main}() /home/javier/programazione/prueba1/symfony:0
PHP   2. include() /home/javier/programazione/prueba1/symfony:14
PHP   3. sfSymfonyCommandApplication-run() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/command/cli.php:20
PHP   4. sfTask-runFromCLI() /home/javier/programazione/prueba1/lib/
vendor/symfony/lib/command/sfSymfonyCommandApplication.class.php:76
PHP   5. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
vendor/symfony/lib/task/sfTask.class.php:97
PHP   6. sfPropelBuildTask-execute() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP   7. sfTask-run() /home/javier/programazione/prueba1/plugins/
sfPropel15Plugin/lib/task/sfPropelBuildTask.class.php:135
PHP   8. sfBaseTask-doRun() /home/javier/programazione/prueba1/lib/
vendor/symfony/lib/task/sfTask.class.php:173
PHP   9. sfPropelBuildFormsTask-execute() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP  10. sfGeneratorManager-generate() /home/javier/programazione/
prueba1/plugins/sfPropel15Plugin/lib/task/
sfPropelBuildFormsTask.class.php:72
PHP  11. sfPropelFormGenerator-generate() /home/javier/programazione/
prueba1/lib/vendor/symfony/lib/generator/sfGeneratorManager.class.php:
113
PHP  12. sfGenerator-evalTemplate() /home/javier/programazione/
prueba1/plugins/sfPropel15Plugin/lib/generator/
sfPropelFormGenerator.class.php:106
PHP  13. require() /home/javier/programazione/prueba1/lib/vendor/
symfony/lib/generator/sfGenerator.class.php:84
PHP  14. sfPropelFormGenerator-getUniqueColumnNames() /home/javier/
programazione/prueba1/plugins/sfPropel15Plugin/data/generator/

[symfony-users] Re: Save the output of a task.

2011-01-11 Thread Javier Garcia
Thanks!

On Jan 11, 4:58 pm, Gábor Fási maerl...@gmail.com wrote:
 You also need to redirect the stderr:

     task  foo.txt 21

 this redirects it to the stdout, so it gets logged to the same file.

 On Tue, Jan 11, 2011 at 15:56, Javier Garcia tirengar...@gmail.com wrote:
  Hi,

  i have a long error message when i execute a task. In order to save
  the output i'm writing task  foo.txt.

  But when i open foo.txt the error messages are not there.

  Any idea? Any alternative?

  Regards

  Javi

  --
  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] Question about fixtures: the object is not defined in your data file.

2011-01-10 Thread Javier Garcia
Hi,

I have this code:

sfGuardUser:
  utente_1:
username: j.gar...@esempio.com
password: 123456
?php for($i=2; $i=50; $i++): ?
  utente_?php echo $i?:
username: utente_?php echo $i?@esempio.com
password: 123456
?php endfor ?

sfGuardUserProfile:
  profilo_1:
user_id:  utente_1
nome: Filippo Batistini
note: jfkjsdf
?php for($i=2; $i=50; $i++): ?
  profilo_?php echo $i?:
user_id:  utente_?php echo $i?
nome: Filippo Batistini
note: jfkjsdf
?php endfor ?

And I'm getting the error:


  The object utente_2nome: Filippo Batistini from class
sfGuardUser is not defined in your data file.

Any idea?

Regards

Javi

-- 
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] Propel criteria: undefined offset

2011-01-09 Thread Javier Garcia
Hi,

i have this schema below, i have generated the classes using symfony
and created a pair of objects using the form class generated.

moto:
  marca: { type: varchar(255), required: true }
  matricula: { type: integer, required: true }

Now i have this criteria:

  $c = new Criteria();
  $c-addSelectColumn('MAX('.MotoPeer::MATRICULA.')');
  $max_matricula = MotoPeer::doSelect($c);
  var_dump($max_matricula);
  return $max_matricula;

When i call the criteria code It works ok, but these three notices
below are showed.

Any idea?

sf 1.4/propel 1.4


( ! ) Notice: Undefined offset: 2 in /opt/lampp/htdocs/prueba/lib/
model/om/BaseMotoPeer.php on line 379
Call Stack
#   TimeMemory  FunctionLocation
1   0.0008  328076  {main}( )   ../frontend_dev.php:0
2   0.1974  4333236 sfContext-dispatch( )   ../
frontend_dev.php:13
3   0.1974  4333264 sfFrontWebController-dispatch( )../
sfContext.class.php:170
4   0.1981  4350256 sfController-forward( ) ../
sfFrontWebController.class.php:48
5   0.2134  4641000 sfFilterChain-execute( )../
sfController.class.php:
238
6   0.2138  4641808 sfRenderingFilter-execute( )../
sfFilterChain.class.php:53
7   0.2138  4641808 sfFilterChain-execute( )../
sfRenderingFilter.class.php:33
8   0.2143  4642588 sfExecutionFilter-execute( )../
sfFilterChain.class.php:53
9   0.2144  4643308 sfExecutionFilter-handleAction( )   ../
sfExecutionFilter.class.php:42
10  0.2144  4643308 sfExecutionFilter-executeAction( )  ../
sfExecutionFilter.class.php:78
11  0.2144  4643336 sfActions-execute( )../
sfExecutionFilter.class.php:
92
12  0.2147  4644160 motoActions-executePrueba( )../
sfActions.class.php:
60
13  0.2212  5026172 MotoPeer::prueba( ) ../actions.class.php:
14
14  0.2254  5285592 BaseMotoPeer::doSelect( )   ../
MotoPeer.php:26
15  0.2493  5756176 BaseMotoPeer::populateObjects( )../
BaseMotoPeer.php:
241
16  0.2493  5756568
BaseMotoPeer::getPrimaryKeyHashFromRow( )   ../
BaseMotoPeer.php:400

( ! ) Notice: Undefined offset: 1 in /opt/lampp/htdocs/prueba/lib/
model/om/BaseMoto.php on line 184
Call Stack
#   TimeMemory  FunctionLocation
1   0.0008  328076  {main}( )   ../frontend_dev.php:0
2   0.1974  4333236 sfContext-dispatch( )   ../
frontend_dev.php:13
3   0.1974  4333264 sfFrontWebController-dispatch( )../
sfContext.class.php:170
4   0.1981  4350256 sfController-forward( ) ../
sfFrontWebController.class.php:48
5   0.2134  4641000 sfFilterChain-execute( )../
sfController.class.php:
238
6   0.2138  4641808 sfRenderingFilter-execute( )../
sfFilterChain.class.php:53
7   0.2138  4641808 sfFilterChain-execute( )../
sfRenderingFilter.class.php:33
8   0.2143  4642588 sfExecutionFilter-execute( )../
sfFilterChain.class.php:53
9   0.2144  4643308 sfExecutionFilter-handleAction( )   ../
sfExecutionFilter.class.php:42
10  0.2144  4643308 sfExecutionFilter-executeAction( )  ../
sfExecutionFilter.class.php:78
11  0.2144  4643336 sfActions-execute( )../
sfExecutionFilter.class.php:
92
12  0.2147  4644160 motoActions-executePrueba( )../
sfActions.class.php:
60
13  0.2212  5026172 MotoPeer::prueba( ) ../actions.class.php:
14
14  0.2254  5285592 BaseMotoPeer::doSelect( )   ../
MotoPeer.php:26
15  0.2493  5756176 BaseMotoPeer::populateObjects( )../
BaseMotoPeer.php:
241
16  0.2578  5953424 BaseMoto-hydrate( ) ../BaseMotoPeer.php:408

( ! ) Notice: Undefined offset: 2 in /opt/lampp/htdocs/prueba/lib/
model/om/BaseMoto.php on line 185
Call Stack
#   TimeMemory  FunctionLocation
1   0.0008  328076  {main}( )   ../frontend_dev.php:0
2   0.1974  4333236 sfContext-dispatch( )   ../
frontend_dev.php:13
3   0.1974  4333264 sfFrontWebController-dispatch( )../
sfContext.class.php:170
4   0.1981  4350256 sfController-forward( ) ../
sfFrontWebController.class.php:48
5   0.2134  4641000 sfFilterChain-execute( )../
sfController.class.php:
238
6   0.2138  4641808 sfRenderingFilter-execute( )../
sfFilterChain.class.php:53
7   0.2138  4641808 sfFilterChain-execute( )../
sfRenderingFilter.class.php:33
8   0.2143  4642588 sfExecutionFilter-execute( )../
sfFilterChain.class.php:53
9   0.2144  4643308 sfExecutionFilter-handleAction( )   ../
sfExecutionFilter.class.php:42
10  0.2144  4643308 sfExecutionFilter-executeAction( )  ../
sfExecutionFilter.class.php:78
11  0.2144  4643336 sfActions-execute( )../
sfExecutionFilter.class.php:
92
12  0.2147  4644160 motoActions-executePrueba( )../
sfActions.class.php:
60
13  0.2212  5026172 MotoPeer::prueba( ) ../actions.class.php:
14
14  0.2254  5285592 BaseMotoPeer::doSelect( )   ../
MotoPeer.php:26
15  0.2493  5756176 BaseMotoPeer::populateObjects( 

[symfony-users] Problem trying to add a new object action in a backend module

2010-12-22 Thread Javier Garcia
Hi,

i have created this model:

propel:
  shop_orders:
orders_id: { phpName: Id, type: INTEGER, size: '11', primaryKey:
true, autoIncrement: true, required: true }
email: { type: VARCHAR, size: '45', required: true }

Then i have generated an admin module and i have add this below to
generator.yml:

config:
  actions: ~
  fields:  ~
  list:
object_actions:
  foo: {}

When I click on the foo action It generates this url:

backend_dev.php/sp1/ListFoo/action?id=1

and I get this message:

Action sp1/action does not exist.

sf 1.4/propel

Any idea?

Javier

-- 
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: Manage the credentials of the actions and modules through a form

2010-12-12 Thread Javier Garcia
Hi again, thanks for your responses.

What about just reading/writing each file security.yml looking for the
credentials: key ? Then I would parse each file looking for the line
where the credentials: key is and would add/remove credentials in
that line...



On Nov 26, 8:24 pm, pghoratiu pghora...@gmail.com wrote:
 You should do the following:
 - design tables to store info about: modules/actions/user/permission
 - develop another security filter (that would replace the current
 security filter)
 that would use the new source for the credential data.

     gabriel

 On Nov 25, 9:02 pm, Javier Garcia tirengar...@gmail.com wrote:

  Hi,

  as you know you can edit the credentials of an action or a module
  going to file view.yml of the module and editing them.

  Ourbossdoesn't want to go to the files to edit the credentials in
  each view.yml file, but wants to have a form where he can select the
  modules and the actions of the application and give them the
  credentials.

  What would be your approach?

  Regards

  Javi

-- 
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] Trying to add a field from another model in a backend list.

2010-12-07 Thread Javier Garcia
Hi,

I have created an inner join criteria to show a list of elements in
the backend.

This are my models:


  user:
name:  { type: varchar(255) }
age:   { type: integer }

  article:
title:{ type: varchar(255) }
content:  { type: varchar(255) }
user_id:  { type: varchar(255) }



and this is my generator.yml (a part) of the article module:

  list:
peer_method:  getArticles
display: [title, content, age]



And this is the method getArticles():


public static function getArticles()
{
$con = Propel::getConnection();
$sql = select * from article LEFT JOIN user ON
article.user_id = user.id;
$stmt = $con-prepare($sql);


$result = $stmt-execute();
$articles = self::populateObjects($stmt);

return $articles;

}



As you can see I want to show the column corresponding to the age
field, so when I try to show the list of articles an error that says
something like The method Articles::getAge() is not defined.

So I think I should create the method Articles::getAge(), but.. what
should i write inside? A new criteria that retrieves the user object
corresponding to the value of the field user_id of the article? Or
maybe am i wrong with any other stuff?

sf 1.4/propel

Regards

Javi

-- 
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] Error when trying to declare a variable as a parameter. No problem when I declare it inside the function.

2010-12-07 Thread Javier Garcia
Hi,

I have this static function:

public static function getOrdini($sort_order = 4)
{

$con = Propel::getConnection();
$sql = select * from shop_orders LEFT JOIN shop_orders_total
ON
shop_orders.orders_id = shop_orders_total.orders_id
AND
shop_orders_total.sort_order = :sort_order;
$stmt = $con-prepare($sql);

$result = $stmt-execute(array(':sort_order' = $sort_order));
$ordini = self::populateObjects($stmt);


return $ordini;

}

When I call it I this error:

( ! ) Catchable fatal error: Object of class Criteria could not be
converted to string in /home/javier/Aptana_Studio_Workspace/dev_repo/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/
DebugPDOStatement.php on line 99

but if write the function in this way below I don't get any error:

public static function getOrdini()
{
$sort_order = 4;
$con = Propel::getConnection();
...

Any idea?

sf 1.4/propel

Regards

Javi

-- 
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: 500 internal server error

2010-12-07 Thread Javier Garcia
Or look at the log of the server (apache2 /var/log/apache2).

On 7 Dic, 10:03, Justen Doherty phpc...@gmail.com wrote:
 switch to dev mode by adding _dev.php to your URL - e.g. frontend_dev.php
 (dev mode) frontend.php (production mode)



 On Tue, Dec 7, 2010 at 4:37 AM, jyoti jyt...@gmail.com wrote:
  Hi

  I have made a symfony project on my svn server .
  When I submit the form which reads user details ,  I get the following
  error message

  page not found

  Oops an error occured

  The server returned a 500 internal server error
  Something is broken.

  This error message I get 1 out of 5 times. This is hampering the
  testing of my code.

  Please help me and send your replies asap.Thanx .

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

 --
 -http://www.linkedin.com/in/justendoherty-
  LinkedInhttp://www.twitter.com/phpchap- 
 Twitterhttp://www.anotherwebdeveloper.com- Portfolio

-- 
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] Trying to create a new action in a backend module: Action module/show does not exist.

2010-12-07 Thread Javier Garcia
Hi,

i have created a new action called executeDetagli() in backend/modules/
ordini/actions/actions.class.php.


When I try to go to backend_dev.php/ordini/detagli It gives me this
error:

404 | Not Found | sfError404Exception
Action ordini/show does not exist.
stack trace

* at ()
  in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/
sfController.class.php line 192 ...
 189. $this-dispatcher-notify(new sfEvent($this,
'application.log', array(sprintf('Action %s/%s does not exist',
$moduleName, $actionName;
 190.   }
 191.

 192.   throw new sfError404Exception(sprintf('Action
%s/%s does not exist.', $moduleName, $actionName));
 193. }
 194.

 195. // create an instance of the action
* at sfController-forward('ordini', 'show')
  in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/
sfFrontWebController.class.php line 48 ...
  45.   }
  46.

  47.   // make the first request
  48.   $this-forward($moduleName, $actionName);
  49. }
  50. catch (sfException $e)
  51. {
* at sfFrontWebController-dispatch()
  in SF_ROOT_DIR/lib/vendor/symfony/lib/util/sfContext.class.php
line 170 ...
 167.*/
 168.   public function dispatch()
 169.   {
 170. $this-getController()-dispatch();
 171.   }
 172.

 173.   /**
* at sfContext-dispatch()
  in SF_ROOT_DIR/web/backend_dev.php line 13 ...
  10. require_once(dirname(__FILE__).'/../config/
ProjectConfiguration.class.php');
  11.

  12. $configuration =
ProjectConfiguration::getApplicationConfiguration('backend', 'dev',
true);
  13. sfContext::createInstance($configuration)-
dispatch();
  14.


I have this in routing.yml:

shop_order:
  class: sfPropelRouteCollection
  options:
model:ShopOrder
module:   ordini
prefix_path:  /ordini
column:   orders_id
with_wildcard_routes: true


default:
  url:   /:module/:action/*

Any idea?

sf 1.4/propel

Javi


Any idea?

-- 
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: Trying to create a new action in a backend module: Action module/show does not exist.

2010-12-07 Thread Javier Garcia
I have realized that it works perfect when i add / at the end of the
url, but why??? I don't have any problem to go to the New action just
using backend_dev.php/ordini/new.

On 7 Dic, 17:50, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i have created a new action called executeDetagli() in backend/modules/
 ordini/actions/actions.class.php.

 When I try to go to backend_dev.php/ordini/detagli It gives me this
 error:

 404 | Not Found | sfError404Exception
 Action ordini/show does not exist.
 stack trace

     * at ()
       in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/
 sfController.class.php line 192 ...
              189.         $this-dispatcher-notify(new sfEvent($this,
 'application.log', array(sprintf('Action %s/%s does not exist',
 $moduleName, $actionName;
              190.       }
              191.

              192.       throw new sfError404Exception(sprintf('Action
 %s/%s does not exist.', $moduleName, $actionName));
              193.     }
              194.

              195.     // create an instance of the action
     * at sfController-forward('ordini', 'show')
       in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/
 sfFrontWebController.class.php line 48 ...
               45.       }
               46.

               47.       // make the first request
               48.       $this-forward($moduleName, $actionName);
               49.     }
               50.     catch (sfException $e)
               51.     {
     * at sfFrontWebController-dispatch()
       in SF_ROOT_DIR/lib/vendor/symfony/lib/util/sfContext.class.php
 line 170 ...
              167.    */
              168.   public function dispatch()
              169.   {
              170.     $this-getController()-dispatch();
              171.   }
              172.

              173.   /**
     * at sfContext-dispatch()
       in SF_ROOT_DIR/web/backend_dev.php line 13 ...
               10. require_once(dirname(__FILE__).'/../config/
 ProjectConfiguration.class.php');
               11.

               12. $configuration =
 ProjectConfiguration::getApplicationConfiguration('backend', 'dev',
 true);
               13. sfContext::createInstance($configuration)-dispatch();

               14.

 I have this in routing.yml:

 shop_order:
   class: sfPropelRouteCollection
   options:
     model:                ShopOrder
     module:               ordini
     prefix_path:          /ordini
     column:               orders_id
     with_wildcard_routes: true

 default:
   url:   /:module/:action/*

 Any idea?

 sf 1.4/propel

 Javi

 Any idea?

-- 
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] Question about accessing a child class from a parent class

2010-12-06 Thread Javier Garcia
Hi,

i have this schema:

  shop_products:
_attributes: { phpName: ShopProduct }
products_id: { phpName: Id, type: INTEGER, size: '11', primaryKey:
true, autoIncrement: true, required: true }
products_quantity: { phpName: Quantity, type: INTEGER, size: '4',
required: true }
products_model: { phpName: Model, type: VARCHAR, size: '12',
required: false }
products_image: { phpName: Image, type: VARCHAR, size: '64',
required: false }
products_price: { phpName: Price, type: DECIMAL, size: '15',
scale: '4', required: false, defaultValue: '0.' }
products_date_added: { phpName: DateAdded, type: TIMESTAMP,
required: true }
products_last_modified: { phpName: LastModified, type: TIMESTAMP,
required: false }
products_date_available: { phpName: DateAvailable, type:
TIMESTAMP, required: false }
products_weight: { phpName: Weight, type: DECIMAL, size: '5',
scale: '2', required: true }
products_carati: { phpName: Carati, type: FLOAT, required: false,
defaultValue: '1' }
products_status: { phpName: Status, type: TINYINT, size: '1',
required: true }
manufacturers_id: { phpName: ManufacturerId, type: INTEGER, size:
'11', required: false, foreignTable: shop_manufacturers,
foreignReference: manufacturers_id, onDelete: SETNULL }
products_ordered: { phpName: Ordered, type: INTEGER, size: '11',
required: true, defaultValue: '0' }


  shop_categories:
_attributes: { phpName: ShopCategory }
categories_id: { phpName: Id, type: INTEGER, size: '11',
primaryKey: true, autoIncrement: true, required: true }
categories_image: { phpName: Image, type: VARCHAR, size: '64',
required: false }
parent_id: { phpName: ParentId, type: INTEGER, size: '11',
required: true, defaultValue: '0', foreignTable: shop_categories,
foreignReference: categories_id, onDelete: CASCADE, onUpdate:
CASCADE }
sort_order: { phpName: SortOrder, type: INTEGER, size: '3',
required: false }
date_added: { phpName: DateAdded, type: TIMESTAMP, required:
false }
last_modified: { phpName: LastModified, type: TIMESTAMP, required:
false }



  shop_categories_description:
_attributes: { phpName: ShopCategoryDescription }
categories_id: { phpName: CategoryId, type: INTEGER, size: '11',
primaryKey: true, required: true, defaultValue: '0', foreignTable:
shop_categories, foreignReference: categories_id, onDelete: CASCADE,
onUpdate: CASCADE }
language_id: { phpName: LanguageId, type: INTEGER, size: '11',
primaryKey: true, required: true, defaultValue: '1', foreignTable:
culture, foreignReference: id, onDelete: CASCADE, onUpdate: CASCADE }
categories_name: { phpName: Name, type: VARCHAR, size: '32',
required: true }

Then, I have created an admin module from the ShopProducts model, but
when i try to go to it it says:

Class ShopCategory must implement a __toString method to be
rendered in a sfWidgetFormPropelChoice widget

As you can see, the model where the names of the categories are, is
ShopCategoriesDescription. So, how could i get the name of the
categories from the ShopCategory model class?

Javier

sf 1.4/propel

-- 
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] Trying to use my own method to show a list in the backend: undefined offset notice

2010-12-06 Thread Javier Garcia
Hi,

i'm trying to use my own method to show a list in the backend:

class ShopOrderPeer extends BaseShopOrderPeer {


public static function getOrdini()
{
$con = Propel::getConnection();
$sql = select customers_name, value, date_purchased,
orders_status from shop_orders LEFT JOIN shop_orders_total  ON
shop_orders.orders_id = shop_orders_total.orders_id;
$stmt = $con-prepare($sql);

$result = $stmt-execute();
$ordini = self::populateObjects($stmt);


return $ordini;

}


}

And this is my generator.yml

generator:
  class: sfPropelGenerator
  param:
model_class:   ShopOrder
theme: admin
non_verbose_templates: true
with_show: false
singular:  ShopOrder
plural:ShopOrders
route_prefix:  shop_order
with_propel_route: 1
actions_base_class:sfActions

config:
  actions: ~
  fields:  ~
  list:
display: [customers_name, date_purchased, orders_status ]
peer_method:  getOrdini
  filter:  ~
  form:~
  edit:~
  new: ~


When i load the page of the list, the list is showed but I get this
erro messages

Notice: Undefined offset: 4 in /home/javier/Aptana_Studio_Workspace/
dev_repo/lib/model/om/BaseShopOrder.php on line 1864
Call Stack
#   TimeMemory  FunctionLocation
1   0.0017  324556  {main}( )   ../backend_dev.php:0
2   0.0891  4457868 sfContext-dispatch( )  ../backend_dev.php:13
3   0.0891  4457912 sfFrontWebController-dispatch( )   ../
sfContext.class.php:170
4   0.0892  4464168 sfController-forward( )../
sfFrontWebController.class.php:48
5   0.1181  5054656 sfFilterChain-execute( )   ../
sfController.class.php:229
6   0.1188  5061248 sfRenderingFilter-execute( )   ../
sfFilterChain.class.php:53
7   0.1188  5061248 sfFilterChain-execute( )   ../
sfRenderingFilter.class.php:33
8   0.1191  5070452 sfBasicSecurityFilter-execute( )   ../
sfFilterChain.class.php:53
9   0.1192  5070496 sfFilterChain-execute( )   ../
sfBasicSecurityFilter.class.php:72
10  0.1196  5082256 sfExecutionFilter-execute( )   ../
sfFilterChain.class.php:53
11  0.2778  11817440sfExecutionFilter-handleView( )../
sfExecutionFilter.class.php:47
12  0.2778  11817440sfExecutionFilter-executeView( )   ../
sfExecutionFilter.class.php:116
13  0.2815  11859256sfPHPView-render( )../
sfExecutionFilter.class.php:155
14  0.2815  11859632sfPHPView-renderFile( )
../sfPHPView.class.php:
179
15  0.2855  11973804require('/home/javier/Aptana_Studio_Workspace/
dev_repo/cache/backend/dev/modules/autoOrdini/templates/
indexSuccess.php')  ../sfPHPView.class.php:75
16  3.0826  115065148   include_partial( )  ../indexSuccess.php:19
17  3.0826  115065148   get_partial( )  ../PartialHelper.php:180
18  3.0831  115068964   sfPartialView-render( )
../PartialHelper.php:
218
19  3.0832  115070248   sfPHPView-renderFile( )../
sfPartialView.class.php:110
20  3.0866  115161828   require( '/home/javier/Aptana_Studio_Workspace/
dev_repo_cashgold/cache/backend/dev/modules/autoOrdini/templates/
_list.php' )../sfPHPView.class.php:75
21  3.6215  115636256   sfPropelPager-getResults( )../_list.php:28
22  3.6215  115636668   call_user_func ( )  
../sfPropelPager.class.php:
117
23  3.6216  115636696   ShopOrderPeer::getOrdini( ) ../
sfPropelPager.class.php:0
24  3.6227  115676928   BaseShopOrderPeer::populateObjects( )   ../
ShopOrderPeer.php:31
25  3.6229  115684084   BaseShopOrder-hydrate( )

And then:

Notice: Undefined offset: 5
Notice: Undefined offset: 6


This is the file BaseShopOrder.php


try {

$this-orders_id = ($row[$startcol + 0] !== null) ? (int)
$row[$startcol + 0] : null;
$this-sfgu_id = ($row[$startcol + 1] !== null) ? (int)
$row[$startcol + 1] : null;
$this-utenti_email = ($row[$startcol + 2] !== null) ?
(string) $row[$startcol + 2] : null;
$this-utenti_telefono = ($row[$startcol + 3] !== null) ?
(string) $row[$startcol + 3] : null;
$this-customers_name = ($row[$startcol + 4] !== null) ?
(string) $row[$startcol + 4] : null;// line 1864
$this-customers_company = ($row[$startcol + 5] !==
null) ? (string) $row[$startcol + 5] : null;
$this-customers_street_address = ($row[$startcol + 6] !==
null) ? (string) $row[$startcol + 6] : null;
$this-customers_suburb = ($row[$startcol + 7] !== null) ?
(string) $row[$startcol + 7] : null;
$this-customers_city = ($row[$startcol + 8] !== null) ?
(string) $row[$startcol + 8] : null;
$this-customers_postcode = 

[symfony-users] Re: Trying to use my own method to show a list in the backend: undefined offset notice

2010-12-06 Thread Javier Garcia
Workaround: instead of select customers_name, value, date_purchased,
orders_status from shop_orders LEFT JOIN ..., select * LEFT
JOIN ...

On 6 Dic, 18:39, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i'm trying to use my own method to show a list in the backend:

 class ShopOrderPeer extends BaseShopOrderPeer {

     public static function getOrdini()
     {
         $con = Propel::getConnection();
         $sql = select customers_name, value, date_purchased,
 orders_status from shop_orders LEFT JOIN shop_orders_total  ON
 shop_orders.orders_id = shop_orders_total.orders_id;
         $stmt = $con-prepare($sql);

         $result = $stmt-execute();
         $ordini = self::populateObjects($stmt);

         return $ordini;

     }

 }

 And this is my generator.yml

 generator:
   class: sfPropelGenerator
   param:
     model_class:           ShopOrder
     theme:                 admin
     non_verbose_templates: true
     with_show:             false
     singular:              ShopOrder
     plural:                ShopOrders
     route_prefix:          shop_order
     with_propel_route:     1
     actions_base_class:    sfActions

     config:
       actions: ~
       fields:  ~
       list:
         display: [customers_name, date_purchased, orders_status ]
         peer_method:  getOrdini
       filter:  ~
       form:    ~
       edit:    ~
       new:     ~

 When i load the page of the list, the list is showed but I get this
 erro messages

 Notice: Undefined offset: 4 in /home/javier/Aptana_Studio_Workspace/
 dev_repo/lib/model/om/BaseShopOrder.php on line 1864
 Call Stack
 #       Time    Memory  Function        Location
 1       0.0017  324556  {main}( )       ../backend_dev.php:0
 2       0.0891  4457868         sfContext-dispatch( )       
 ../backend_dev.php:13
 3       0.0891  4457912         sfFrontWebController-dispatch( )    ../
 sfContext.class.php:170
 4       0.0892  4464168         sfController-forward( )     ../
 sfFrontWebController.class.php:48
 5       0.1181  5054656         sfFilterChain-execute( )    ../
 sfController.class.php:229
 6       0.1188  5061248         sfRenderingFilter-execute( )        ../
 sfFilterChain.class.php:53
 7       0.1188  5061248         sfFilterChain-execute( )    ../
 sfRenderingFilter.class.php:33
 8       0.1191  5070452         sfBasicSecurityFilter-execute( )    ../
 sfFilterChain.class.php:53
 9       0.1192  5070496         sfFilterChain-execute( )    ../
 sfBasicSecurityFilter.class.php:72
 10      0.1196  5082256         sfExecutionFilter-execute( )        ../
 sfFilterChain.class.php:53
 11      0.2778  11817440        sfExecutionFilter-handleView( )     ../
 sfExecutionFilter.class.php:47
 12      0.2778  11817440        sfExecutionFilter-executeView( )    ../
 sfExecutionFilter.class.php:116
 13      0.2815  11859256        sfPHPView-render( )         ../
 sfExecutionFilter.class.php:155
 14      0.2815  11859632        sfPHPView-renderFile( )     
 ../sfPHPView.class.php:
 179
 15      0.2855  11973804        require('/home/javier/Aptana_Studio_Workspace/
 dev_repo/cache/backend/dev/modules/autoOrdini/templates/
 indexSuccess.php')      ../sfPHPView.class.php:75
 16      3.0826  115065148       include_partial( )      ../indexSuccess.php:19
 17      3.0826  115065148       get_partial( )  ../PartialHelper.php:180
 18      3.0831  115068964       sfPartialView-render( )     
 ../PartialHelper.php:
 218
 19      3.0832  115070248       sfPHPView-renderFile( )     ../
 sfPartialView.class.php:110
 20      3.0866  115161828       require( 
 '/home/javier/Aptana_Studio_Workspace/
 dev_repo_cashgold/cache/backend/dev/modules/autoOrdini/templates/
 _list.php' )    ../sfPHPView.class.php:75
 21      3.6215  115636256       sfPropelPager-getResults( )         
 ../_list.php:28
 22      3.6215  115636668       call_user_func ( )      
 ../sfPropelPager.class.php:
 117
 23      3.6216  115636696       ShopOrderPeer::getOrdini( )     ../
 sfPropelPager.class.php:0
 24      3.6227  115676928       BaseShopOrderPeer::populateObjects( )   ../
 ShopOrderPeer.php:31
 25      3.6229  115684084       BaseShopOrder-hydrate( )

 And then:

 Notice: Undefined offset: 5
 Notice: Undefined offset: 6
 

 This is the file BaseShopOrder.php

 try {

             $this-orders_id = ($row[$startcol + 0] !== null) ? (int)
 $row[$startcol + 0] : null;
             $this-sfgu_id = ($row[$startcol + 1] !== null) ? (int)
 $row[$startcol + 1] : null;
             $this-utenti_email = ($row[$startcol + 2] !== null) ?
 (string) $row[$startcol + 2] : null;
             $this-utenti_telefono = ($row[$startcol + 3] !== null) ?
 (string) $row[$startcol + 3] : null;
             $this-customers_name = ($row[$startcol + 4] !== null) ?
 (string) $row[$startcol + 4] : null;            // line 1864
             $this-customers_company = ($row[$startcol + 5] !==
 null) ? (string) $row[$startcol + 5] : null;
             $this-customers_street_address = ($row[$startcol + 6

[symfony-users] The error is not showed in the backend

2010-12-06 Thread Javier Garcia

 Hi,

I have these models:

  user:
name:  { type: varchar(255) }
age:   { type: integer }

  article:
title:{ type: varchar(255) }
content:  { type: varchar(255) }
user_id:  { type: varchar(255) }

I have this generator.yml

  list:
display: [title, age]
peer_method: getArticles

The method getArticles is this:

public static function getArticles()
{
$con = Propel::getConnection();
$sql = select * from article LEFT JOIN user ON article.user_id 
= user.id;

$stmt = $con-prepare($sql);


$result = $stmt-execute();
$articles = self::populateObjects($stmt);

return $articles;

}

When I go to the module article in the backed, I expected it shows an 
error saying the method Article::getAge() doesn't exist, but it doesn't 
show anything...The browser just says Loading


Any idea?

I'm the dev enviroment and i have just created a new project.

I'm using propel.

--
Javi

Ubuntu 10.04, sf 1.4

--
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] Manage the credentials of the actions and modules through a form

2010-11-25 Thread Javier Garcia
Hi,

as you know you can edit the credentials of an action or a module
going to file view.yml of the module and editing them.

Our boss doesn't want to go to the files to edit the credentials in
each view.yml file, but wants to have a form where he can select the
modules and the actions of the application and give them the
credentials.

What would be your approach?

Regards

Javi

-- 
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: clean-model-files for Propel?

2010-11-20 Thread Javier Garcia
I think there isn't anyone..so.. from what folder should i remove the
files?

On Nov 5, 12:51 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 when i try build-all-load i'm getting errors about models that
 doesn't exist any more in my schema. I know in doctrine i can use
 clean-model-files but in propel?

 Javier

-- 
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] Setting the object of the form before saving

2010-11-19 Thread Javier Garcia
Hi,

i want a form in my app uses AJAX, so as my first-first-first step (i
dont know exactly if it finally will really serve me..) I'm just
trying to modificate the update action this way:

  public function executeUpdate(sfWebRequest $request)
  {
$this-forward404Unless($request-isMethod(sfRequest::POST) ||
$request-isMethod(sfRequest::PUT));
$this-forward404Unless($coche2 =
Coche2Peer::retrieveByPk($request-getParameter('id')),
sprintf('Object coche2 does not exist (%s).', $request-
getParameter('id')));
$this-form = new coche2Form($coche2);

$coche2-setModelo(foo); // this is my only change

$this-processForm($request, $this-form);

$this-setTemplate('edit');
  }

And this is my schema:

propel:
  coche2:
marca: {type: varchar(32)}
modelo: {type: varchar(32)}


After showing the edit form, insert data and submit the form, I go to
the list of objects, there I expected the value of the Modelo field is
foo, but the value is what i inserted in the form...

The app and the module are just been generated.

Any idea?

Javi

sf 1.4 propel

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

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


[symfony-users] How to disable the modules/action routes?

2010-11-17 Thread Javier Garcia
Hi,

how to disable the module/action routes? I mean i just want the
short routes work, for example www.mysite.com/login will work, but
www.mysite.com/sfGuardAuth/signin will not work.


Javi

-- 
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] When i write a task php symfony .. I only get the first lines of config/ProjectConfiguration.class.php

2010-11-12 Thread Javier Garcia
Hi,

I have done a svn co for a repository that contains a symfony app.
Then i went to the root of the project and when i write a task php
symfony .. I only get the first lines of config/
ProjectConfiguration.class.php

ini_set('display_errors', 1);
ini_set('session.save_handler','files');
ini_set('safe_mode','Off');
ini_set('register_globals','Off');
ini_set('memory_limit','128M');

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier fabien.potenc...@symfony-project.com
 *
 * For the full copyright and license information, please view the
LICENSE
 * file that was distributed with this source code.
 */

chdir(dirname(__FILE__));
require_once(dirname(__FILE__).'/config/
ProjectConfiguration.class.php');
include(sfCoreAutoload::getInstance()-getBaseDir().'/command/
cli.php');


and the prompt again.

Anyone knows?

sf 1.4

Javier

-- 
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: Credentials for an action in the backend

2010-11-11 Thread Javier Garcia
I'm logged in when I execute the action.

Anyway, someone told me that the 'credentials' option for a generator
action specifies which credentials are sufficient to execute that
action. It does NOT provide the executor with the specified
credentials.

First question: is that true?

Second question: if it's true, I'm logged in with a user that has the
credential admin (in the action new i have checked it using
var_dump($this-getUser()-getCredentials());) but i can execute the
action new... I expected not to be able to execute it because the
necessary credential is user... I did cc.

Javier

sf 1.4


On Nov 11, 1:49 am, Martin Ibarra Cervantes
ibarra.cervan...@gmail.com wrote:
 You add credentials on your backend when your user has login.

 On Wed, Nov 10, 2010 at 8:01 AM, Javier Garcia tirengar...@gmail.com wrote:
  Hi,

  I have this in the generator.yml of a module:

  config:
   actions:
     _new:  { credentials: [user] }.

  and I've overwriten the action new i mention in the generator.yml
  this way:

   public function executeNew(sfWebRequest $request)
   {

     var_dump($this-getCredential());

     $this-form = $this-configuration-getForm();
     $this-Sedi = $this-form-getObject();
   }

  When i execute the new action i get null. I expected to get user.

  I did cc.

  Any idea?

  Javier

  --
  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] Credentials for an action in the backend

2010-11-10 Thread Javier Garcia
Hi,

I have this in the generator.yml of a module:

config:
  actions:
_new:  { credentials: [user] }.

and I've overwriten the action new i mention in the generator.yml
this way:

  public function executeNew(sfWebRequest $request)
  {

var_dump($this-getCredential());

$this-form = $this-configuration-getForm();
$this-Sedi = $this-form-getObject();
  }


When i execute the new action i get null. I expected to get user.

I did cc.

Any idea?

Javier

-- 
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] clean-model-files for Propel?

2010-11-05 Thread Javier Garcia
Hi,

when i try build-all-load i'm getting errors about models that
doesn't exist any more in my schema. I know in doctrine i can use
clean-model-files but in propel?

Javier

-- 
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] Trying to build and load

2010-11-04 Thread Javier Garcia

 Hi,

i have just created a new project and this models and the fixtures below:


  culture:
id: ~
code:   { type: CHAR, size: 6, default: 'it', required: true }
text:   { type: VARCHAR, size: 50, default: 'italiano', 
required: true }
folder_prod:{ type: VARCHAR, size: 50, default: 'italian', 
required: true }



  sediOK:
id:  ~
culture_id:  { type: integer, required: true, 
foreignTable: culture, foreignReference: id }
nations_id:  { type: integer, required: true, 
foreignTable: nations, foreignReference: id }

paese_indirizzo: { type: varchar(32), required: true }
ufficio: { type: varchar(64), required: true}
indirizzo:   { type: longvarchar, required: true }


culture:
  italiano:{code: it, text: italiano, folder_prod: italian }
  frencese:{code: fr, text: francese, folder_prod: francoise }
  inglese: {code: en, text: inglese, folder_prod: english }


sediOK:
  sede_roma_1_italiano:  { culture_id: 1, nations_id: 105, 
paese_indirizzo: Italia, ufficio: Ufficio di Roma 1:, indirizzo: 
Testaccio Via Galvani, 17 Roma - 00153 Italia }
  sede_roma_1_francese:  { culture_id: 2, nations_id: 105, 
paese_indirizzo: Italia, ufficio: Rome Office 1:, indirizzo: 
Testaccio Via Galvani, 17 Roma - 00153 Italia }
  sede_roma_1_spagnolo:  { culture_id: 4, nations_id: 105, 
paese_indirizzo: Italia, ufficio: Oficina de Roma 1:, indirizzo: 
Testaccio Via Galvani, 17 Roma - 00153 Italia }



When i do propel:build-all-load it says:

The object 1 from class Culture is not defined in your data file.

So it's not inserting the culture fixtures but i dont know why...If I 
remove the sediOK model and fixtures, and then do build-all-load the 
culture fixtures are inserted ok.


Any idea?

--

Javi

Ubuntu 10.04, sf 1.4

--
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] Just trying to build and load

2010-11-04 Thread Javier Garcia



Hi,

i have just created a new project and this models and the fixtures below:


  sediOK:
id:  ~
culture_id:  { type: integer, required: true, 
foreignTable: culture, foreignReference: id }
nations_id:  { type: integer, required: true, 
foreignTable: nations, foreignReference: id }

paese_indirizzo: { type: varchar(32), required: true }
ufficio: { type: varchar(64), required: true}
indirizzo:   { type: longvarchar, required: true }


culture:
  italiano:{code: it, text: italiano, folder_prod: italian }
  frencese:{code: fr, text: francese, folder_prod: francoise }
  inglese: {code: en, text: inglese, folder_prod: english }

---


sediOK:
  sede_roma_1_italiano:  { culture_id: 1, nations_id: 105, 
paese_indirizzo: Italia, ufficio: Ufficio 1:, indirizzo: X }
  sede_roma_1_francese:  { culture_id: 2, nations_id: 105, 
paese_indirizzo: Italia, ufficio: Office 1:, indirizzo: X }
  sede_roma_1_spagnolo:  { culture_id: 4, nations_id: 105, 
paese_indirizzo: Italia, ufficio: Oficina 1:, indirizzo: XX }



culture:
id: ~
code:   { type: CHAR, size: 6, default: 'it', required: true }
text:   { type: VARCHAR, size: 50, default: 'italiano', 
required: true }
folder_prod:{ type: VARCHAR, size: 50, default: 'italian', 
required: true }


When i do propel:build-all-load|| it says:

   The object 1 from class Culture is not defined in your data file.

So it's not inserting the culture fixtures but i don't know why...If I 
remove the sediOK model and fixtures, and then do 
propel:build-all-load|| the culture fixtures are inserted ok.


Any idea?

Jav


--
Javi

Ubuntu 10.04, sf 1.4

--
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] Trying to manage the credentials of the actions

2010-11-03 Thread Javier Garcia
Hi,

we want to manage the credentials of the actions of the backend from
the backend.

How to get the list of the actions of an app? After that we could show
the credential of each one through getCredential().

2nd question: i found the function to get the credential of an action
(getCredential()), but how to _set_ the credentials? I didn't find any
setCredential() function...

Javi

-- 
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: Using generator.yml, is there any way to hide the fields of the i18n forms in the admin?

2010-10-26 Thread Javier Garcia
well, maybe the question is:

using generator.yml, is there any way to hide the fields of the i18n
table forms in the admin?

sf 1.4/propel


On Oct 25, 9:50 am, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 using generator.yml, is there any way to hide the fields of the i18n
 forms in the admin?

 Javi

-- 
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 generator.yml, is there any way to hide the fields of the i18n forms in the admin?

2010-10-25 Thread Javier Garcia
Hi,

using generator.yml, is there any way to hide the fields of the i18n
forms in the admin?


Javi

-- 
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] Starting with propel schemas

2010-10-22 Thread Javier Garcia
Hi,

i have this propel schema:

comentario:
  id:
  author:  varchar(255)
  content: longvarchar
  created_at:

when i do build-all-load the classes (model, form, filter) are not
created.

But if i change add the _attributes key like this:

comentario:
   _attributes: { phpName: Comment }
  id:
  author:  varchar(255)
  content: longvarchar
  created_at:

and then build-all-reload again the classes are created.

Why?

Javier

sf 1.4/propel

-- 
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: Question about i18nTable in Jobeet

2010-10-22 Thread Javier Garcia
No idea?

On Oct 19, 5:41 pm, Javier Garci tirengar...@gmail.com wrote:
   Hi,

 in Jobeet there is this part below of the schema:

 jobeet_category:
    _attributes:  { isI18N: true, i18nTable: jobeet_category_i18n }
    id:           ~

 jobeet_category_i18n:
    id:           { type: integer, required: true, primaryKey: true,
 foreignTable: jobeet_category, foreignReference: id }
    culture:      { isCulture: true, type: varchar, size: 7, required:
 true, primaryKey: true }
    name:         { type: varchar(255), required: true }
    slug:         { type: varchar(255), required: true }

 I have created the corresponding modules in the backend, but when i try
 to create a new jobeet_category_i18n i miss the select that would
 permit choose a jobeet_category object.

 Anyway i try to create it, but as i expected an error message that
 speaks about the foreign key is showed.

 Is that schema ok? why is not showed the select to choose a
 jobeet_category object?

 Javi

-- 
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: Problems trying to go the previous element of a group of elements retrieved using a propel criteria.

2010-10-07 Thread Javier Garcia
Hi Gareth,

Im not using foreach(), jut i'm trying to use just prev() method.

Javier

On Oct 7, 11:43 am, Gareth McCumskey gmccums...@gmail.com wrote:
 I assume that $Sedi18ns is a result from a doSelect call?

 If so, this means that items are stored in an array. Therefore in your
 TEMPLATE file:

 ?php foreach ($Sedi18ns as $SediObj): ?
   ?php echo $Sedi

 Hang on, I have answered enough of these  Every one of your questions
 are answered in the documentation already provided.

 Here ... READ FIRST!

 http://www.symfony-project.org/gentle-introduction/1_4/en/



 On Wed, Oct 6, 2010 at 7:09 PM, Javier Garci tirengar...@gmail.com wrote:
   Hi,

  i have retrieved a group of elements using a propel criteria. Now are at
  $Sedi18ns

  When i use this:

  $SediI18ns-prev()

  I get:

  ( ! ) Fatal error: Call to undefined method
  sfOutputEscaperArrayDecorator::prev() in
  /home/javier/Aptana_Studio_Workspace/cashgold/apps/cashgold/modules/contatti/templates/indexSuccess.php
  on line 29

  No problems when i use next().

  Any idea?

  symfony 1.4/propel

  Javi

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

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc

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

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


[symfony-users] Problem trying to do propel:build-all-load

2010-10-05 Thread Javier Garcia
Hi,

i have just installed symfony, created a propel project (--orm=propel)
and an frontend app.

After doing propel:build-all-load i get several error messages:

PHP Warning:  Invalid argument supplied for foreach() in /opt/lampp/
htdocs/rs_propel_1/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/
addon/sfPropelDatabaseSchema.class.php on line 153
PHP Stack trace:
PHP   1. {main}() /opt/lampp/htdocs/rs_propel_1/symfony:0
PHP   2. include() /opt/lampp/htdocs/rs_propel_1/symfony:14
PHP   3. sfSymfonyCommandApplication-run() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/command/cli.php:20
PHP   4. sfTask-runFromCLI() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/command/sfSymfonyCommandApplication.class.php:76
PHP   5. sfBaseTask-doRun() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/task/sfTask.class.php:97
PHP   6. sfPropelBuildAllLoadTask-execute() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP   7. sfTask-run() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBuildAllLoadTask.class.php:79
PHP   8. sfBaseTask-doRun() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/task/sfTask.class.php:173
PHP   9. sfPropelBuildAllTask-execute() /opt/lampp/htdocs/rs_propel_1/
lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP  10. sfTask-run() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBuildAllTask.class.php:84
PHP  11. sfBaseTask-doRun() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/task/sfTask.class.php:173
PHP  12. sfPropelBuildModelTask-execute() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
PHP  13. sfPropelBaseTask-schemaToXML() /opt/lampp/htdocs/rs_propel_1/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBuildModelTask.class.php:59
PHP  14. sfPropelDatabaseSchema-convertOldToNewYaml() /opt/lampp/
htdocs/rs_propel_1/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/
task/sfPropelBaseTask.class.php:112

Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/addon/
sfPropelDatabaseSchema.class.php on line 153

Call Stack:
0.0003 323588   1. {main}() /opt/lampp/htdocs/rs_propel_1/
symfony:0
0.0029 579384   2. include('/opt/lampp/htdocs/rs_propel_1/lib/
vendor/symfony/lib/command/cli.php') /opt/lampp/htdocs/rs_propel_1/
symfony:14
0.13795895252   3. sfSymfonyCommandApplication-run() /opt/
lampp/htdocs/rs_propel_1/lib/vendor/symfony/lib/command/cli.php:20
0.14215896808   4. sfTask-runFromCLI() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/command/
sfSymfonyCommandApplication.class.php:76
0.14235897600   5. sfBaseTask-doRun() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/task/sfTask.class.php:97
0.15696489624   6. sfPropelBuildAllLoadTask-execute() /opt/
lampp/htdocs/rs_propel_1/lib/vendor/symfony/lib/task/
sfBaseTask.class.php:68
0.15996625604   7. sfTask-run() /opt/lampp/htdocs/rs_propel_1/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBuildAllLoadTask.class.php:79
0.16026629544   8. sfBaseTask-doRun() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/task/sfTask.class.php:173
0.16066631988   9. sfPropelBuildAllTask-execute() /opt/lampp/
htdocs/rs_propel_1/lib/vendor/symfony/lib/task/sfBaseTask.class.php:68
0.16076636032  10. sfTask-run() /opt/lampp/htdocs/rs_propel_1/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBuildAllTask.class.php:84
0.16086638984  11. sfBaseTask-doRun() /opt/lampp/htdocs/
rs_propel_1/lib/vendor/symfony/lib/task/sfTask.class.php:173
0.16116641000  12. sfPropelBuildModelTask-execute() /opt/
lampp/htdocs/rs_propel_1/lib/vendor/symfony/lib/task/
sfBaseTask.class.php:68
0.16116641124  13. sfPropelBaseTask-schemaToXML() /opt/lampp/
htdocs/rs_propel_1/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/
task/sfPropelBuildModelTask.class.php:59
0.17206921152  14. sfPropelDatabaseSchema-
convertOldToNewYaml() /opt/lampp/htdocs/rs_propel_1/lib/vendor/
symfony/lib/plugins/sfPropelPlugin/lib/task/sfPropelBaseTask.class.php:
112

Any idea?

Javi

-- 
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] Question about a propel query

2010-10-04 Thread Javier GARCIA
Hi,

I have this query inside a method:


public static function pincopalla(){

 $con = Propel::getConnection(SediI18nPeer::DATABASE_NAME);

 $sql = select * from sedii18n where culture = :country
 UNION
 select * from sedii18n where culture  :country;


 $stmt = $con-prepare($sql);

$result = $stmt-execute(array(':country' = 'eu'));

return $result;

}

When i call the method i get the symfony error below tough
cashgold_new.sedii18n exists..:

500 | Internal Server Error | PDOException SQLSTATE[42S02]: Base table or
view not found: 1146 Table 'cashgold_new.sedii18n' doesn't exist stack trace

   - at **()
   in *
   
SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/DebugPDOStatement.php
   * line 99 ...
   1. public function execute($input_parameters = null)
 2. {
 3. $debug= $this-pdo-getDebugSnapshot();
 4. $return= parent::execute($input_parameters);
 5.
 6. $sql = $this-getExecutedQueryString();
 7. $this-pdo-log($sql, null, __METHOD__, $debug);

To debug it i have changed the class name of the argument of
getConnection(), expecting the same error, but...the error is not the
same!..:


Fatal error: Class 'SediBlaBlaI18nPeer' not found in
/home/javier/Aptana_Studio_Workspace/cashgold/lib/model/SediI18nPeer.php on
line *25*


Any idea whats the problem?

Javi

-- 
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] Any way to retrieve from the layout to the name of the template of the action?

2010-09-07 Thread Javier Garcia

 Hi,

hi, any way to retrieve from the layout to the name of the template of 
the action?


--
Javi

Ubuntu 10.04, sf 1.4

--
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 translate the layout texts?

2010-09-02 Thread Javier Garcia
Sorry, my fault.

On Sep 2, 11:54 am, Javier Garcia tirengar...@gmail.com wrote:
   Hi,

 i have added something like this below in the layout:

 ?php echo __('foo'); ?

 I have added ?php use_helper('I18N') ? in the top of the layout code,
 but it doesn't translate it. No problem translating the templates.

 Any idea?
 --

 Javi

 Ubuntu 10.04, sf 1.4

-- 
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] Problems after adding standard_helpers: [I18N] in settings.yml

2010-09-02 Thread Javier Garcia
 Thanks, so maybe when i add that line I'm _overwriting_ a 
configuration by default... Don't you think it would be better an 
_adding_ way ? In that way it would not be necessary adding Partial, 
etc...when you add I18N.



On 09/02/2010 12:20 PM, Gábor Fási wrote:

Add the Partial helper to the list.

On Thu, Sep 2, 2010 at 12:19, Javier Garciatirengar...@gmail.com  wrote:

Hi,

i have added the line below in settings.yml.

 standard_helpers:   [I18N]

After that, when i load a page i get this message:

Fatal error: Call to undefined function include_partial() in
/opt/lampp/htdocs/rs12/apps/frontend/modules/miembros/templates/indexSuccess.php
on line 9

Any idea?

--
Javi

Ubuntu 10.04, sf 1.4

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




--
Javi

Ubuntu 10.04, sf 1.4

--
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: The form empty values are not translated

2010-09-02 Thread Javier Garcia
No idea?

On Aug 24, 1:46 pm, Javier Garcia tirengar...@gmail.com wrote:
   Hi,

 I have a select to change the language of my forms and i have this widget:

 $this-setWidget('fecha_nac', new sfWidgetFormI18nDate(array('culture'
 = 'es_ES',
                                                      'years' =
 array_combine($years, $years),
                                                      'empty_values' =
 array('day' = 'Dia', 'month' = 'Mes', 'year' = 'A o')))

 );

 I have the translated values this way:

 body
 trans-unit
 sourceChico/source
 targetMale/target
 /trans-unit
 trans-unit
 sourceChica/source
 targetFemale/target
 /trans-unit
 trans-unit
 sourceMes/source
 targetMonth/target
 /trans-unit
 trans-unit
 sourceDia/source
 targetDay/target
 /trans-unit
 trans-unit
 sourceA o/source
 targetYear/target
 /trans-unit
 /body

 No problem with the sex widget (Chico  Male, Chica  Female) butDia/Mes/Year 
 is not translated.

 Any idea?

 --
 Javi

 Ubuntu 8.04

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

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


[symfony-users] Trying to call an object method.

2010-08-30 Thread Javier Garcia

 Hi,

I have created an object method called getContenidoParcial(). When i 
call it, i get the error Unknown record property / related component 
contenido_parcial on Mensaje


I created the method I say inside the Mensaje class this way:

class Mensaje extends BaseMensaje
{

public function getContenidoParcial()
{

Any help?

--
Javi

Ubuntu 8.04, sf 1.4

--
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] Trying to set sfGuardUser objects after applying

2010-08-28 Thread Javier Garcia

 Hi,

i have installed sfDoctrineGuardPlugin and sfDoctrineApplyPlugin.

When a user is register through sfApply/apply i would like to save the 
value of the field 'email' of that apply form in the sfGuardUser 
'email_address' field. So I added this in executeApply:



$this-form-getObject()-getUser()-setEmailAddress($this-form-getValue('email'));



The problem: two sfGuardUser objects are created after a user applies 
for an account: the first one with the values entered in the apply form 
and the second one has the 'email_address' field with the value that the 
user wrote in the field 'email'.


I expected just one object is created. So what should i do?

--
Javi

Ubuntu 8.04. sf 1.4

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

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


[symfony-users] How to setup magento and symfony?

2010-08-28 Thread Javier Garcia

 Hi,

just that.


--
Javi

Ubuntu 8.04. sf 1.4

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

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


[symfony-users] How to translate a text that contains p/p ?

2010-08-27 Thread Javier Garcia

 Hi,

i want to translate this below:

?php echo __(EOM
p
For security reasons...
/p
EOM
) ?

So i create this translation unit:

trans-unit
sourceFor security reasons.../source
targetPor razones de seguridad.../target
/trans-unit

The problem: it is not translated less than i remove the p/p tags.

Any way to translate it keeping those tags?

--
Javi

Ubuntu 8.04

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

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


  1   2   3   4   >