[symfony-users] [2.0] [Routing] Using the AnnotationGlogLoader routing loader

2011-05-06 Thread Florian
Hi!

Do someone is using AnnotationGlobLoader for routing ?

I'm encoutering a problem and trying to find where it happens.


I'm adding a resource in my app/config/routing.yml by using this syntax:

``` php

etf1_block_front:
resource: @Etf1*BlockBundle/Controller/
type: annotation
prefix:   /b

```

The fact that I use an * in my resource and the type is annotation should 
resolve the glob pattern before parsing my controller classes.
Unfortunatly it's not the case.

Any thoughts ?

Thanks,
Florian.



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

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


[symfony-users] Please unsubscribe me from this group

2011-04-16 Thread Florian Kirchner
[Symfony-users]  [symfony-devs]

-- 
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] ACL - Problem

2011-03-11 Thread Florian Semm
hi, 

following situation: i have a area for user-registration. everyone has access 
to it. if the registration was correct, the user should edit his profile with 
the same forms. so what acl/role-hierarchy is necessary for it. after a 
successful registration the user has the role ROLE_CANDIDATE. at present my acl 
is following:

  access_control:
- { path: /backend/.*, role: ROLE_USER }
- { path: /.*, role: IS_AUTHENTICATED_ANONYMOUSLY }

the path for the registration is /candidate/personal. 

thx FS

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

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


Re: [symfony-users] Re: User Authentication

2011-03-08 Thread Florian Semm

Am 08.03.2011 15:56, schrieb Donald:

OK, I modified the security.yml file as follows:

# app/config/security.yml
security:
   access_denied_url: /error403

   providers:
 entity:
   entity: { class: UserBundle:User, property: username }

   firewalls:
 main:
   form_login:
 check_path:   /login_check
 login_path:   /login
 failure_path: /login
   logout: true

And I still get the following error after submitting the login form:

Unable to find the controller for path /login_check. Maybe you
forgot to add the matching route in your routing configuration?

On Mar 7, 2:27 pm, Christophe COEVOETs...@notk.org  wrote:

Le 07/03/2011 21:24, Donald a crit :  Christophe,


Thanks for the response.
I'm aware that there are certain features missing from my example
above. But I'm trying to keep this test case very limited so I can
concentrate on the problem at hand; being that the check
authentication is not working.

Sure, but your issue can be this: when the authentication fails, the
request is not redirected so you need to have a controller. Thus it
would display the authentication error (which also appear in the logs if
you log debug messages)

--
Christophe | Stof

hi,

i think something is missing in your config. add
anonymous: true and pattern: .*
to your config. it looks like this:

security:
  access_denied_url: /error403

  providers:
entity:
  entity: { class: UserBundle:User, property: username }

  firewalls:
main:
  pattern: .*
  form_login:
check_path:   /login_check
login_path:   /login
failure_path: /login
  logout: true
  anonymous: true

FS


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

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


Re: [symfony-users] Re: Bundle HelloBundle does not contain any mapped entities.

2011-02-28 Thread Florian Semm

maybe it's a config-problem. Try this:

doctrine:
orm:
mappings:
HelloBundle: { type: yaml, dir: path/to/mapping/dir }

The dir is relative to the bundle dir.



Am 28.02.2011 18:14, schrieb oscar balladares:
Do you have your entity mapped in 
Sensio/HelloBundle/Resources/config/doctrine/metadata/orm/Sensio.HelloBundle.Entity.YourEntityName.dcm.yml 


???

something like:

//Sensio.HelloBundle.Entity.User.dcm.yml

Sensio\HelloBundle\Entity\User:
type:  entity
table:  user
id:
id:
type:  integer
generator:
strategy:  IDENTITY
fields:
name:
type:  string
length:  50
lastname:
type:  string
length: 50
address:
type:  string
length: 100
new:
type:  string
length: 50
Also you need to clear the cache, as Chris, said.
I had some headaches with the cache, I had to clear it, but before 
doing the doctrine:generate:entities HelloBundle I had to

warmup the cache.

So try clearing the cache, running the command, if not, clear the 
cache and warmup it, and then run the command.



2011/2/28 Christian Schaefer cae...@gmail.com mailto:cae...@gmail.com


hmm.. I'm doing it almost the same way than you.

$ php app/console doctrine:mapping:import HelloBundle xml (I use xml
actually but that doesn't matter much)
$ php app/console doctrine:generate:entities HelloBundle

remember to delete all backups in HelloBundle/Entity/ (starting with a
'~').

this is my app/config/config.yml

 66 # Doctrine Configuration
 67 doctrine:
 68dbal:
 69dbname:   my_db
 70user: root
 71password: my_pw
 72logging:  %kernel.debug%
 73orm:
 74auto_generate_proxy_classes: %kernel.debug%
 75mappings:
 76HelloBundle: ~

also remember to clear the cache.

On 21 Feb., 00:42, fa florent.arcam...@gmail.com
mailto:florent.arcam...@gmail.com wrote:
 Hi everyone

 That's my first try with Sf2 Sandbox pr6.

 I v got BDD  on mysql done with mysqlWorkbench

 I mange to configure my connection

 ## Doctrine Configuration
 doctrine.dbal:
 dbname:   mydbname
 user: root
 password: null
 logging:  %kernel.debug%
 doctrine.orm:
 default_entity_manager: default
 auto_generate_proxy_classes: %kernel.debug%
 entity_managers:
 default:
 connection:   default
 mappings:
 #HelloBundle: ~
 #HelloBundle: { type: yml, dir: Resources/config/doctrine/
 mapping }
 HelloBundle: { type: yml, dir: Resources/config/doctrine/
 metadata/orm }

 I ve try to create the schema.yml from the bdd like Iwas use to
do in
 sf1

 So in the CLI i typed:
 php app/console doctrine:mapping:import HelloBundle yml
--em=default

 It generated me lots of file in my
 rep
 SandBox\Sensio\HelloBundle\Resources\config\doctrine\metadata\orm

 My pb is when I try to generate entities from this import:

 C:\wamp\www\symfony2\sandboxphp app/console doctrine:mapping:info
 Found 0 entities mapped in entity manager 'default'

 or when I try:

 C:\wamp\www\symfony2\sandboxphp app/console
 doctrine:generate:entities HelloBundle

   [RuntimeException]
   Bundle HelloBundle does not contain any mapped entities.

 Any help would be rea

--
If you want to report a vulnerability issue on symfony, please
send it to security at symfony-project.com
http://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 mailto:symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


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

Re: [symfony-users] no user-token after login

2011-02-24 Thread Florian Semm
i have modifiyed my config. i think is nearly the same to your config.

security:
  encoders:
users:
  class: Project\UserBundle\Entity\User
  algorithm: plaintext
  providers:
default:
  entity: { class: UserBundle:User }
  firewalls:
backend:
  pattern: /.*
  form-login: 
login_path: /login
check_path: /login_check
  logout: true
  provider: default
  anonymous: true
  access_control:
- { path: /backend/.*, role: ROLE_USER }

the login/session-data is still okay, but the security.context stores an 
anoymous-token again.

 Original-Nachricht 
 Datum: Tue, 22 Feb 2011 17:06:28 +0100
 Von: Christophe COEVOET s...@notk.org
 An: symfony-users@googlegroups.com
 Betreff: Re: [symfony-users] no user-token after login

 Le 22/02/2011 16:52, Florian Semm a écrit :
  hi,
 
  i have no access to the user-token when i calling the
 'security.context'. the logger says that a user has logged in successfully 
 and there are also
 data in the session
 The context is not shared between the different firewalls by default so 
 you have to use the same firewall for the login and the securized part. 
 So you will only use one firewall unless you want separate 
 authentications on the frontend and the backend.
 
 The firewall is about *authentication* (knowing who your user is) not 
 about authorization. The authorization work has to be done with the 
 access control map, not with the pattern of the firewall.
 
 -- 
 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

-- 
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: Getting configured DBAL connection outside controller

2011-01-15 Thread Florian


Christophe is right: define a new service and give him the DBAL service as a 
dependency.

Then you can define this service as a security provider like this:

providers:
my_provider:
id: my_service_id


where my_service_id is the id of the service you defined in the DIC.


Your service has to implement 
http://api.symfony-reloaded.org/PR4/Symfony/Component/Security/User/UserProviderInterface.html


But as Christophe said, you should use FOS\UserBundle ( 
https://github.com/FriendsOfSymfony/UserBundle ).



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

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


Re: [symfony-users] Re: Encoder error after login

2011-01-14 Thread Florian Semm
Hi,

no sorry it doesn't work with this config. 

I found the first encoder-config in the symfony2-docu.


FS

 Original-Nachricht 
 Datum: Thu, 13 Jan 2011 09:45:13 -0800 (PST)
 Von: Douglas dgreenshie...@gmail.com
 An: symfony users symfony-users@googlegroups.com
 Betreff: [symfony-users] Re: Encoder error after login

 Hi there
 
 Instead of:
 
   encoder:
 Symfony\Component\Security\User\User: plaintext
 
 try:
 
   encoder:
 class: Symfony\Component\Security\User\User
 algorithm: plaintext
 
 Douglas
 
 
 
 
 On Jan 13, 9:14 am, Duffman florian.s...@gmx.de wrote:
  After login i get the error-message:
 
  Uncaught exception 'RuntimeException' with message 'Each encoder needs
  an account class.
 
  My config:
 
  security.config:
    encoder:
      Symfony\Component\Security\User\User: plaintext
    providers:
      main:
        users:
          florian: { password: test, roles: ROLE_USER }
    firewalls:
      login: { pattern: /login, security: true, anonymous: true }
      login_check: { pattern: /login_check, security: true, anonymous:
  true, form_login: true }
      profiler: { pattern: /_profiler.*, security: true, anonymous:
  true }
      main:
        pattern:    /backend
        form_login: { check_path: /login_check }
        logout:     { path: /logout, target: /login }
        anonymous:  true
    access_control:
      - { path: /login, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: /login_check, role: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: .*, role: [ ROLE_USER, IS_AUTHENTICATED_ANONYMOUSLY ] }
 
  any ideas?
 
 -- 
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com
 
 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

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

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


[symfony-users] Re: How to avoid breaking MVC separation while loading partial from controller.

2010-12-23 Thread Florian
Thats the way it should be done IMHO.

You just should use the shortcut: 

return $this-renderPartial('myPartial', array('myVrialbles'= $val));


You could also use a full view rendering, by returning sfView::SUCCESS; (or 
wathever else)
and then move your presentation in the fastActionSuccess.php template.

If your view needs to be customized, you should move it in a separate 
template, instead of doing everything in your action.

But if you just render a partial, it finally the same:
- return the name of the template to render
- return the rendered partial



-- 
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 load a Doctrine 2 Custom Mapping

2010-12-21 Thread Florian
Are you talking about this ?

http://www.doctrine-project.org/docs/orm/2.0/en/reference/basic-mapping.html#custom-mapping-types

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

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


Re: [symfony-users] Re: inject a dependency in constructor at runtime

2010-12-12 Thread Florian
I'm answering to myself, but I found a way to handle this:
http://docteurklein.posterous.com/36073492

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

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


Re: [symfony-users] Re: inject a dependency in constructor at runtime

2010-12-08 Thread Florian
A Paginator is probably not an object you want to manage with the DIC.

The DIC is good at managing global objects like a logger, the user
(from the session), a database connection, ... all the objects for which
you only need one instance. For everything else, the DIC is not the
solution (like your model objects for instance -- you need many
articles, products, ...).

Fabien



I'm agree with that, but could this be handled with the shared
parameter of the service definition ?
I mean for everything else than model objects.

-- 
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: Learning Symfony2 is difficult because...

2010-12-07 Thread Florian
Hi,

Short answer, from my little experience on the framework:

You're true, some bundles are outdated, due to the fact things are
moving fast, and the documentation is impacted too.
So a lot of old slides are showing some examples that simply doesn't
work!

You should always follow changes on recent bundles and/or follow the
framework commits itself ( github ).
That's where you will find the best answers.

Now, concerning best practices on Namespaces and naming conventions,
it is still discussed by the core team, so don't forget it's still PR,
even not beta!
BUT, some bundles like DoctrineUserBundle are very specific on a few
things like DAO, so I think it's normal there is no default naming or
conventions.




On 7 déc, 01:24, Flukey jstevenh...@gmail.com wrote:
 I've been doing a lot of fiddling around with Symfony2 (latest PR4
 release) and reading a lot of it's documentation (I've read pretty
 much all of it)

 The problem i'm faced with now, are the best practices.

 I've looked at many of the bundles/projects source on
 symfony2bundles.org and they all have different ways of managing their
 entities, repositories, different file structure etc.

 For example, some have entity classes but no repositories. Some have
 repositories, entities and interfaces to repositories. There doesn't
 seem to be any best-practice consistency across all of the projects.
 Should I put my queries in a repository class and keep it in the
 entities folder or move it to a model folder? Should I always create
 interfaces? When doing a doctrine query, should I always use the
 NoResultException if a query returns null? or should I use something
 different? I appreciate that some of the bundles/projects are old and
 they've become outdated because of all the new changes applied to the
 current version.

 The forms part of the framework interests me greatly but there doesn't
 seem to be much documentation (particularly for twig form templates).
 I also don't know if I should put my form configuration in my entities
 class or create a new model class? or should I create the form in an
 action?

 Also, from reading a presentation (http://www.slideshare.net/jwage/
 symfony2-and-doctrine2-integration) i'm confused about actions. In
 this slideshow it says the action should extend the
 sfDoctrineController. Should I use that?

 From looking at the framework, I can clearly see that the symfony team
 have done a fantastic job. It's very impressive. I know it's early
 days and I shouldn't expect too much documentationbut there
 doesn't seem to be a little project which uses Doctrine2 and Twig
 Forms which has been confirmed as a good project for learning best
 practices from. (It would be great if a Symfony2 version of 'jobeet'
 is written up)

 I know it's look like i'm ranting folks but it's just a bit
 frustrating to look at multiple bundles/projects to see they all have
 a different file structure and code patterns. It's incredibly
 confusing. I'm stuck between a rock and a hard place. It's a shame
 because I *really* want to get up to speed on the framework so come
 March 2011 when it's due to be released i'll be ready to go and start
 developing production-ready applications.

 What are your thoughts?  Are you experiencing any of the same
 confusion?

 Thanks muchly!

 Jamie

-- 
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: inject a dependency in constructor at runtime

2010-12-07 Thread Florian
Ok, it confirms what I was thinking.

But one of the goals of DI is to give flexibility and externalize (or
invert) the class instanciations too.
So what if the end user wants to change the Paginator class ?

Should I set the class name as a DI parameter and then use it to
create my class ? example:

$class = $this-container-getParameter('ecommerce.paginator.class');
$adapterClass = $this-container-
getParameter('ecommerce.paginator.adapter.class');

$adapter = new $adapterClass($query);
new $class($adapter);


Do you think it's a good idea?

Thanks btw,
Florian.


On 7 déc, 09:19, Fabien Potencier fabien.potenc...@symfony-
project.com wrote:
 On 12/6/10 9:06 PM, Florian wrote:

  Ok I should have reformulated my question:

  I know it's actually impossible to do that, but the goal of my
  question is: How to bypass the problem ?

 A Paginator is probably not an object you want to manage with the DIC.

 The DIC is good at managing global objects like a logger, the user
 (from the session), a database connection, ... all the objects for which
 you only need one instance. For everything else, the DIC is not the
 solution (like your model objects for instance -- you need many
 articles, products, ...).

 Fabien







  Do I have to modify the lib to work with setters injection ?

  On Dec 6, 8:59 pm, Floriansideral.undergro...@gmail.com  wrote:
  Hi,

  simple question:

  Is it possible to inject dependency at runtime with SF2 DI container ?

  For example, I'm using a Zend\Paginator\Paginator who needs an adapter
  as first argument of its constructor.
  This adapter needs a Doctrine Query object as first argument of its
  constructor too.

  Can I inject the Query object at runtime, like this ?

  $this-container-getPaginatorService($query);

  Thanks!
  Florian.

-- 
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] [DI] inject a dependency in constructor at runtime

2010-12-06 Thread Florian
Hi,

simple question:

Is it possible to inject dependency at runtime with SF2 DI container ?

For example, I'm using a Zend\Paginator\Paginator who needs an adapter
as first argument of its constructor.
This adapter needs a Doctrine Query object as first argument of its
constructor too.

Can I inject the Query object at runtime, like this ?

$this-container-getPaginatorService($query);

Thanks!
Florian.

-- 
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: inject a dependency in constructor at runtime

2010-12-06 Thread Florian
Ok I should have reformulated my question:

I know it's actually impossible to do that, but the goal of my
question is: How to bypass the problem ?

Do I have to modify the lib to work with setters injection ?

On Dec 6, 8:59 pm, Florian sideral.undergro...@gmail.com wrote:
 Hi,

 simple question:

 Is it possible to inject dependency at runtime with SF2 DI container ?

 For example, I'm using a Zend\Paginator\Paginator who needs an adapter
 as first argument of its constructor.
 This adapter needs a Doctrine Query object as first argument of its
 constructor too.

 Can I inject the Query object at runtime, like this ?

 $this-container-getPaginatorService($query);

 Thanks!
 Florian.

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

2010-11-17 Thread Florian
Yes there is.

When a translation does not exist for a locale, the translator tries
to find the translation for the language (fr when the locale is fr_FR
for instance); if it also fails, it looks for a translation for the
fallback locale.

quote from http://docs.symfony-reloaded.org/master/guides/translation.html

If your session.locale is en_EN, The waited behavior should load:
  - messages.en_EN.xml
  -  if not found messages.en.xml
  - and finally the default translatable.fallback

On 17 nov, 12:18, noel guilbert noelguilb...@gmail.com wrote:
 It does not work because you're trying to load the locale named en, which
 is different of en_US or en_EN. That's why your translations are not
 loaded. There's no such default locale thing that would load en when
 en_US does not exist.

 ++

 On Mon, Nov 15, 2010 at 7:21 PM, Bertrand Zuchuat
 mailingl...@funstaff.chwrote:









  Hi,

  Thanks for your answer.

  This solution work but it's strange.

  Bertrand

  Le 15 nov. 2010 à 15:05, HTC a écrit :

   I had a similar issue and solve by renaming the translation files in

   messages.en_EN.php
   messages.de_DE.php
   messages.en_US.php

   but still don't know why it doesn't work with just '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.comsymfony-users%2bunsubscr...@goog 
  legroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Noël GUILBERThttp://www.noelguilbert.com/
 Twitter 
 :http://twitter.com/noelguilberthttp://www.sensiolabs.comhttp://www.symfony-project.com
 Sensio Labs
 Tél: +33 1 40 99 80 80

-- 
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: WkHtmlToPdf in Symfony

2010-11-17 Thread Florian
Seems like a DIC configuration problem.

You should open app/cache/dev/appDevDebugProjectContainer.php at line
mentionned and watch.

Maybe your app/config/config.yml doesn't load the extension:

snappy.image: ~
snappy.pdf: ~

Try to add these two lines in your config and see.

On Nov 17, 5:11 pm, ming minga...@gmail.com wrote:
 Do you have tried SnappyBundle on Symfony2?
 It give me this error:
 Undefined property: appDevDebugProjectContainer::$snappyPdf

 Probably I've missed some configuration parameters or setted it
 wrongs.
 I've downloaded and placed Snappy php5 lib on src/vendor dir as
 reported in the Requirements section of the readme

 ## Requirements
 You should have [Snappy](http://github.com/knplabs/snappy) (php5.3
 branch) installed in your src/vendor dir and registered in your
 autoload.

 In my autoload.php
 I've added:
 'Snappy'                         = $vendorDir.'/snappy/src'
 and also registered the Bundle in registerBundles method of my
 AppKernel.php
 new Bundle\SnappyBundle\SnappyBundle(),

 wkhtmltopdf lib is correctly installed under my Ubuntu machine. I use
 it without problem both from shell and from symfony 1.4 applications
 too.

 On 19 Ott, 09:25, Florian sideral.undergro...@gmail.com wrote:







  Hi,

  If you're talking of Symfony2, there is a bundle for that 
  :http://symfony2bundles.org/knplabs/SnappyBundle

  It uses the Snappy php5 lib, which is a wrapper for 
  wkhtml2pdf.http://github.com/knplabs/snappy

  On 19 oct, 09:03, fxsymfony fari...@gmail.com wrote:

   Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
   (in works on command line) but don't know how to use in Symfony to
   generate pdf files.

-- 
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: Security: after login still not logged

2010-11-09 Thread Florian
Hi,

I think you missed the third part of security config: the
access_control list ( Authorization )
http://docs.symfony-reloaded.org/master/guides/security/index.html

try adding this in your config:

access_control:
- { path: /admin/.*, role: ROLE_ADMIN }
- { path: /.*, role: IS_AUTHENTICATED_ANONYMOUSLY }

The way you configured your security means /.* urls are accessible for
all ( security: false ).
Only /admin/.* urls are secured, but you have to tell explicitly to
the security component what kind of authorization is able to see these
urls.
By adding the /admin/.* access_control, you say only users with role
ROLE_ADMIN ( thus authenticated ) can see those resources.


On Nov 9, 5:15 pm, gordonslondon jules.boussek...@gmail.com wrote:
 Hi,

 After successfully login with the security component, i dump
 $container-get('security.context')-getUser(); wich return null, in
 the debug toolbar the user is still anon..

 What i've checked:
  - Nothing interesting in logs.
  - There's no error message, all went fine.
  - The user is found and his password is encoded like described in the
 documentation.
  - After login, i'm redirected to /index.php/ like a successful login
 (but still non logged).

 security.config:
     providers:
         main:
             password_encoder: sha1
             entity: { class: GordBundle:Account, property: email }
     firewalls:
         login_check: { pattern: /login_check, security: true,
 anonymous: true, form-login: true }
         backend:
             pattern:    /admin/.*
             form_login: true
             logout:  true
         public:
             pattern:    /.*
             security: false
             form_login: true

 Normally the user should be logged in, but not.
 Is someone has any idea on why i can't 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] Re: Security: after login still not logged

2010-11-09 Thread Florian
It could come from an issue with the session read/write, plese see:

http://groups.google.com/group/symfony-devs/msg/794ede4676fca362?

On Nov 9, 5:15 pm, gordonslondon jules.boussek...@gmail.com wrote:
 Hi,

 After successfully login with the security component, i dump
 $container-get('security.context')-getUser(); wich return null, in
 the debug toolbar the user is still anon..

 What i've checked:
  - Nothing interesting in logs.
  - There's no error message, all went fine.
  - The user is found and his password is encoded like described in the
 documentation.
  - After login, i'm redirected to /index.php/ like a successful login
 (but still non logged).

 security.config:
     providers:
         main:
             password_encoder: sha1
             entity: { class: GordBundle:Account, property: email }
     firewalls:
         login_check: { pattern: /login_check, security: true,
 anonymous: true, form-login: true }
         backend:
             pattern:    /admin/.*
             form_login: true
             logout:  true
         public:
             pattern:    /.*
             security: false
             form_login: true

 Normally the user should be logged in, but not.
 Is someone has any idea on why i can't 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] Re: sending email from task through CLI

2010-11-08 Thread Florian
One php.ini per environment ( apache/ CLI )

In some linux distros like Ubuntu or debian, each php.ini is a
symbolic link which is pointing to the same file.

On Nov 8, 9:46 am, hribo hribo...@gmail.com wrote:
 issue is solved.
 problem was that my php.ini settings of phpinfo() where different when
 i looked through web browser and through CLI.
 i made changes to the one in directory where is my php installed.

 but i DO NOT REALLY UNDERSTAND how and why is it possible that i have
 to change 2 php.ini files.
 i am using wamp server. is there any purpose to have 2 php.ini files
 to manage them?
 thank you for your help.

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

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


[symfony-users] Re: sending email from task through CLI

2010-11-05 Thread Florian
It looks like the stream socket transport you're using doesn't exist.

try with sslv3 or sslv2 encryption method:

 transport:
class: Swift_SmtpTransport
param:
  host: smtp.gmail.com
  port: 465
  encryption: sslv3
  username: x...@gmail.com
  password: 


On 5 nov, 13:24, hribo hribo...@gmail.com wrote:
 i would like to ask you for the way to send email from the task. i
 know there are plenty of discussions showing how to do it.
 but i have actually problem when i am sending my emails, and this
 error shows up:

 Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
 (Unable to find the socket transport ssl - did you forget to enable
 it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
 \symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
 \StreamBuffer.php on line 233

   Connection could not be established with host smtp.gmail.com [Unable
 to find the socket transport ssl - did you forget to enable it when
 you configured PHP? #274232]

 my factories.yml is set correctly for sure, because when i am sending
 emails not from tasks, IT WORKS. just not through task.
       transport:
         class: Swift_SmtpTransport
         param:
           host: smtp.gmail.com
           port: 465
           encryption: ssl
           username: x...@gmail.com
           password: 

 i have also looked on my phpinfo() function and there i have already
 allowed SSL:
 Registered Stream Socket Transports     tcp, udp, ssl, sslv3, sslv2, tls

 do you know where is the problem?
 thank you

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

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


[symfony-users] Re: sending email from task through CLI

2010-11-05 Thread Florian
Another question: did you run phpinfo() function from the cli ?

php -a
 phphinfo();

or php -r phpinfo();



On 5 nov, 14:09, Florian sideral.undergro...@gmail.com wrote:
 It looks like the stream socket transport you're using doesn't exist.

 try with sslv3 or sslv2 encryption method:

      transport:
         class: Swift_SmtpTransport
         param:
           host: smtp.gmail.com
           port: 465
           encryption: sslv3
           username: x...@gmail.com
           password: 

 On 5 nov, 13:24, hribo hribo...@gmail.com wrote:







  i would like to ask you for the way to send email from the task. i
  know there are plenty of discussions showing how to do it.
  but i have actually problem when i am sending my emails, and this
  error shows up:

  Warning: fsockopen(): unable to connect to ssl://smtp.gmail.com:465
  (Unable to find the socket transport ssl - did you forget to enable
  it when you configured PHP?) in C:\wamp\www\my_sites\_SYMFONY
  \symfony-1.4.3\lib\vendor\swiftmailer\classes\Swift\Transport
  \StreamBuffer.php on line 233

    Connection could not be established with host smtp.gmail.com [Unable
  to find the socket transport ssl - did you forget to enable it when
  you configured PHP? #274232]

  my factories.yml is set correctly for sure, because when i am sending
  emails not from tasks, IT WORKS. just not through task.
        transport:
          class: Swift_SmtpTransport
          param:
            host: smtp.gmail.com
            port: 465
            encryption: ssl
            username: x...@gmail.com
            password: 

  i have also looked on my phpinfo() function and there i have already
  allowed SSL:
  Registered Stream Socket Transports     tcp, udp, ssl, sslv3, sslv2, tls

  do you know where is the problem?
  thank you

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

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


[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-27 Thread Florian
you can pass extra parameters like this:

$request-setParameter('id', 1);

On 26 oct, 21:48, ming minga...@gmail.com wrote:
 On 26 Ott, 15:26, Florian sideral.undergro...@gmail.com wrote:





  In order to get the html result of the action execution, yoi can use
  another solution(, which is a way better than the file_get_contents
  solution mentionned here:http://www.symfonyexperts.com/question/show/id/141
  )

  in your action:

  $html = $this-getController()-getPresentattionFor('module',
  'action');
  file_put_contents('/tmp/html.html', $html);

  $snappy = new SnappyPdf;
  $snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else
  $snappy-save('/tmp/html.html', '/tmp/pdf.pdf');

  Hope it works ! ( cause i didn't tested)

 I have already tried this solution, but unfortunately
 getPresentationFor() doesn't permit to pass in some parameters...
 :(
 It only works for module/action without parameters so is unusable in
 my case, because the view that I need to convert to pdf is generated
 by an action that receive an Id of the object to generate.

 Anyway, many thanks. :)

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

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


[symfony-users] Re: symfony or doctrine... or is it me?

2010-10-27 Thread Florian
Hi,

You should enable the db logging and try the generated sql by hand.

http://www.symfony-project.org/book/1_2/16-Application-Management-Tools

On 27 oct, 14:40, erikms erik.stok...@gmail.com wrote:
 Hi all,
 I have an MS SQL database I want to access, and dutifully RTFM,
 installed pdo_dblib, libtds, made my database connection
 and I can connect, no problem. simple queries also are no problem:
 $q = 'Afgh';
 $countries = Doctrine::getTable('MSCountries')
 -createQuery('m')
 -where('m.name like ?', '%' . $q . '%')
 -execute();

 which gives me, indeed, 'Afghanistan'.
 So far, so good. However, when I make my query more complex, say with
 -orWhere('m.name like ?', '%Swit%')
 I get an SQL error telling me that the last '?' has not been
 substituted.

 So... am I going about this wrong? or is Doctrine being buggy? or is
 this a symfony matter?
 running symfony-1.4.6

 -Erik

-- 
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: WkHtmlToPdf in Symfony

2010-10-26 Thread Florian
Hi,

you can use local html file too :

$snappy-save('file:///tmp/file.html', '/tmp/my.pdf');
or
$snappy-save('./file.html', '/tmp/my.pdf');

This way, you have no more problems of http/cookie credentials :)

For the images problem, you have to give either an absolute path or
run your script relative to the path to start from.

( see http://code.google.com/p/wkhtmltopdf/wiki/Usage: You need to
run wkhtmltopdf in the directory above images. )

On 23 oct, 15:10, ming minga...@gmail.com wrote:
 On Oct 22, 9:29 am, Florian sideral.undergro...@gmail.com wrote:

  Rectification:

  $snappy = new SnappyPdf;
  $snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else
  $snappy-save('http://google.fr', '/tmp/google.pdf');

 Your code work right, but how I can retrieve a page that required
 authentication?
 When I call $snappy-save, wkhtmltopdf open a new http connection with
 no cookie and credential...

-- 
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: WkHtmlToPdf in Symfony

2010-10-26 Thread Florian
In order to get the html result of the action execution, yoi can use
another solution(, which is a way better than the file_get_contents
solution mentionned here: http://www.symfonyexperts.com/question/show/id/141
)

in your action:

$html = $this-getController()-getPresentattionFor('module',
'action');
file_put_contents('/tmp/html.html', $html);

$snappy = new SnappyPdf;
$snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else
$snappy-save('/tmp/html.html', '/tmp/pdf.pdf');


Hope it works ! ( cause i didn't tested)

On 26 oct, 15:20, Florian sideral.undergro...@gmail.com wrote:
 Hi,

 you can use local html file too :

 $snappy-save('file:///tmp/file.html', '/tmp/my.pdf');
 or
 $snappy-save('./file.html', '/tmp/my.pdf');

 This way, you have no more problems of http/cookie credentials :)

 For the images problem, you have to give either an absolute path or
 run your script relative to the path to start from.

 ( seehttp://code.google.com/p/wkhtmltopdf/wiki/Usage:You need to
 run wkhtmltopdf in the directory above images. )

 On 23 oct, 15:10, ming minga...@gmail.com wrote:



  On Oct 22, 9:29 am, Florian sideral.undergro...@gmail.com wrote:

   Rectification:

   $snappy = new SnappyPdf;
   $snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else
   $snappy-save('http://google.fr', '/tmp/google.pdf');

  Your code work right, but how I can retrieve a page that required
  authentication?
  When I call $snappy-save, wkhtmltopdf open a new http connection with
  no cookie and credential...

-- 
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: WkHtmlToPdf in Symfony

2010-10-22 Thread Florian
I think you should use Snappy, it seems better written than the
integrationWithPHP example.

I didn't tested, but I would try this:

$snappy = new SnappyPdf;
$snappy-save('http://google.fr', '/tmp/google.pdf');


Read 
http://github.com/knplabs/snappy/blob/dd9cc5117769751e1f64c1b1f4c825cacd6fe1de/src/SnappyMedia.php#L35

On Oct 22, 5:28 am, fxsymfony fari...@gmail.com wrote:
 Hi Florian,

 It works ok from the command line, for example if I type:

 wkhtmltopdf-i386http://google.comgoogle.pdf

 it does create the google.pdf file.

 On the other hand, that Snappy lib seems interesting, I don't know how
 to use it though, it would be great if they had a very simple working
 example.

 Regards

 On Oct 21, 2:01 am, Florian sideral.undergro...@gmail.com wrote:



  Hi,

  try your wkhtml2pdf from the command line first.

  Didn't used the lib before, so i'm not sure.

  but as i read the code, it seems to come from an error of the command line.

  Le 20/10/2010 14:03, fxsymfony a crit :

   Hi Florian,

   Im using Symfony 1.4.

   Still having been able to get it to work, I'm using this php
   script:      http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

   and I get the following error:

   Fatal error: Uncaught exception 'Exception' with message 'WKPDF shell
   error, return code 2.' in /home/mypath/test_pdf.php:207 Stack trace:
   #0 /home/mypath/test_pdf.php(273): WKPDF-render() #1 {main} thrown
   in /home/mypath/test_pdf.php on line 207

   On Oct 19, 6:25 pm, Floriansideral.undergro...@gmail.com  wrote:
   Hi,

   If you're talking of Symfony2, there is a bundle for that 
   :http://symfony2bundles.org/knplabs/SnappyBundle

   It uses the Snappy php5 lib, which is a wrapper for 
   wkhtml2pdf.http://github.com/knplabs/snappy

   On 19 oct, 09:03, fxsymfonyfari...@gmail.com  wrote:

   Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
   (in works on command line) but don't know how to use in Symfony to
   generate pdf files.

-- 
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: WkHtmlToPdf in Symfony

2010-10-22 Thread Florian
Rectification:

$snappy = new SnappyPdf;
$snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else
$snappy-save('http://google.fr', '/tmp/google.pdf');

On Oct 22, 9:26 am, Florian sideral.undergro...@gmail.com wrote:
 I think you should use Snappy, it seems better written than the
 integrationWithPHP example.

 I didn't tested, but I would try this:

 $snappy = new SnappyPdf;
 $snappy-save('http://google.fr', '/tmp/google.pdf');

 Readhttp://github.com/knplabs/snappy/blob/dd9cc5117769751e1f64c1b1f4c825c...

 On Oct 22, 5:28 am, fxsymfony fari...@gmail.com wrote:



  Hi Florian,

  It works ok from the command line, for example if I type:

  wkhtmltopdf-i386http://google.comgoogle.pdf

  it does create the google.pdf file.

  On the other hand, that Snappy lib seems interesting, I don't know how
  to use it though, it would be great if they had a very simple working
  example.

  Regards

  On Oct 21, 2:01 am, Florian sideral.undergro...@gmail.com wrote:

   Hi,

   try your wkhtml2pdf from the command line first.

   Didn't used the lib before, so i'm not sure.

   but as i read the code, it seems to come from an error of the command 
   line.

   Le 20/10/2010 14:03, fxsymfony a crit :

Hi Florian,

Im using Symfony 1.4.

Still having been able to get it to work, I'm using this php
script:      
http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

and I get the following error:

Fatal error: Uncaught exception 'Exception' with message 'WKPDF shell
error, return code 2.' in /home/mypath/test_pdf.php:207 Stack trace:
#0 /home/mypath/test_pdf.php(273): WKPDF-render() #1 {main} thrown
in /home/mypath/test_pdf.php on line 207

On Oct 19, 6:25 pm, Floriansideral.undergro...@gmail.com  wrote:
Hi,

If you're talking of Symfony2, there is a bundle for that 
:http://symfony2bundles.org/knplabs/SnappyBundle

It uses the Snappy php5 lib, which is a wrapper for 
wkhtml2pdf.http://github.com/knplabs/snappy

On 19 oct, 09:03, fxsymfonyfari...@gmail.com  wrote:

Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
(in works on command line) but don't know how to use in Symfony to
generate pdf files.

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

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


Re: [symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-21 Thread Florian

Hi,

try your wkhtml2pdf from the command line first.

Didn't used the lib before, so i'm not sure.

but as i read the code, it seems to come from an error of the command line.


Le 20/10/2010 14:03, fxsymfony a écrit :

Hi Florian,

Im using Symfony 1.4.

Still having been able to get it to work, I'm using this php
script:  http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

and I get the following error:

Fatal error: Uncaught exception 'Exception' with message 'WKPDF shell
error, return code 2.' in /home/mypath/test_pdf.php:207 Stack trace:
#0 /home/mypath/test_pdf.php(273): WKPDF-render() #1 {main} thrown
in /home/mypath/test_pdf.php on line 207

On Oct 19, 6:25 pm, Floriansideral.undergro...@gmail.com  wrote:

Hi,

If you're talking of Symfony2, there is a bundle for that 
:http://symfony2bundles.org/knplabs/SnappyBundle

It uses the Snappy php5 lib, which is a wrapper for 
wkhtml2pdf.http://github.com/knplabs/snappy

On 19 oct, 09:03, fxsymfonyfari...@gmail.com  wrote:


Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
(in works on command line) but don't know how to use in Symfony to
generate pdf files.


--
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: WkHtmlToPdf in Symfony

2010-10-19 Thread Florian
Hi,

If you're talking of Symfony2, there is a bundle for that :
http://symfony2bundles.org/knplabs/SnappyBundle

It uses the Snappy php5 lib, which is a wrapper for wkhtml2pdf.
http://github.com/knplabs/snappy

On 19 oct, 09:03, fxsymfony fari...@gmail.com wrote:
 Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
 (in works on command line) but don't know how to use in Symfony to
 generate pdf files.

-- 
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: is there any difference between [[ ]] and [] ?

2010-10-19 Thread Florian
check the docs : 
http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_complex_credentials

As soon as you open a new  [ bracket, the logic operator changes
( AND / OR ).

You can then switch operator by doing: [[ admin, [editor, creator],
supervisor, [[ tester, editor]] ]

On 19 oct, 11:55, Gábor Fási maerl...@gmail.com wrote:
 The difference comes when you have multiple credentials:

 [c1, c2] means the user must have both c1 and c2
 [[c1, c2]] means the user must have at least one of c1 and c2

 but there's no diff between [admin] and [[admin]].



 On Tue, Oct 19, 2010 at 11:53, Javier Garci tirengar...@gmail.com wrote:
   Hi,

  is there any difference between credentials: [[admin]] and credentials:
  [admin]  ?

  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] Re: DI factory

2010-10-19 Thread Florian
Hi,

What is your problem ?

On 18 oct, 06:24, Daniel khodyre...@gmail.com wrote:
 Hello, lady and gentlemans!

 I have some problems with configure this code:

 class Container extends sfServiceContainer {
 ...
 protected function getAclService() {

     if (isset($this-shared['acl'])) return $this-shared['acl'];

     $factory = new Acl_AclFactory($this-db);
     $instance = $factory-createAcl();

     return $this-shared['acl'] = $instance;

 }
 ...
 }

 Is any solution exists?

 Tank you.

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

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


[symfony-users] Re: Symfony2 Sandbox database collation

2010-09-14 Thread Florian
Hi,


After reading the loadDbalConnection method of DoctrineExtension
( 
http://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php#L137
)

I think you could test something like this:

doctrine.dbal:
  connections:
default:
  dbname:   sf2test
  user: root
  password: pass
  driver:   PDOMySql
  charset:  utf8


But I have no idea for the collation option.
It seems that your event suscriber is the only solution.



On 9 sep, 11:28, Aleš ales.sark...@gmail.com wrote:
 How can i set the default collation in the sandbox with the YAML
 config:
 $em-getEventManager()-addEventSubscriber(new
 MysqlSessionInit('utf8','utf8_unicode_ci'));

 I found somewhere it should be like this:

 doctrine.dbal:
     dbname:   s2test
     user:        root
     password: pass
     options:
       collation: utf8_unicode_ci
       charset:  utf8

 But it doesn't work.

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

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


[symfony-users] Re: how to use short Document class name in find()?

2010-09-13 Thread Florian
hi! have a look in the cache/*container*.php and look at the
getDoctrine_orm_*service methods. the Configuration class on
EntityManager gives you a way to configure the namespaces used in a
Dql query.

http://www.doctrine-project.org/api/orm/2.0/doctrine/orm/configuration.html#setEntityNamespaces()

not tested, but hope it helps!


On 12 sep, 13:39, VolCh vol...@gmail.com wrote:
 Hello!

 I try to play with sandbox and mongodb. Following the guide I create
 bundle, controller, etc. and try to get collection from mongodb:

 namespace Application\PageBundle\Controller;

 use Symfony\Framework\FoundationBundle\Controller;

 use Application\PageBundle\Document\Page;

 class PageController extends Controller
 {
     public function createAction($title, $body)
     {
         $dm = $this-container-

 getService('doctrine.odm.mongodb.document_manager');

         $page = new Page();
         $page-setTitle($title);
         $page-setBody($body);

         $dm-persist($page);
         $dm-flush();

         return $this-redirect($this-generateUrl('page_list'));
     }
     public function listAction()
     {
         $dm = $this-container-

 getService('doctrine.odm.mongodb.document_manager');

         $pages = $dm-find('Page');

         return $this-render('PageBundle:Page:list', array('pages' =
 $pages));
     }

 }

 This isn't works in listAction(), i get:
 500 Internal Server Error - ErrorException
 Warning: class_parents(): Class Page does not exist and could not be
 loaded in /home/volch/symfony2-sandbox/src/vendor/doctrine-mongodb/lib/
 Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php line 279

 When I try $dm-find('Application\PageBundle\Document\Page'); it's
 works fine.

 So I think to use find('Page') I must register in somewhere
 Application\PageBundle\Document\Page as Page or use use
 Application\PageBundle\Document\Page; somewhere else. But i can't
 find place for it.

 Please show me this place. Thanks.

 P.S. I use annotations in Application\PageBundle\Document\Page and
 they are works in createAction()

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

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


[symfony-users] Re: how to use short Document class name in find()?

2010-09-13 Thread Florian
sorry, with ODM it's DocumentManager

On 13 sep, 08:11, Florian sideral.undergro...@gmail.com wrote:
 hi! have a look in the cache/*container*.php and look at the
 getDoctrine_orm_*service methods. the Configuration class on
 EntityManager gives you a way to configure the namespaces used in a
 Dql query.

 http://www.doctrine-project.org/api/orm/2.0/doctrine/orm/configuratio...()

 not tested, but hope it helps!

 On 12 sep, 13:39, VolCh vol...@gmail.com wrote:



  Hello!

  I try to play with sandbox and mongodb. Following the guide I create
  bundle, controller, etc. and try to get collection from mongodb:

  namespace Application\PageBundle\Controller;

  use Symfony\Framework\FoundationBundle\Controller;

  use Application\PageBundle\Document\Page;

  class PageController extends Controller
  {
      public function createAction($title, $body)
      {
          $dm = $this-container-

  getService('doctrine.odm.mongodb.document_manager');

          $page = new Page();
          $page-setTitle($title);
          $page-setBody($body);

          $dm-persist($page);
          $dm-flush();

          return $this-redirect($this-generateUrl('page_list'));
      }
      public function listAction()
      {
          $dm = $this-container-

  getService('doctrine.odm.mongodb.document_manager');

          $pages = $dm-find('Page');

          return $this-render('PageBundle:Page:list', array('pages' =
  $pages));
      }

  }

  This isn't works in listAction(), i get:
  500 Internal Server Error - ErrorException
  Warning: class_parents(): Class Page does not exist and could not be
  loaded in /home/volch/symfony2-sandbox/src/vendor/doctrine-mongodb/lib/
  Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php line 279

  When I try $dm-find('Application\PageBundle\Document\Page'); it's
  works fine.

  So I think to use find('Page') I must register in somewhere
  Application\PageBundle\Document\Page as Page or use use
  Application\PageBundle\Document\Page; somewhere else. But i can't
  find place for it.

  Please show me this place. Thanks.

  P.S. I use annotations in Application\PageBundle\Document\Page and
  they are works in createAction()

-- 
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: Choosing the best JS toolkit plugin for RIA

2010-09-13 Thread Florian
hi for extjs, have a look at atollExt3Plugin


On 10 sep, 16:09, Daniel Toffetti dto...@gmail.com wrote:
 Greg,

     I've never heard of it and have to take a deeper look, but the
 idea of sending all the business logic to the client sounds weird to
 me, and besides we want to minimize the coding in JS, even avoid it at
 all if posible !!
     IMHO that is the beauty of these JS toolkits, if you write PHP
 wrappers to the UI controls, you can do without any JS coding later. I
 used something similar in Wicket, with Java classes wrapping YUI
 controls.
     Besides this, I've not seen any datagrid, treegrid or charts
 controls in the demos, does these controls exist at all in
 SproutCore ?

 Thanks !!

 Daniel

 On 10 sep, 03:28, Greg Thornton g...@remarkablewit.com wrote:



  Or, have a look at SproutCore. It's the framework behind the new MobileMe 
  apps from Apple, which are some of the most native-feeling web apps I've 
  seen in the wild so far.

  Greg

  On Sep 10, 2010, at 12:53 AM, Stéphane wrote:

   If you want true javascript framework (with OO layer), for 
   desktop-application UI look-alike, look at qooxdoo !

   Cheers,

-- 
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: Are the design of Symfony2 and Doctrine2 in right direction?

2010-09-13 Thread Florian


On 12 sep, 16:23, Fangzx fangzhoux...@gmail.com wrote:
 I play Symfony2 and Doctrine2 for two weeks, and I came from
 Java(5years) and Python/Django(3years). My questions:
 1. Doctrine2  is so like Java Hibernate and is too heavy, I don't like
 that, for example, why not use pulic properties directly instead of
 setter and getter in the entity class.

In doctrine2, your entites are Plain Old PHP Objects ( POPO ).
Hydration is done on mapped properties.
I don't think you need setters/getters ( or I am wrong ? ) , but it's
(IMHO) a good practice.


 2. Symfony2 is more Java like than Django, all is class, I don't like
 that, I think the function should be first class citizen.

I think OO design gives OO flexibility to the application design.
It's truely a big advantage over sf1, for bundle overriding for
example:
http://groups.google.fr/group/symfony-users/browse_thread/thread/cb860c7dab7b74d6

 3. Why every route want a name in Symfony2 ?

I Agree with that.


 I switched to Lithium (li3) today, and hope Symfony2 can get something
 useful from  Lithium .

 Sorry for my bad English.

-- 
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] [Symfony2] session_start() error in Functional tests

2010-09-03 Thread Florian

 Ok thanks!

I'll try to debug this to find what's happening.

It seems to be called only once in 
src/vendor/symfony/src/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php



Le 03/09/2010 10:54, Fabien Potencier a écrit :
I'm not sure how it worked before as there is no Session storage class 
yet for functional tests.


Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/2/10 9:57 PM, Florian Klein wrote:


Bien sur, voici un lien du fichier sur github:

http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php 



Ca sera peut etre plus simple a visualiser.

Sinon, je l 'ai mis en pièce jointe.

http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.phpMerci, 


Florian.

2010/9/2 Fabien Potencier fabien.potenc...@symfony-project.com
mailto:fabien.potenc...@symfony-project.com

Can you send me your test file?

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com http://sensiolabs.com | symfony-project.org
http://symfony-project.org | fabien.potencier.org
http://fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/2/10 4:57 PM, Florian wrote:

Hi!

I'm encoutering an error since an upgrade to the latest 
Symfony2.



1) Application\ECommerceBundle\Tests\Controller
\ECommerceControllerTest::testIndex
A session had already been started - ignoring session_start()


/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpFoundation/SessionStorage/NativeSessionStorage.php:83

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpFoundation/Session.php:52

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpFoundation/Request.php:250

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpKernel/DataCollector/RequestDataCollector.php:41

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Bundle/

FrameworkBundle/DataCollector/RequestDataCollector.php:30

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpKernel/Profiler/Profiler.php:238

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpKernel/Profiler/ProfilerListener.php:87

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/

Debug/EventDispatcher.php:101

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpKernel/HttpKernel.php:159

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

HttpKernel/HttpKernel.php:89

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/

Kernel.php:209

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/

Client.php:92

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

BrowserKit/Client.php:208

/var/www/Symfony2-e-commerce/src/Application/ECommerceBundle/Tests/

Controller/ECommerceControllerTest.php:13

Do you have an idea why ?


--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com http://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
mailto:symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
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] [Symfony2] session_start() error in Functional tests

2010-09-02 Thread Florian
Hi!

I'm encoutering an error since an upgrade to the latest Symfony2.


1) Application\ECommerceBundle\Tests\Controller
\ECommerceControllerTest::testIndex
A session had already been started - ignoring session_start()

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/SessionStorage/NativeSessionStorage.php:83
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Session.php:52
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Request.php:250
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/DataCollector/RequestDataCollector.php:41
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Bundle/
FrameworkBundle/DataCollector/RequestDataCollector.php:30
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/Profiler.php:238
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/ProfilerListener.php:87
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Debug/EventDispatcher.php:101
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:159
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:89
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Kernel.php:209
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Client.php:92
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
BrowserKit/Client.php:208
/var/www/Symfony2-e-commerce/src/Application/ECommerceBundle/Tests/
Controller/ECommerceControllerTest.php:13

Do you have an idea why ?

-- 
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] [Symfony2] session_start() error in Functional tests

2010-09-02 Thread Florian Klein
Bien sur, voici un lien du fichier sur github:

http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php

Ca sera peut etre plus simple a visualiser.

Sinon, je l 'ai mis en pièce jointe.

http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php
Merci,
Florian.

2010/9/2 Fabien Potencier fabien.potenc...@symfony-project.com

 Can you send me your test file?

 --
 Fabien Potencier
 Sensio CEO - symfony lead developer
 sensiolabs.com | symfony-project.org | fabien.potencier.org
 Tél: +33 1 40 99 80 80

 On 9/2/10 4:57 PM, Florian wrote:

 Hi!

 I'm encoutering an error since an upgrade to the latest Symfony2.


 1) Application\ECommerceBundle\Tests\Controller
 \ECommerceControllerTest::testIndex
 A session had already been started - ignoring session_start()

 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpFoundation/SessionStorage/NativeSessionStorage.php:83
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpFoundation/Session.php:52
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpFoundation/Request.php:250
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpKernel/DataCollector/RequestDataCollector.php:41
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Bundle/
 FrameworkBundle/DataCollector/RequestDataCollector.php:30
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpKernel/Profiler/Profiler.php:238
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpKernel/Profiler/ProfilerListener.php:87
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
 Debug/EventDispatcher.php:101
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpKernel/HttpKernel.php:159
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 HttpKernel/HttpKernel.php:89
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
 Kernel.php:209
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
 Client.php:92
 /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
 BrowserKit/Client.php:208
 /var/www/Symfony2-e-commerce/src/Application/ECommerceBundle/Tests/
 Controller/ECommerceControllerTest.php:13

 Do you have an idea why ?


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


-- 
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
attachment: ECommerceControllerTest.php


[symfony-users] Re: a good IDE for Symfony

2010-08-30 Thread Florian
Already listed two times, but anyway :  phpstorm.

Really good java based ide. They have a pre realease availa ble for
free


On 10 août, 18:05, Paulo Ribeiro ribeiro.pau...@googlemail.com
wrote:
 Nobody mentioned. So here it goes

 http://www.jetbrains.com/phpstorm/

 For me it's the best IDE ever. It's not free, but definely worth the
 money.

 Cheers!

 On Aug 9, 10:01 am, Jarrad Kabral jarr...@gmail.com wrote:



  On Windows I can't go past PhpEd. (fast and ridiculously feature rich)

  On Mac unfortunately NetBeans is king (feature rich but sluggish)

  On Aug 4, 12:22 am, Julian Reyes Escrigas

  julian.reyes.escri...@gmail.com wrote:
   Hi

   I need help for find a new editor for PHP, I'm using Netbeans 6.9 but I
   don't know for what is slow, always start very well but when the project
   grows it's turns unstable

   I need only 3 characteristics

   1.       Faster and lightweight

   2.       With autocomplete for all classes in a folder and include folders

   3.       Support for PHP, html, CSS, JavaScript and YAML (auto colored,
   syntaxes and turn tabs into spaces )

   Some one knows any similar NO JAVA editor.

   I use Windows 7 64bits, have AMD Phenom II X4 965 3.4Ghz, 6Gb DDRIII, and
   SATAII HD

-- 
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: headers already sent

2010-08-25 Thread Florian
IMHO, this is not a HTML header problem but a HTTP headers problem. It
happens when php tris to send http headers (via header() function )
after having sent some http body response!


On 25 août, 12:57, Lutz lutz.p...@gmail.com wrote:
 This message generally occurs, when the webserver is asked to send the
 header of the HTML-page, but some content of the body-section had
 already been send to the  client (and so the header).
 I experienced this behaviour when working with symfony (1.4), when you
 do have an 'echo' or any other html-output in your action class.
 Use the action class for actions and for output the templates, this
 should solve the problem.

 The comment about the space, carriage return or closing '?' I saw
 several times as solution for this issue also, but me personally was
 never able to reproduce that in my cases.

 BR,
 Lutz

 On 25 Aug., 11:33, bibob olivier.bib...@cnfpt.fr wrote:



  Hi,
  Thank you for your answer.
  I don't find a bad space character anywhere in the actions.class or
  templates of my project.
  It's curious because when I modify a existing report, I have no
  problem, but when I create a new one, the problem appears.
  Maybe, I miss a step !

  On 20 août, 23:25, Jochen Daum jdau...@gmail.com wrote:

Hi,

On Sat, Aug 21, 2010 at 1:13 AM, bibob olivier.bib...@cnfpt.fr wrote:
Bonjour,
lors du lancement d'un rapport d'administration au format .csv dans
l'actions.class.php du module concerné, j'ai le message, en fin de
fichier, cannot modifiy header information -headerssentin /lib/
vendor/symfony/lib/response/sfWebResponse.class.php puis un paquet de
commandes HTML
J'ai vérifié la présence d'espace dans les scripts que j'ai modifiés,
j'ai retapé toutes les lignes, sans résultat. quelqu'un a-t-il une
solution ? Merci

its nearly always some characters after the closing ? of the file. I
think this happens because of transmission/charset problems most of th
time.

Short term solution is to find the file which has the additional space
characters. Long term remove ? at the end of files. I don't know what
Symfony's policy is for that.

Kind Regards,

Jochen Daum

P.S.: My french is very weak.- Zitierten Text ausblenden -

  - Zitierten Text anzeigen -

-- 
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: My attempt of a security/form strategy

2010-08-06 Thread Florian
Use something else than the session_id to generate the CSRF token
maybe ?
Or increase the session timeout ;)

what about functional tests with captcha ?

On Aug 6, 7:57 am, mlu...@gmail.com mlu...@gmail.com wrote:
 Don't you really have an opinion about this?
 I'm sure you have ;-)

 On 4 Aug., 16:44, mlu...@gmail.com mlu...@gmail.com wrote:



  Hi!

  I want to show you my attempt of a security/form strategy and want to
  know what you are thinking about it.

  *The problem:*
  If I read the source correct the CSRF_token is made of the session id
  and the class name of the form.

  When you load a form and submit it after a certain time you get a csrf
  attack because the session id has changed in the meanwhile. The
  problem is that the wrong tiken gets delivered with the form to the
  user again, so every time the user resubmitts the form you get an
  attack. The only way to get rid of the wrong token is to reload the
  form, but than the user will lose all entered values.

  A solution could be to reset the token when redelivering the form to
  the user. This way the user can resubmit the form with his/her values.
  But this makes the form accessable for XSS attacks, because an
  attacker just needs to submit the form twice, what can be done via
  javascript too.

  My ideas is to add a captcha to the form if it sees a csrf attack. The
  captcha can't be solved viy javascript.

  What does it look like for the user?

  1. The user loads a form
  2. After a certain time he submits the form.
  3. The form gets delivered to the user with his values, with reset
  csrf_token and an added captcha.
  4. The user solves the captcha and submits the form.
  5. Everything is fine.

  What do you think about it.

  regards,

  michael

-- 
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: My attempt of a security/form strategy

2010-08-06 Thread Florian
If you want to override the way CSRF token is created in a clean
manner, you can override the getCsrfToken method in your BaseForm
class.

protected function getCsrfToken()
{
return md5($this-
csrfSecret.session_id().get_class($this)); // or whatever else you
want
}

The BaseForm class is in the user land, it has been created to
customize all your application forms without having to modify core
classes.

Hope it helps!

On Aug 6, 11:22 am, mlu...@gmail.com mlu...@gmail.com wrote:
 For functional tests i turn off captcha in general.
 I do test them manually.

 Isn't the way how the token is generated implemented in the symfony
 framework?
 I don't want to make any changes in the framework, because it leads to
 problems when updating the framework.
 Can I control this part?

 On 6 Aug., 10:30, Florian sideral.undergro...@gmail.com wrote:



  Use something else than the session_id to generate the CSRF token
  maybe ?
  Or increase the session timeout ;)

  what about functional tests with captcha ?

  On Aug 6, 7:57 am, mlu...@gmail.com mlu...@gmail.com wrote:

   Don't you really have an opinion about this?
   I'm sure you have ;-)

   On 4 Aug., 16:44, mlu...@gmail.com mlu...@gmail.com wrote:

Hi!

I want to show you my attempt of a security/form strategy and want to
know what you are thinking about it.

*The problem:*
If I read the source correct the CSRF_token is made of the session id
and the class name of the form.

When you load a form and submit it after a certain time you get a csrf
attack because the session id has changed in the meanwhile. The
problem is that the wrong tiken gets delivered with the form to the
user again, so every time the user resubmitts the form you get an
attack. The only way to get rid of the wrong token is to reload the
form, but than the user will lose all entered values.

A solution could be to reset the token when redelivering the form to
the user. This way the user can resubmit the form with his/her values.
But this makes the form accessable for XSS attacks, because an
attacker just needs to submit the form twice, what can be done via
javascript too.

My ideas is to add a captcha to the form if it sees a csrf attack. The
captcha can't be solved viy javascript.

What does it look like for the user?

1. The user loads a form
2. After a certain time he submits the form.
3. The form gets delivered to the user with his values, with reset
csrf_token and an added captcha.
4. The user solves the captcha and submits the form.
5. Everything is fine.

What do you think about it.

regards,

michael

-- 
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: Problem with filters

2010-08-04 Thread florian périn
I want this filters to do the role of filter. When I choose for
exemple 'non' on enligne, there are only families with 0 on the column
enligne. But when I chose this, there is not generated SQL query...

So I don't know what to do.

On 3 août, 16:35, Tom Ptacnik to...@tomor.cz wrote:
 What do you want to this filter to do? And what is does instead?

 ... look on the generated SQL query which is creaded by the filter.
 This is the way to go to find your mistake.

 On 3 srp, 13:16, florian périn poulet.va...@gmail.com wrote:

  I use symfony 1.4.5.

  //lib/filter/doctrine/BackendgammeFormFilter.class.php

    1 ?php
    2
    3 /**
    4  * Gamme filter form backend class.
    5  *
    6  * @package    refactor_metaux
    7  * @subpackage filter
    8  * @author     Florian PÉRIN
    9  * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php
  29570 2010-05-21 14:49:47Z Kris.Wallsmith $
   10  */
   11 class BackendGammeFormFilter extends GammeFormFilter
   12 {
   13   public function configure()
   14   {
   15       $this-addWidgets();
   16       $this-addValidators();
   17       $this-widgetSchema-setNameFormat('gamme_filters[%s]');
   18       $this-errorSchema = new 
  sfValidatorErrorSchema($this-validatorSchema);

   19   }
   20
   21   public function addWidgets()
   22   {
   23     $this-setWidgets(array(
   24       'nom'          = new sfWidgetFormDoctrineChoice(array(
   25                                 'model' = 'Gamme',-
   26                                 'add_empty' = true,-
   27                                 'order_by' = array('nom',
  'asc'),-
   28                         )),
   29       'image'        = new sfWidgetFormFilterInput(),
   30       'description'  = new sfWidgetFormFilterInput(),
   31       'deuxcolonnes' = new sfWidgetFormChoice(array( 'choices' =
  array( '' = 'oui ou non', '0' = 'non', '1' = 'oui'), ) ),
   32       'enligne'      = new sfWidgetFormChoice(array( 'choices' =
  array( '' = 'oui ou non', '0' = 'non', '1' = 'oui'), ) ),
   33       'lienspe'      = new sfWidgetFormFilterInput(),
   34     ));
   35   }
   36
   37   public function addValidators()
   38   {
   39     $this-setValidators(array(
   40       'nom'          = new sfValidatorChoice( array( 'choices' =
  array($this-getObject()-get('idgamme')), 'required' = false)),
   41       'image'        = new sfValidatorPass(array('required' =
  false)),
   42       'description'  = new sfValidatorPass(array('required' =
  false)),
   43       'deuxcolonnes' = new sfValidatorChoice(array('required' =
  false, 'choices' = array( '0', '1'))),
   44       'enligne'      = new sfValidatorChoice(array('required' =
  false, 'choices' = array( '0', '1'))),
   45       'lienspe'      = new sfValidatorPass(array('required' =
  false)),
   46     ));
   47   }

  And it looks before like this:

    1 ?php
    2
    3 /**
    4  * Gamme filter form backend class.
    5  *
    6  * @package    refactor_metaux
    7  * @subpackage filter
    8  * @author     Florian PÉRIN
    9  * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php
  29570 2010-05-21 14:49:47Z Kris.Wallsmith $
   10  */
   11 class BackendGammeFormFilter extends GammeFormFilter
   12 {
   13   public function configure()
   14   {
   15       $this-addWidgets();
   16       $this-addValidators();
   17       $this-widgetSchema-setNameFormat('gamme_filters[%s]');
   18       $this-errorSchema = new 
  sfValidatorErrorSchema($this-validatorSchema);

   19   }
   20
   21   public function addWidgets()
   22   {
   23     $this-setWidgets(array(
   24       'nom'          = new sfWidgetFormFilterInput(),
   25       'image'        = new sfWidgetFormFilterInput(),
   26       'description'  = new sfWidgetFormFilterInput(),
   27       'deuxcolonnes' = new sfWidgetFormFilterInput(),
   28       'enligne'      = new sfWidgetFormFilterInput(),
   29       'lienspe'      = new sfWidgetFormFilterInput(),
   30     ));
   31   }
   32
   33   public function addValidators()
   34   {
   35     $this-setValidators(array(
   36       'nom'          = new sfValidatorPass(array('required' =
  false)),
   37       'image'        = new sfValidatorPass(array('required' =
  false)),
   38       'description'  = new sfValidatorPass(array('required' =
  false)),
   39       'deuxcolonnes' = new sfValidatorPass(array('required' =
  false)),
   40       'enligne'      = new sfValidatorPass(array('required' =
  false)),
   41       'lienspe'      = new sfValidatorPass(array('required' =
  false)),
   42     ));
   43   }

  On 3 août, 12:26, Tom Ptacnik to...@tomor.cz wrote:

   What means doesn't work?
   How it looks before ... show BaseFormFilter class, or the schema of
   the object at least.
   Which version of Symfony?

   On 3 srp, 11:01, florian périn poulet.va...@gmail.com wrote:

Hello,

I wanted to change the type of my filters auto-generate with admin-
generator, but when I did it, the filters didn't work anymore

[symfony-users] [Symfony 1.4 - Admin Generator] Problem with filters

2010-08-03 Thread florian périn
Hello,

I wanted to change the type of my filters auto-generate with admin-
generator, but when I did it, the filters didn't work anymore.

For exemple, I change :

//lib/filter/doctrine/BackendGammeFormFilter.class.php
[...]
'nom' = new sfWidgetFormDoctrineChoice(array(
   'model' = 'Gamme',
   'add_empty' = true,
   'order_by' = array('nom', 'asc'),
  )),
'enligne' = new sfWidgetFormChoice(array( 'choices = array( ' ' =
'oui ou non', 0 = 'non', 1 = 'oui') ) ),
[...]

'nom' = new sfValidatorChoice( array( 'choices' = array($this-
getObject()-get('idgamme')), 'required' = false)),
'enligne' = new sfValidatorChoice( array('required' = false,
'choices'  = array( 0, 1) ) ),
[...]

If you have any clue why it doesn't work...

Thanks,

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

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


[symfony-users] Re: Problem with filters

2010-08-03 Thread florian périn
I use symfony 1.4.5.

//lib/filter/doctrine/BackendgammeFormFilter.class.php

  1 ?php
  2
  3 /**
  4  * Gamme filter form backend class.
  5  *
  6  * @packagerefactor_metaux
  7  * @subpackage filter
  8  * @author Florian PÉRIN
  9  * @versionSVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php
29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 10  */
 11 class BackendGammeFormFilter extends GammeFormFilter
 12 {
 13   public function configure()
 14   {
 15   $this-addWidgets();
 16   $this-addValidators();
 17   $this-widgetSchema-setNameFormat('gamme_filters[%s]');
 18   $this-errorSchema = new sfValidatorErrorSchema($this-
validatorSchema);
 19   }
 20
 21   public function addWidgets()
 22   {
 23 $this-setWidgets(array(
 24   'nom'  = new sfWidgetFormDoctrineChoice(array(
 25 'model' = 'Gamme',-
 26 'add_empty' = true,-
 27 'order_by' = array('nom',
'asc'),-
 28 )),
 29   'image'= new sfWidgetFormFilterInput(),
 30   'description'  = new sfWidgetFormFilterInput(),
 31   'deuxcolonnes' = new sfWidgetFormChoice(array( 'choices' =
array( '' = 'oui ou non', '0' = 'non', '1' = 'oui'), ) ),
 32   'enligne'  = new sfWidgetFormChoice(array( 'choices' =
array( '' = 'oui ou non', '0' = 'non', '1' = 'oui'), ) ),
 33   'lienspe'  = new sfWidgetFormFilterInput(),
 34 ));
 35   }
 36
 37   public function addValidators()
 38   {
 39 $this-setValidators(array(
 40   'nom'  = new sfValidatorChoice( array( 'choices' =
array($this-getObject()-get('idgamme')), 'required' = false)),
 41   'image'= new sfValidatorPass(array('required' =
false)),
 42   'description'  = new sfValidatorPass(array('required' =
false)),
 43   'deuxcolonnes' = new sfValidatorChoice(array('required' =
false, 'choices' = array( '0', '1'))),
 44   'enligne'  = new sfValidatorChoice(array('required' =
false, 'choices' = array( '0', '1'))),
 45   'lienspe'  = new sfValidatorPass(array('required' =
false)),
 46 ));
 47   }

And it looks before like this:

  1 ?php
  2
  3 /**
  4  * Gamme filter form backend class.
  5  *
  6  * @packagerefactor_metaux
  7  * @subpackage filter
  8  * @author Florian PÉRIN
  9  * @versionSVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php
29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 10  */
 11 class BackendGammeFormFilter extends GammeFormFilter
 12 {
 13   public function configure()
 14   {
 15   $this-addWidgets();
 16   $this-addValidators();
 17   $this-widgetSchema-setNameFormat('gamme_filters[%s]');
 18   $this-errorSchema = new sfValidatorErrorSchema($this-
validatorSchema);
 19   }
 20
 21   public function addWidgets()
 22   {
 23 $this-setWidgets(array(
 24   'nom'  = new sfWidgetFormFilterInput(),
 25   'image'= new sfWidgetFormFilterInput(),
 26   'description'  = new sfWidgetFormFilterInput(),
 27   'deuxcolonnes' = new sfWidgetFormFilterInput(),
 28   'enligne'  = new sfWidgetFormFilterInput(),
 29   'lienspe'  = new sfWidgetFormFilterInput(),
 30 ));
 31   }
 32
 33   public function addValidators()
 34   {
 35 $this-setValidators(array(
 36   'nom'  = new sfValidatorPass(array('required' =
false)),
 37   'image'= new sfValidatorPass(array('required' =
false)),
 38   'description'  = new sfValidatorPass(array('required' =
false)),
 39   'deuxcolonnes' = new sfValidatorPass(array('required' =
false)),
 40   'enligne'  = new sfValidatorPass(array('required' =
false)),
 41   'lienspe'  = new sfValidatorPass(array('required' =
false)),
 42 ));
 43   }

On 3 août, 12:26, Tom Ptacnik to...@tomor.cz wrote:
 What means doesn't work?
 How it looks before ... show BaseFormFilter class, or the schema of
 the object at least.
 Which version of Symfony?

 On 3 srp, 11:01, florian périn poulet.va...@gmail.com wrote:

  Hello,

  I wanted to change the type of my filters auto-generate with admin-
  generator, but when I did it, the filters didn't work anymore.

  For exemple, I change :

  //lib/filter/doctrine/BackendGammeFormFilter.class.php
  [...]
  'nom' = new sfWidgetFormDoctrineChoice(array(
                                 'model' = 'Gamme',
                                 'add_empty' = true,
                                 'order_by' = array('nom', 'asc'),
                            )),
  'enligne' = new sfWidgetFormChoice(array( 'choices = array( ' ' =
  'oui ou non', 0 = 'non', 1 = 'oui') ) ),
  [...]

  'nom' = new sfValidatorChoice( array( 'choices' = 
  array($this-getObject()-get('idgamme')), 'required' = false)),

  'enligne' = new sfValidatorChoice( array('required' = false,
  'choices'  = array( 0, 1) ) ),
  [...]

  If you have any clue why it doesn't work...

  Thanks,

-- 
If you want to report

[symfony-users] Re: Conditional based redirects

2010-07-23 Thread Florian
Hi,

I'm using 2nd solution too.

I just thought to something different / or a mix of both ( use events
instead of filter chain ):

You could listen on lets say 'request.filter_parameters'
and if you find any parameter named 'redirect_after_create' you store
it in sfUser attributeHolder.

When you finish creation of your customer, you redirect to this stored
url or a default one if none exists.

With this solution, no more ugly urls, except the first time.
If you want to avoid this GET parameter, you could redirect GET
request to the same URL but without the 'redirect_after_create', once
you've stored that in session.

That should make the trick, no?

Cheers,
Florian.

On 23 juil, 16:24, Daniel Kucharski dan...@inspiran.be wrote:
 Yes, that is indeed a possibility (it corresponds to the second choice I
 mentioned before).  I am still searching for something which is more
 sustainable (if existent)

 From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com]
 On Behalf Of Joshua Estes
 Sent: vrijdag 23 juli 2010 14:56
 To: symfony-users@googlegroups.com
 Subject: Re: [symfony-users] Conditional based redirects

 Could you set a user attribute during step 1 and on your last step it checks
 for that and sends user to the url?

 On Jul 23, 2010 3:49 AM, Daniel Kucharski dan...@inspiran.be wrote:

 Hi,

 Sometimes I find myself often in a situation where I need to redirect from a
 given action based on how the current action was reached.

 For example, from a customer list a user can add a customer(which can be a
 multiple step form), which will redirect back to the customer list.
 However, a customer can also be created through a web dashboard and should
 redirect the user after creating the new customer back to the web dashboard.

 Some solutions that came in my mind using Symfonfy capabilities:

 -          Encode the call back route in the requested url (eg.
 /customer/create?redirect_after_create=dashboard_overview).  However this
 means you won't have any nice urls anymore.

 -          Create a new filter and store redirect data in session.  This
 will be then used to 'look back' where the user came from.

 Both are not really easily maintainable and a bit 'ugly'.  Anyone has any
 other solution?

 Kind regards,

 Daniel

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

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 mailto:symfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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 
 athttp://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: Unit tests fail with 'dubious' status

2010-07-22 Thread Florian
Hi!

you normally can launch a test by doing :

php test/unit/StoreTableTest.php

By this way, you have the full output of your test script, even
exceptions (dubious means script didn't ended as attended ( ie: fatal
errors, uncaught exceptions, die(), ...).

On 22 juil, 17:04, Lene Preuss lene.pre...@googlemail.com wrote:
 Well no, I'm using lime, I just wrote a wrapper that makes the tests
 look more like PHPUnit, indeed. ;-)

 On Jul 22, 4:20 pm, Dennis gear...@sbcglobal.net wrote:



  Whoops! I was directed by google search to the middle of your article,
  and it LOOKED like you were using PHPUnit. My apologies.

  On Jul 22, 7:18 am, Dennis gear...@sbcglobal.net wrote:

   I am hving great difficultities with PHPUnit and Symofny myself. If
   you are doing any changes to the database out of band, you can forget
   doing all your tests in one run. My next approach is to run my tests
   (each with 15 assertions, in separate files. I will run them using a
   bash script and redirect of all the tests's outputs to a single file.

   For me, I'm foind that either symfony or PHPUnit is remembering things
   from the last test that no longer exist.

   I was at a talk by Dustin Whittle  several weeks ago. He says PHPUnit
   is the future of Symfony, albeit with some exetensions. They are
   saving that part of Symfony 2 for last if I remember correctly.  I
   think they have their work cut out ofr them.

   On Jul 22, 12:36 am, Lene Preuss lene.pre...@googlemail.com wrote:

Hi there,

any ideas, anybody? I'm kind of stuck here...

Thanks, Lene

On Jul 15, 6:55 pm, Lene Preuss lene.pre...@googlemail.com wrote:

 Hi list, I'm a newb to symfony, so forgive me if I'm asking a dumb
 question.

 I jumped into symfony writing unit tests. My tests run fine when I run
 them as single test, e.g.

  php symfony test:unit Store

 but they all fail with a 'dubious' status when I run them all, e.g.

  php symfony test:unit

 StoreTableTest...dubiou
  ­­s
     Test returned status 255
     Failed tests: 0
 StoreTestdubiou
  ­­s
     Test returned status 255
     Failed tests: 0
 Failed Test                     Stat  Total   Fail  Errors  List of
 Failed
 --
 StoreTableTest                   255      1      1      0  0
 StoreTest                        255      1      1      0  0
 Failed 2/2 test scripts, 0.00% okay. 2/0 subtests failed, 0.00% okay.

 I read that the tests should be able to run standalone, which they
 don't. E.g:

  php test/unit/StoreTest.php

 PHP Fatal error:  Uncaught exception 'Doctrine_Connection_Exception'
 with message 'There is no open connection' in 
 /var/home/lene/workspace/
 my.agfaphoto/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/
 vendor/doctrine/Doctrine/Manager.php:662
 Stack trace:
 #0 /var/home/lene/workspace/my.agfaphoto/lib/vendor/symfony/lib/
 plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/
 Manager.php(264): Doctrine_Manager-getCurrentConnection()
 #1 /var/home/lene/workspace/my.agfaphoto/test/unit/
 Testcase.class.php(59): Doctrine_Manager::connection()
 #2 /var/home/lene/workspace/my.agfaphoto/test/unit/
 Testcase.class.php(20): Testcase::initData()
 #3 /var/home/lene/workspace/my.agfaphoto/test/unit/StoreTest.php(13):
 Testcase-__construct()
 #4 {main}
   thrown in /var/home/lene/workspace/my.agfaphoto/lib/vendor/symfony/
 lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Manager.php
 on line 662

 I start each test by including dirname(__FILE__).'/../bootstrap/
 unit.php'.

 What can I do to make testing all units at once work?

 Thanks,

 Lene

-- 
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: Plugin post install processing

2010-06-15 Thread Florian
Couldn't you use the plugins/yourPlugin/config/
yourPluginConfiguration.class.php ?

try to connnect to the plugin.post_install event in the initialize
method.

I think it's faaar more clever than putting a task and then ask to
launch it in the README file.

On 14 juin, 16:34, Stéphane stephane.er...@gmail.com wrote:
 Yes, I think the task is the best way, as the publish-assets is about
 assets, and what I need is creating configurations files at the
 project-level.

 Thank you !

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



 On Mon, Jun 14, 2010 at 4:33 PM, Eno symb...@gmail.com wrote:
  On Mon, 14 Jun 2010, Serkan Koyuncu wrote:

   I think, you have to create another task which user should run after
   installing your plugin.

  Probably you need to supply the CLI task 'plugin:publish-assets'.

  --

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

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

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


[symfony-users] Re: How to show an object_action based on a specific condition (admin generator)?

2010-06-14 Thread Florian
Hi, read this 
http://www.symfony-project.org/more-with-symfony/1_4/en/02-Advanced-Routing

Or http://www.symfony-project.org/reference/1_4/en/10-Routing

You have an object option to define which method to use to retrieve
your object!

Hope it helps!


On 14 juin, 00:49, Bruno Reis bruno.p.r...@gmail.com wrote:
 Hi,

 Is there a way to specify a specific condition required to show one
 object_action in a list?
 I want to show the action link only if a field on my record is true.

-- 
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: CSS and Javascript paths

2010-06-01 Thread Florian
Hi!

Try

 RewriteBase /appx

In every .htaccess

On 1 juin, 11:12, wueb webmaster@gmail.com wrote:
 I created multiple folders with an .htaccess defined for each one
 inside my web/ to the many apps i have.

 For example.

 http://localhost/app1(access app1)http://localhost/app2(access 
 app2)http://localhost/appx(access appx)

 The problem now is that my CSS and JS defined on view.yml try to
 access the JS and CSS folders inside the web/app1, web/app2... when
 they are one directory back.

 Any idea how to resolve this?

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

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


[symfony-users] Re: error in symfony 2 sandbox on install

2010-05-21 Thread Florian
same problem,  no solution...

If you have found it, please tell me :)
Florian.

On 18 mai, 23:13, AigerVoid aanw...@gmail.com wrote:
 http://localhost/sandbox/web/check.php
 mandatory requirements is ok.

 but in...http://localhost/sandbox/web/index_dev.php/

 Warning: DOMDocument::schemaValidateSource()
 [domdocument.schemavalidatesource]: Invalid Schema in C:\Program Files
 \xampp\htdocs\sandbox\src\vendor\symfony\src\Symfony\Components
 \DependencyInjection\Loader\XmlFileLoader.php on line 295

 Fatal error: Uncaught exception 'InvalidArgumentException' with
 message '[ERROR 1824] Element '{http://www.w3.org/2001/XMLSchema}
 import', attribute 'schemaLocation': 'C:/Program Files/xampp/htdocs/
 sandbox/src/vendor/symfony/src/Symfony/Components/DependencyInjection/
 Loader/schema/dic/services/services-1.0.xsd' is not a valid value of
 the atomic type 'xs:anyURI'. (in in_memory_buffer - line 8, column 0)
 [ERROR 3037] Element '{http://www.w3.org/2001/XMLSchema}import': The
 character content is not a valid value of the atomic type 'xs:anyURI'.
 (in in_memory_buffer - line 8, column 0)' in C:\Program Files\xampp
 \htdocs\sandbox\src\vendor\symfony\src\Symfony\Components
 \DependencyInjection\Loader\XmlFileLoader.php:297 Stack trace: #0 C:
 \Program Files\xampp\htdocs\sandbox\src\vendor\symfony\src\Symfony
 \Components\DependencyInjection\Loader\XmlFileLoader.php(248): Symfony
 \Components\DependencyInjection\Loader\XmlFileLoader-validateSchema(Object(DOMDocument),
  'C:\Program File...') #1 C:

 \Program Files\xampp\htdocs\sandbox\src\vendor in C:\Program Files
 \xampp\htdocs\sandbox\src\vendor\symfony\src\Symfony\Components
 \DependencyInjection\Loader\XmlFileLoader.php on line 297

 What's wrong?
 
 P.S. Apache2, php 5.3.2,Win7

 --
 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 
 athttp://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: No release available for plugin atolExt3WidgetPlugin?

2010-05-20 Thread Florian
Hi,

If you use plugin:install with -s=alpha ( or beta ) maybe...

But I recommend you to use subversion and include it with
svn:externals:

svn propset svn:externals atolExt3WidgetPlugin
http://svn.symfony-project.com/plugins/atolExt3WidgetPlugin; plugins


Another way would to download the package:
http://plugins.symfony-project.org/get/atolExt3WidgetPlugin/atolExt3WidgetPlugin-1.0.4.tgz

Hope it helps.

On 19 mai, 23:12, Fernando Navarro Páez
fernando.navarro.p...@gmail.com wrote:
 Hello!!

 I have sf 1.4 andhttp://www.symfony-project.org/plugins/atolExt3WidgetPlugin
 said atolExt3WidgetPlugin  1.0.4 stable  for sf 1.4

 plugin:install results No release available for plugin
 atolExt3WidgetPlugin

 Anyone use it? Any advice?

 --
 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 
 athttp://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: Validating Forms with Dynamic Fields

2010-05-20 Thread Florian
Hi

You can add use the allowExtraformFields method of sfForm


On 20 mai, 17:42, FeelLlikeANut feellikea...@gmail.com wrote:
 In my form, I have a field called type_0, and I have a JavaScript
 button to Add another type, which copies the first field to make a
 new field called type_1, type_2, type_3, and so on. But this creates a
 problem when I submit and validate the form. I get the form error
 Unexpected extra form field named 'type_1', because the symfony form
 object doesn't include those fields.

 So my question is how do I handle the situation where JavaScript
 dynamically creates new form fields that are not defined in the form
 object's widget schema?

 --
 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 
 athttp://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: any progress on ecommerce packages using Symfony?

2010-05-18 Thread Florian
Hi!

You could have a look on sfShop.

To my mind, it's the most finalized -extensible- e-commerce solution
developped with sf 1.3 / Propel 1.4

There is port to Doctrine too.

Please have a look to

http://www.sfshop.net/ -- not finished at all --
http://propel.sfshop.net/-- working demo

old svn: http://code.google.com/p/sfshop/

http://redmine.sfshop.net/projects/sfshop

Hope it helps!!






On 16 mai, 22:08, codewi.se wpquesti...@gmail.com wrote:
 I asked about this a few months ago, and I wonder if there has been
 much progress? I'm about to do a big ecommerce project and the client
 is leaning toward using Magento. I hate Magento. Are there any
 worthwhile ecommerce packages out there based on Symfony?

 --
 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 
 athttp://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: symfony and doctrine migrations - who to believe?

2010-03-04 Thread Florian

hi,

you surely wanted to say 'generate-migrations-diff' in your third
try ?

The doctrine:generate-migrations-diff task calculates the difference
between your model classes and the yml schema.

So when you want to modify your model, do this in *this exact order* :

 - make sure your model is up to date before modifying your schema by
calling: php symfony doctrine:build --all-classes --sql
 - modify your schema.yml with whatever you want
 - run php symfony doctrine:generate-migrations-diff
 - look at your lib/migration/doctrine folder if everything gone fine

If you build your model before calling doctrine:generate-migrations-
diff, doctrine won't know what has changed and will do nothing.

Hope it helps!

Florian

On 4 mar, 14:38, godbout guillaume.lecler...@gmail.com wrote:
 Hi guys.

 I want to use the symfony tasks for the doctrine migration but I can't
 find any consistent piece of information.

 I read this:
 -http://www.doctrine-project.org/documentation/manual/1_2/en/migrations
 and this:
 -http://www.symfony-project.org/reference/1_4/en/16-Tasks#chapter_16_s...
 and I've watched these slides:
 -http://www.slideshare.net/weaverryan/the-art-of-doctrine-migrations
 and those ones:
 -http://www.slideshare.net/denderello/symfony-live-2010-using-doctrine...

 Sometimes it says that the generate-migrations-db will make a
 comparison between the db and the schema.yml and generate the classes,
 sometimes it says that it will just take the db and make the classes.
 I don't see the point of the second information, but this is what
 happens for me. Whatever is in the schema.yml is not taken in
 consideration, and I end up with migration classes that just create
 the same db that I have and not the updates from my yml files.

 Same thing for generate-migrations-models. My models are the same than
 the db, but not than the yml files. But whatever, the migration
 classes just a copy of the model and doesn't pay attention to the yml
 files.

 I've tried the last one: generate-migrations-models. According to some
 of the links it actually does the difference between the yml files and
 the model (well, on some other links it's the definition of the
 generate-migrations-models function, so I don't get it...). I can't
 really see the model because it lamentably failed with a ToPrfx...
 something class not found.

 Anybody to lighten me up on that?

 Cheers in advance,
 Guill

-- 
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 draft a filter?

2010-03-02 Thread Florian
Hi,

you can use the sfFormSchemaFormatter: 
http://www.symfony-project.org/api/1_4/sfForm#method_renderusing

or even override the _filters.php template and use this syntax

{{{

?php echo $filter['name']-renderLabel() ?
div class=error?php echo $filter['name']-renderError() ?/div
div?php echo $filter['name']-render() ?/div

}}}

...that's just an example

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

Cheers, Flo

On 2 mar, 13:24, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I didnt find any file as _form.php for filters.

 So how should i design (draft) 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: Filtering a list from the action

2010-02-16 Thread Florian
Hello,

What is the error?

Have you cleared your navigation history/cache ? ( firefox seems to
keep the selected values... )

On 16 fév, 13:42, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i have tried this:

         $this-filter = new BirthdayFormFilter();
         $this-filter-setDefault('name', 'Peter');

 and this:

 $a = array('name' ='Peter');
         $this-filter = new BirthdayFormFilter($a);

 but they didn't work...

 I forgot to say i want to give the default value inside an action.

 Here you have the codes:

 In actions.class.php:

  public function executeIndex(sfWebRequest $request) {

         $this-birthday_list = Doctrine::getTable('Birthday')
                 -createQuery('a')
                 -execute();

         $a = array('name' ='Peter');
         $this-filter = new BirthdayFormFilter($a);

     }

 and indexSuccess.php contents:

 ?php echo form_tag('birthday/filtrar') ?

  ?php echo $filter; ?

   div?php echo submit_tag('Filter') ?/div
 /form

 Javi

 On Feb 15, 7:28 pm, Florian sideral.undergro...@gmail.com wrote:

  Hello,

  To my mind, you should use this method:

  {{{

  $this-filter-setDefault('name', 'Peter');

  }}}

  It's more correct, because semantically, you want set a default value
  to your form, not to your model object!

  But if you want to set use the contructor of the sfFormFilter 
  BaseForm  sfFormSymfony, see it's signature:

    public function __construct($defaults = array(), $options = array(),
  $CSRFSecret = null);

  So you can pass an *array* of default values as first argument.

  It's different from your Birthday form, which inherits from
  sfFormDoctrine, see it's signature:

    public function __construct($object = null, $options = array(),
  $CSRFSecret = null)

  here, the first argument has to be null OR a Doctrine ActiveRecord /
  Object.

  Hope it helps!

  /Florian

  On 15 fév, 16:49, NOOVEO - Christophe Brun c.b...@nooveo.fr wrote:

   I am working on the 'list' view of a module.
   The filtered list is displayed via a call to the executeFilter() method, 
   as usual.

   Now, I create a route and the appropriate method myModuleActions :

   public function executeUseMyFilter(sfWebRequest $request) {
       $id = $this-getRoute()-getObject()-getId();

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

        return $this-executeFilter($request);

   }

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

   

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

   Hi,

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

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

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

   But when i try this:

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

   this error appears:

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

   Any idea?

   Javi

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



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



[symfony-users] Re: Filtering a list from the action

2010-02-15 Thread Florian
Hello,

To my mind, you should use this method:

{{{

$this-filter-setDefault('name', 'Peter');

}}}

It's more correct, because semantically, you want set a default value
to your form, not to your model object!

But if you want to set use the contructor of the sfFormFilter 
BaseForm  sfFormSymfony, see it's signature:

  public function __construct($defaults = array(), $options = array(),
$CSRFSecret = null);

So you can pass an *array* of default values as first argument.

It's different from your Birthday form, which inherits from
sfFormDoctrine, see it's signature:

  public function __construct($object = null, $options = array(),
$CSRFSecret = null)

here, the first argument has to be null OR a Doctrine ActiveRecord /
Object.

Hope it helps!

/Florian

On 15 fév, 16:49, NOOVEO - Christophe Brun c.b...@nooveo.fr wrote:
 I am working on the 'list' view of a module.
 The filtered list is displayed via a call to the executeFilter() method, as 
 usual.

 Now, I create a route and the appropriate method myModuleActions :

 public function executeUseMyFilter(sfWebRequest $request) {
     $id = $this-getRoute()-getObject()-getId();

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

      return $this-executeFilter($request);

 }

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

 

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

 Hi,

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

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

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

 But when i try this:

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

 this error appears:

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

 Any idea?

 Javi

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

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



[symfony-users] Re: How to get raw data in a partial???

2010-02-09 Thread Florian
To get the REAL $sf_user in templates, just do a $sf_data-
getRaw('sf_user');



On 8 fév, 23:55, Richtermeister nex...@gmail.com wrote:
 Just to your specific point, $sf_user is accessible from every
 template or partial anyways.. no need to pass it along.

 Daniel

 On Feb 8, 1:09 pm, Darren884 darren...@gmail.com wrote:

  I solved it guys but the above would not work so I had to do a
  different way. I found out about hasCredential and used that. The
  above methods don't work too nicely on object methods.

  On Feb 8, 12:11 pm, Norbert haigermo...@web.de wrote:

   Am 08.02.10 20:41, schrieb Darren884: In my template I am trying to 
   do?php include_partial('global/
navigator', array('User' =  $sf_user)); ?

But when I run $User-getAttributes() in my partial it is cleaning the
code which makes it so it does not work. How can I get around this??

Thanks,
Darren

   try this in your template:

   look at :http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer

   echo  $sf_data-getRaw('test');



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



[symfony-users] Re: sfShop demo?

2010-02-09 Thread Florian
Hi,

For a quick demo with fixtures:

http://code.google.com/p/sfshop/source/browse/trunk/INSTALL


There is some activity on this project, so maybe will you soon see a
demo, but to my mind, no live site running with sfShop yet.

I saw a post a few days ago saying it didn't work with sf 1.4 ...

http://groups.google.fr/group/symfony-users/browse_thread/thread/01b400219f764079/01e5c9615aff69a6?show_docid=01e5c9615aff69a6fwc=1

Hope it helps.


On 9 fév, 13:41, Sid Bachtiar sid.bacht...@gmail.com wrote:
 Has anyone used sfShop in their project? Any live site?

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

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



[symfony-users] Re: Web shop based on symfony

2010-02-09 Thread Florian
Hi, please have a look here : 
http://groups.google.com/group/sfshop/browse_frm/thread/2c260d452f02c549

On 7 fév, 19:18, apm korja...@gmail.com wrote:
 Alexandru-Emil Lupu : Try sfshop...

  sent via htc magic

 Its for 1.2.
 After a day playing with sfShop, i cant switch it to 1.4. And found some
     problems. But tnx, its better than nothing.

 Now i have 2 new Q:
 1. Exists something else like webshop in symfony?
 2. Is it a good pattern do all works in plugins. sfshop have not any
 modules in apps, only plugins. Thats good?

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



[symfony-users] i18n fr_FR.dat file

2010-02-05 Thread Florian
Hi list,

I have a doubt on the content of this file:

in sf_lib_dir/i18n/data/fr_FR.dat

there is no NegativePattern definition to handle a negative value in
the format_currency function/helper

ie: format_currency(-120.3, '€', 'fr_FR'); // -returns -120,30 but
should return -120.30 €


What do you think of that ( french users ?)

Thanks,
Florian.

PS: intersting post about this by a sf core member :
http://blog.hma-info.de/2009/01/27/prado-i18n-an-open-source-tale-with-happy-end/

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



[symfony-users] Re: i18n fr_FR.dat file

2010-02-05 Thread Florian
non-french users can answer too :)

On 5 fév, 16:40, Florian sideral.undergro...@gmail.com wrote:
 Hi list,

 I have a doubt on the content of this file:

 in sf_lib_dir/i18n/data/fr_FR.dat

 there is no NegativePattern definition to handle a negative value in
 the format_currency function/helper

 ie: format_currency(-120.3, '€', 'fr_FR'); // -returns -120,30 but
 should return -120.30 €

 What do you think of that ( french users ?)

 Thanks,
 Florian.

 PS: intersting post about this by a sf core member 
 :http://blog.hma-info.de/2009/01/27/prado-i18n-an-open-source-tale-wit...

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



[symfony-users] Re: Images source problem

2010-02-04 Thread Florian
Hello,

The most important thing in this story is :

where are you pictures stored relative to your DocumentRoot?

For apache, if you call:
 src=users/avatars/image.jpg

from the url:  http://localhost/frontend_dev.php/settings

It will search your picture in DocumentRoot/settings/users/avatars/
image.jpg
where DocumentRoot is (surely) your symfony_web_dir (aka: /var/www/
symfony/web )

So if you want call your pics from all URL (like 
http://localhost/frontend_dev.php/settings
OR http://localhost/frontend_dev.php/settings/edit )

You HAVE TO call them with /users/avatars/image.jpg

The first / is very important because it tells Apache to start form
your DocumentRoot, which is always the same ( ie: http://localhost )

Hope I helped!

On 4 fév, 10:21, wueb webmaster@gmail.com wrote:
 Nobody knows? :S

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



[symfony-users] Re: Cache a component

2010-02-04 Thread Florian
If it is the SQL hit which gives you a problem,

you could aslo store the result in an instance attribute of your
component / model.

like this:

getResult() {

if(!$this-result) {
  $this-result = your resultSet;
}
return $this-result;


On 4 fév, 15:36, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com
wrote:
 Right now I execute a specific component twice in my layout.php: one
 time on top of the document and one time in the footer.

 For the result of the component is an SQL query required. But that
 query is being executed twice as well!

 Is it possible to cache the result of a component, which will result
 in the query not being executed the second time?

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



[symfony-users] Re: How to set trim default option on all widgets in a Form

2010-02-03 Thread Florian
By reading the discussion, I didn't noticed any DRY solution...

this one could help you, even if it's -maybe- not the fastest, but the
DRY'est :

//for sf 1.3
in lib/form/BaseForm.class.php

{{{

  public function setup() {

parent::setup();

foreach($this-getValidatorSchema()-getFields() a
  }


}}}

On 2 fév, 22:28, rooster (Russ) russmon...@gmail.com wrote:
 Some discussion about this here:

 http://forum.symfony-project.org/index.php/m/56343/#msg_56343

 On Feb 2, 8:11 pm, DoRiaN doria...@gmail.com wrote:

  Up please :)

  On 1 fév, 17:44, DoRiaN doria...@gmail.com wrote:

   Hello (i'm french, excuse me for my english),

   How to set trim default option on all widgets in a Form ?

   Thanks,
   Dorian- Hide quoted text -

  - Show quoted text -



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



[symfony-users] Re: How to set trim default option on all widgets in a Form

2010-02-03 Thread Florian
By reading the discussion, I didn't noticed any DRY solution...

this one could help you, even if it's -maybe- not the fastest, but the
DRY'est :

//for sf 1.3
in lib/form/BaseForm.class.php

{{{

  public function setup() {

parent::setup();

foreach($this-getValidatorSchema()-getFields() as $name =
$validator) {
  $validator-setOption('trim', true);
}
  }

}}}


That's the way I do when I want to configure something for ALL the
forms of my project.

But you can be more granular by testing the value of get_class($this)
or the name of the validator/widget.

Hope it helps !

On 2 fév, 22:28, rooster (Russ) russmon...@gmail.com wrote:
 Some discussion about this here:

 http://forum.symfony-project.org/index.php/m/56343/#msg_56343

 On Feb 2, 8:11 pm, DoRiaN doria...@gmail.com wrote:

  Up please :)

  On 1 fév, 17:44, DoRiaN doria...@gmail.com wrote:

   Hello (i'm french, excuse me for my english),

   How to set trim default option on all widgets in a Form ?

   Thanks,
   Dorian- Hide quoted text -

  - Show quoted text -



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



[symfony-users] Re: Redirecting to filtered admin page

2010-02-02 Thread Florian
Hi DC,

When I want to do that, i need to disable the csrf check by
configuring the filter form like this:

// in the configure() method of your *FormFilter

$this-disableLocalCSRFProtection();

Then, I use link_to:

?php echo link_to(format_number_choice('[0]Aucune commande|[1]Une
seule commande|(1,+Inf]%nb% commandes', array('%nb%' =
$nb_commandes), $nb_commandes), 'commande_collection', array('action'
= 'filter'), array(
'method' = 'post',
'query_string' = sprintf('commande_filters
[semaine_id]=%s', $semaine-getId()),
)) ?


On 2 fév, 01:40, DC ciprian.dob...@gmail.com wrote:
 Can anyone tell me how to redirect from an admin list item to another
 admin list, filtering the second one by secondList.firstListItem_id =
 firstListItem.id ?

 I can't, for the life of me, get over the CSRF attack detected
 message!

 Please help me,
 Thanks.

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



[symfony-users] Re: static Symfony content

2010-01-21 Thread Florian
Hello, you could hav a look at
http://www.symfony-project.org/plugins/sfSuperCachePlugin/1_1_0?tab=plugin_readme

On 20 jan, 19:40, Dennis gear...@sbcglobal.net wrote:
 Has anyone set up a .htaccess file to look for any static content
 matching the request ending in .html | .json | .xml combined before
 redirecting to the Symfony engine? I'm thinking it would be a whole
 lot faster.

 Doesn't the stock .htaccess file from symfony already do that
 for .html files?
-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Same component different app?

2010-01-18 Thread Florian
Hi colin,

You could also move your component logic into another class wich is in
your sf_root_dir/lib
and then make your components in both frontend and backend inherit
from this class instead of sfComponent.

Hope you understand what I try to explain ?

Cheers,
Florian

On 16 jan, 19:10, Colin colin...@gmail.com wrote:
 I have a component in my 'frontend' app that generates the navigation
 for my application.  I would like to use this same component in the
 'backend' app.  Is this possible?

 Should I implement it differently?

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




[symfony-users] Re: Helpers and Widgets??

2010-01-07 Thread Florian
yes, it is exactly like you say :


?php echo $form['filed_name'] ?

or

?php echo $form['filed_name']-renderLabel() ?
?php echo $form['filed_name']-renderError() ?
?php echo $form['filed_name']-render() ?

You should read this :

http://www.symfony-project.org/forms/1_2/en/

On 7 jan, 14:01, wueb webmaster@gmail.com wrote:
 So should i just use for example the widget-render instead of a
 input_tag('column'), something like that?
-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Debugging forms ..

2010-01-05 Thread Florian
hello,

just for info, the only way i found to get all errors compiled is
this :

{{{

// in lib/form/doctrine/BaseFormDoctrine.class.php
// or lib/form/BaseForm.class.php

public function getErrors()
{
$errors = array();
foreach ($this as $form_field)
{
if ($form_field-hasError())
{
$error_obj = $form_field-getError();
if ($error_obj instanceof sfValidatorErrorSchema)
{
foreach ($error_obj-getErrors() as $error)
{
$errors[$form_field-getName()][] = $error-
getMessage();
}
}
else
{
$errors[$form_field-getName()] = $error_obj-
getMessage();
}
}
}
foreach ($this-getGlobalErrors() as $validator_error)
{
$errors[] = $validator_error-getMessage();
}
return $errors;
}

}}}

It's useful for debbuging : just do a

?php print_r($form-getErrors()) ?

On 5 jan, 18:45, dantleech dan.t.le...@gmail.com wrote:
 In this case it was because widgets in the form were not being
 rendered .. but that's a different story :)

 On Jan 5, 5:16 pm, Gábor Fási maerl...@gmail.com wrote:

  This usually means you forgot to echo the csrf secret field in your form.

  On Tue, Jan 5, 2010 at 17:59, dantleech dan.t.le...@gmail.com wrote:
   The problem I have is that I have a form that has a global error -
   There is an error with your form, but none of the fields are
   highlighted.
-- 
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: sfWidgetFormJQueryDate option format is no longer supported in version 1.1.1?

2010-01-04 Thread Florian
Hi, I already had this problem and I decided to switch to the old
Calendar widget system, which is more complete:

http://pastebin.com/mfba353b

On 4 jan, 13:17, axel at axel.zu...@gmail.com wrote:
 Hi Massimiliano,

 when I use your datepicker solution I still have the problem that the
 date selects are mm/dd/ and I would need dd/mm/
 ( Date.format = 'dd.mm.'; is included in date_de.js )

 On 31 Dez. 2009, 17:01, Massimiliano Arione garak...@gmail.com
 wrote:

  Forget sfWidgetFormJQuery and try this full-javascript 
  solution:http://garakkio.altervista.org/datepicker/

  On 29 Dic, 13:58, axel at axel.zu...@gmail.com wrote:

   after upgrading to symonfy 1.3 and sfFormExtraPlugin  1.1.1 the
   format option is no longer supported by sfWidgetFormJQuery

       $this-setWidgets(array(
         'from_date'    = new sfWidgetFormJQueryDate(array(
                'image'='/images/icons/calendar_view_month.gif',
                'format' = '%day%-%month%-%year%',
                'culture' = 'de_AT')
                ),
       ));

   is there another way to change the date format (from mm-dd- to dd-
   mm-)?



--

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




[symfony-users] Re: Extends BaseClass and parent methods SF 1.3

2009-12-02 Thread Florian
Hi!

For me, it's a problem of __magic :

You maybe come from Propel's ORM ( who generates *real* getters and
setters )
so you can overload these defined in BaseClass in the final Class.

But with Doctrine, it uses magic __call method for get* and set*, and
delegates to Doctrine_Record::get ( and ::_get ) methods.

If you want to overlaod the getWebUser method, use that:

public function getWebUser($load=true) {
$webUser = $this-get('web_user', $load);
}

Hope it helps!

Florian

On 2 déc, 10:19, ridcully ohnhei...@googlemail.com wrote:
 Forget to say that i'm using doctrine.
 On Dec 2, 10:12 am, ridcully ohnhei...@googlemail.com wrote:

  Hi,

  after updating from symfony 1.2.9 to symfony 1.3.0 i can't call parent
  Methods Call anymore when i've overload the method:

  Class XY extends BaseXY{

   public function getWebUser($load=true){
          $webUser = parent::getWebUser($load);
          if .

   }

  }

  I get an segmation Fault and I've debug the the Parent call and
  Symfony tries to call methods  from Class XY and not the method
  BaseXY, so it's a neverending loop.



--

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




[symfony-users] Re: Extends BaseClass and parent methods SF 1.3

2009-12-02 Thread Florian
sorry, I didn't answered your question!

I've used this technique with Doctrine1.2 (IHMO both sf 1.2.9 and 1.3
use doctrine 1.2 )

On 2 déc, 11:15, Florian sideral.undergro...@gmail.com wrote:
 Hi!

 For me, it's a problem of __magic :

 You maybe come from Propel's ORM ( who generates *real* getters and
 setters )
 so you can overload these defined in BaseClass in the final Class.

 But with Doctrine, it uses magic __call method for get* and set*, and
 delegates to Doctrine_Record::get ( and ::_get ) methods.

 If you want to overlaod the getWebUser method, use that:

 public function getWebUser($load=true) {
     $webUser = $this-get('web_user', $load);

 }

 Hope it helps!

 Florian

 On 2 déc, 10:19, ridcully ohnhei...@googlemail.com wrote:

  Forget to say that i'm using doctrine.
  On Dec 2, 10:12 am, ridcully ohnhei...@googlemail.com wrote:

   Hi,

   after updating from symfony 1.2.9 to symfony 1.3.0 i can't call parent
   Methods Call anymore when i've overload the method:

   Class XY extends BaseXY{

    public function getWebUser($load=true){
           $webUser = parent::getWebUser($load);
           if .

    }

   }

   I get an segmation Fault and I've debug the the Parent call and
   Symfony tries to call methods  from Class XY and not the method
   BaseXY, so it's a neverending loop.



--

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




[symfony-users] Re: plugins for reports

2009-11-03 Thread Florian

Hi,

We had to develop a plugin for generating reports from a sql query.

You have to declare a base sql query, which is used then by a report
engine who says what to show ( columns and order )  and how ( helpers
to format output ).

This report engine permits to filter the base query too, by adding
custom criterias to the WHERE clause.

All the configuration of the report engine is done graphically with a
propel module.

If you're interested contact us on http://www.2le.net/contact ,
we could publish this as a public plugin.

Florian.


On Nov 2, 10:45 am, asi007 asim...@gmail.com wrote:
 Hi every body is any plugin available for reports in symfony
--~--~-~--~~~---~--~~
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: Do you use more than one app?

2009-10-27 Thread Florian

Or use a plugin, no ?
It's accessible from all apps.

On Oct 26, 10:45 pm, Greg Maruszeczka gma...@gmail.com wrote:
 On Mon, 26 Oct 2009 19:26:55 -0200

 Sid Ferreira sid@gmail.com wrote:
  Hi everyone! Well, there's a while that I always use only one app.
  Even in the admin I use routes instead of another app.

  The reason to that is that I don't want to duplicate files (CSS and
  JS), and so far didn't found a way to config the web/admin/index.php
  to use the css inside the web/ folder.

  Well, am I the only one doing that?

  Thanks in advance!

 I use two apps (frontend and admin) and put an .htaccess in the js,
 image and css directories of /web/admin like this example
 from /web/admin/css:

 IfModule mod_rewrite.c
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ ../../css/$1 [QSA,L]
 /IfModule

 That way it will first pick up admin-specific styles/scripts/images
 before the 'shared' assets under /web.

 GM

 --

 Greg Maruszeczka

 Office: +1 250 412 9651
 Mobile: +1 250 886 4577

 http://www.linkedin.com/in/gmarus

 GnuPG-ID: 0x0476B85F,http://pgp.mit.edu

  signature.asc
  1KViewDownload
--~--~-~--~~~---~--~~
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: Raising events in a form

2009-10-06 Thread Florian

Hi !

What I always see is not to use sfContext directly in model, but :

sfProjectConfiguration::getActive()-getEventDispatcher()-notify(new
sfEvent($this, 'foo.bar'));

( as you already said )

An other solution is to inject your dispatcher like this :

//in your form class:
public function setEventDispatcher(sfEventDispatcher $dispatcher) {
$this-eventDispatcher = $dispatcher;
}


// then in your action (or whatever else ):
$form = new myForm;
$form-setEventDispatcher($this-dispatcher);


But if it doesn't work with the first solution, it surely won't with
this one.

Hope it helps !
Florian.

On Oct 5, 10:37 am, rich_81 rich.s...@gmail.com wrote:
 Hi all,

 Hope you can help with this - it's got me stumped!

 Using Symfony 1.2.9, I have a situation where I'm raising an event via
 the dispatcher, during the saving of a form - I have multiple embedded
 forms which need to raise the event upon each individual form's
 saving.  I'm seeing this currently in a unit test for the form.

 I have added my event method in the project configuration as normal,
 using:

 $this-dispatcher-connect(transaction.add, array
 (TransactionManager, sendAllocationEmail));

 and I'm then raising the event in my form class using:

 sfContext::getInstance()-getEventDispatcher()-notify(new sfEvent
 (null, transaction.add, array()));

 (I've tried sfProjectConfiguration::getActive()-getEventDispatcher()
 as well)

 The problem is that the event is getting raised 4 times, no matter
 where in the form class I use this.  I've tried moving it to the
 configure() method, I've tried removing all the embedded forms, and
 still my method is being called 4 times.

 The strange thing is, if I do:

     sfContext::getInstance()-getEventDispatcher()-notify(new sfEvent
 (null, application.log, array(About to raise my event)));
     sfContext::getInstance()-getEventDispatcher()-notify(new sfEvent
 (null, transaction.add, array()));
     sfContext::getInstance()-getEventDispatcher()-notify(new sfEvent
 (null, application.log, array(Raised my event)));

 in my log, I get the following:

 Oct 05 09:29:35 symfony [info] {main} About to raise my event
 Oct 05 09:29:35 symfony [info] {main} In my event's method
 Oct 05 09:29:35 symfony [info] {main} In my event's method
 Oct 05 09:29:35 symfony [info] {main} In my event's method
 Oct 05 09:29:35 symfony [info] {main} In my event's method
 Oct 05 09:29:35 symfony [info] {main} Raised my event

 The only code I have in my event handler at the moment is the
 application.log call.

 Has anybody else come across this at all? Is there a better way to
 retrieve the event dispatcher in the form, apart from upgrading to
 Symfony 1.3? :-)

 Thanks in advance,

 Rich.
--~--~-~--~~~---~--~~
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: Can be sfTestBrowser used in non-symfony project?

2009-09-15 Thread Florian

Hi,

they are talking about coupling whith symfony here :

http://www.symfony-project.org/installation/1_2/upgrade#Browser

sfBrowserBase: The base browser class. It knows nothing about symfony,
except classes from the symfony platform.

Hope it helps !

On Sep 15, 10:38 am, Zap kuzela.al...@gmail.com wrote:
 If so, how to configure it? If not, does any so awesome functional
 testing tool exists?

 Thank you for tips.
--~--~-~--~~~---~--~~
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: sfGrid and Custom query

2009-09-08 Thread Florian

Hi,
just my 2 cents, but the message says :

 [code]
 Class Idea has no method called getideaRelationId.
 [/code]


 Symfony complains a bout not being able to find a setter. -
 understandable.

 I believe i need make a setter, but where? in Idea?


So you surely are talking about a Getter , no ?




--~--~-~--~~~---~--~~
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: Can anyone tell me how to use i18n helper in task - Thanks in advance

2009-06-23 Thread Florian

Hi,

For me there are 2 ways for including helpers somewhere else than
templates with use_helper('I18N', 'Number') :

sfLoader::loadHelpers(array('I18N', 'Number')); // for sf 1.1

sfContext::getInstance()-getConfiguration()-
getApplicationConfiguration()-loadHelpers(array('I18N',
'Number')); // sf 1.2

Hope it helps!
Florian


On Jun 22, 5:35 pm, xhe hexuf...@gmail.com wrote:
 I wan to use format_country function in my cron task, but
 unfortunately, the CLI throw exception as Fatal Error: call to
 undefined function format_country
 I know format_country should be used in template, but are there any
 way to use this function in the Task which is not a template. If not,
 how do we parse country code into country name automatically?
 thanks for your kind help.
--~--~-~--~~~---~--~~
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: Unable to propel:build-all on new project Symfony 1.2.1

2009-01-21 Thread florian geiges

when you encounter this on mac osx just make sure you have only one
version of php (or just ln -s your php binary to /usr/bin)

i guess something similar could have happened to you.

hth, flo

On Dec 19 2008, 10:02 pm, James thenet...@gmail.com wrote:
 I created a new project. Ran the command

 symfony configure:database mysql://login:pas...@localhost/blog

 changing the login and passwd and dbname to the appropriate items.

 Checked the database.yml and propel.ini files and saw that the passwd  
 was not put in, but the rest of the data was. I added the password and  
 saved both files.

 Next created a simple schema.yml

 propel:
      member:
          id:
          created_at:
          updated_at:

 ran

 symfony propel:build-all

 I get this

 Some problems occurred when executing the task:
      build-propel.xml:275:1:  [wrapped: could not find driver]
      Read the logs to fix them

 The symfony log file gives me literally nothing.

 If I run these they all execute cleanly

 $ php symfony propel:build-model
 $ php symfony propel:build-forms
 $ php symfony propel:build-filters
 $ php symfony propel:build-sql

 The log files show nothing. I am confused as to where to look.

 Thanks,
 James

--~--~-~--~~~---~--~~
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: sf 1.1 : where has passed sfResponse parameter holder ?

2008-09-09 Thread Florian


Hello,

Have you found a way to make this work ?

I maybe have a solution :

replace with getRequest()-getParameterHolder()-
has('isicsBreadcrumbs'))

On 20 août, 01:35, Dustin Whittle [EMAIL PROTECTED]
wrote:
 Nicolas,

 I have run into the same issue and my solution was to extend the view class
 and add the data as part of the response content. Also, you can define a
 contextual slot (with a cache_key tied to the uri. (which will get cached).
 Otherwise, you might be able to store as a user attribute.

 - Dustin

 On 8/19/08 9:58 AM, Nicolas CHARLOT [EMAIL PROTECTED] wrote:



  Hi,

  In Sf 1.0, I used to store an objects as a sfResponse params in order
  to retrieve it even action was cached.
  For instance isicsBreadcrumbsPlugin was adding a isicsBreadcrumbs
  param to sfResponse.

  In Sf 1.1, sfReponse doesn't supports a parameter holder anymore...

  How to replace it ?

  Thanks.
  --
  Nicolas CHARLOT
 http://www.isics.fr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: plugin development idea

2008-09-04 Thread Florian

Hi,

totally sorry for ma late response :
I thought the google code Wiki was responding to your question.
http://code.google.com/p/sfownedbehavior/

The goal of this plugin is to automatize the verification of
permissions ( for example : a post is owned by ..., do I have the
right to edit/delete it ? )
Some plugins like sfAuthoredPlugin maybe approach from what I want to
do.


On 11 août, 19:14, Dmitry Nesteruk [EMAIL PROTECTED] wrote:
 can you describe this plugin? what is functionality this module provide?

 2008/8/11 Florian [EMAIL PROTECTED]



  Hi community,

  I rewrite my post in this group cause this one (

 http://groups.google.com/group/symfony-devs/browse_thread/thread/416b...
  )
  is maybe not the best place
  ---

  I just wanted to know what you think of this plugin (
 http://code.google.com/p/sfownedbehavior/) ?

  Do you think it can be useful / totally stupid / already done /
  easilly done / differently done ?

  I'm open to any comments / suggestions / help !!

  In fact, I am as interested in writing a plugin ( just to learn ) as I
  need an easy, cool ( =symfony'cally ) way to securize my actions in
  function of owner.

  Hope my English is good enough to be understood by all.

  Thanks,
  Florian
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: url_for and array GET param

2008-01-09 Thread Florian

Thank you very much!

I was searching for this query_string option... I couldn't find where
it was documented.
Do you know where are documented or listed helper options ?
( somewhere else than the book ? )



On 9 jan, 02:25, Stepan Koci [EMAIL PROTECTED] wrote:
 Hi Florian,

 try this solution:

 Listing 9-13 - Forcing GET Variables with the query_string Option

 ?php echo link_to('my article', 'article/read', array(
   'query_string' = 'title=Finance_in_France'
 )) ?
 = a href=/article/read?title=Finance_in_Francemy article/a

 (http://www.symfony-project.org/book/1_0/09-Links-and-the-Routing-System
 )

 Regards Stepan

 On 8 Led, 09:42, Florian [EMAIL PROTECTED] wrote:

  Hello,

  Could someone tell me if he already had seen that before ?

  echo url_for( 'mymodule/myaction?test[]=1test[]=2test[]=3' );
  // -- mymodule/myaction/test[]/3

  It should return 'mymodule/myaction/test[]/1/test[]/2/test[]/3
  Isn't it ?

  Maybe someone has a solution?

  Thanks for reading and sorry for my english.

  Florian.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] url_for and array GET param

2008-01-08 Thread Florian

Hello,

Could someone tell me if he already had seen that before ?

echo url_for( 'mymodule/myaction?test[]=1test[]=2test[]=3' );
// -- mymodule/myaction/test[]/3

It should return 'mymodule/myaction/test[]/1/test[]/2/test[]/3
Isn't it ?

Maybe someone has a solution?

Thanks for reading and sorry for my english.

Florian.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: url_for and array GET param

2008-01-08 Thread Florian

Hi Andy,

Thanks for answering so fast!

Theorically, when you call an url with this GET parameters : ?
test[]=1test[]=2test[]=3

PHP should fill $_GET['test'] as an array : print_r($_GET['test']) -
Array( 1, 2, 3 )

It works fine without routing rewriting, but url_for rewrites it
wrong.


To answer your question, my goal is to save state of checkboxes in a
search form.

Maybe should I use one variable per checkbox, but the array syntax
looks fine for me.


On 8 jan, 10:05, Andy Signer [EMAIL PROTECTED] wrote:
 Hi Florian

 The problem is that you used three time the same named parameter
 ('test[]'). So the last set value is winning ('3'). What do you like
 to do anyways?

 Greetz
 Andy
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Javascript on another server?

2007-06-07 Thread Florian Klug

hi, 

On Thursday 07 June 2007 19:02, Eno wrote:
 Our javascript files live on another server (along with all of our
 images) and Im trying to integrate a rich text editor into our
 application.


I don't think that's a symfony issue, because afaik browsers don't execute 
javascript from any other server than the one which serves the page.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---