Re: [symfony-users] Re: Any chance of creating a new Google group for Symfony2 only?

2011-06-10 Thread Georg
Hello,

I am not yet using sf2.

I am quite frustrated with the mailing list ATM.

I used to read the mailing list along to help people when I knew
something, learned a few tricks from answers by others, and had a place
to get quick answers.

Now on most mails I don't even understand the subject, I don't bother to
find the mails where I could help, and i don't ask anymore, because
obviously most sf1 users act in the same way as I do.
Check how many sf1 questions were asked and answered 5 moth ago and now.
This could either mean that nobody is using sf1 any more (which I doubt)
or the list is not working for sf1 people any more (which is the case IMO).

[RANT]I wonder what are the things that are shared between symfony 1 and
symfony 2? That both are a PHP MVC framework and have the same name?
TO me this feels like if I had a single mailing list for Drupal and
Typo3, because both are PHP CMS[/RANT]

[RANT2]Check http://www.symfony-project.org/installation:
sf1.4 is the only stable symfony version ATM, and is supported until
november 2012. I strongly hope (even if I have a different feeling),
that at least until mid 2012, sf1 is not treated as legacy. There isn't
even an update possible, I am afraid that companies will rethink their
decision to develop in symfony if they are left standing in the rain.
(Yes, I know this mail
http://groups.google.com/group/symfony-devs/msg/f13ab956a61567cc by
fabien, let me quote:
[QUOTE]Keep in mind that symfony is an Open-Source project, so everybody
can contribute and scratch its itch. The core developers and all plugin
developers are all working for free. Of course, Sensio sponsors the
framework, of course it dedicates a lot of time and money to it, and of
it can even provide extended support for all versions for companies
willing to pay. And do you know how many companies, except Sensio
customers, signed up for extended support in the last 2 years? None!
Yep, that's right, not a single one. [/QUOTE]
[/RANT2]

That's why I would like to have symfony-users and syomfony2-users as
opposed to symfony-legacy-users.

As always, keep up the great work. And I will switch to sf2, when it is
stable (and probably has 1 as minor version number ;-) or when the
*symfony2-users* list doesn't complain too much). But I will be stuck
with sf1 for quite a long time with existing projects. And as pointed
out above, I don't feel they have a lot together.

Regards
Georg

Am 10.06.2011 07:24, schrieb Fabien Potencier:
> On 6/9/11 10:17 PM, Chris Sedlmayr wrote:
>> Hi all,
>>
>> I don't think we are against the idea of creating a Symfony2 specific
>> group, but we must ensure that finding help in the right place is the
>> main priority.
> 
> I'm against creating a Symfony2 specific group. If we were to create a
> new group, then it would be a symfony-legacy group. Do we want to create
> a ghetto?
> 
> Fabien
> 
>> Also, it's worth noting that there is significant time involved with
>> moderating this group alone, which I am not complaining about as it
>> means we have an incredibly active community of developers and users
>> which is fantastic!
>>
>> I'll bring it up and we can go from there?
>>
>>
>> Thanks,
>> Chris Sedlmayr
>>
>>
>> On Jun 9, 8:16 am, Ricky  wrote:
>>> +1
>>>
>>> It's a good idea that there is symfony2 group seperately, as we
>>> sometimes can find our solution or get help from others more clearly.
>>>
>>> On Jun 9, 10:54 am, Anton Patrikeyev
>>> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> +1
>>>
>>>> 2011/5/18 mepk
>>>
>>>>> +1
>>>
>>>>> marcelo
>>>
>>>>> On 18 mayo, 05:05, Leo Jokinen  wrote:
>>>>>> +1 since only interested of SF2
>>>
>>>>>> -Leo-
>>>
>>>>>> From: symfony-users@googlegroups.com [mailto:
>>>>> symfony-users@googlegroups.com] On Behalf Of Marco Pivetta
>>>>>> Sent: 18. toukokuuta 2011 10:39
>>>>>> To: symfony-users@googlegroups.com
>>>>>> Subject: Re: [symfony-users] Re: Any chance of creating a new Google
>>>>> group for Symfony2 only?
>>>
>>>>>> +1 as I am COMPLETELY not interested in Symfony 1.X and joined
>>>>>> here to
>>>>> just follow some of the issues coming of sf2 :)
>>>>>> Marco Pivetta
>>>>>> @Ocramius<http://twitter.com/Ocramius>http://marco-pivetta.com
>>>
>>>>>> On 18 May 2011 09:21, Yanko Simeonoff>>>> zech...@gmail.com>>  wrote:

Re: [symfony-users] Any chance of creating a new Google group for Symfony2 only?

2011-05-17 Thread Georg
+1

Am 16.05.2011 19:15, schrieb keymaster:
> Having all the symfony 1.x releases mixed in with Symfony 2 posts can
> sometimes make it difficult to discern which Symfony people are talking
> about in their posts.
> 
> Not everyone is explicit on whether they are referring to Symfony1 or
> Symfony2.
> 
> This is not only a problem for those working on Symfony2, but even those
> trying to wade through symfony 1.x have to wade through newbies on
> symfony 2.x.
> 
> An additional confusion is some Symfony 1.x people seem to be using
> Doctrine 2.
> 
> It might be wise to separate the discussions of the two groups as the
> two products are different enough from each other to warrant it.
> 
> 
> 
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] How to conditionally enable plugins in Symfony 1.4

2011-04-21 Thread Georg
I do it in the setup() method of ProjectConfiguration:

if (isset($this->environment) && $this->environment == 'dev') {
$plugins[] = 'sfFirePHPPlugin';
}


Am 21.04.2011 16:59, schrieb codecowboy:
> Hi,
> 
> I would like to programatically enable plugins for a Symfony 1.4 app
> based on the current environment. e.g. if I'm in the dev environment,
> I want to enable the sfFirePHP plugin.
> 
> I've tried using sfContext::getInstance()->getConfiguration()-
>> getEnvironment(); but get:
> 
> Fatal error: Uncaught exception 'sfException' with message 'The
> "default" context does not exist.
> 
> I tried it in the setup() method of ProjectConfiguration.class.php so
> it might be that the configuration doesn't actually exist at that
> point.
> 
> Anyone know of a way to do this?
> 
> 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


Re: [symfony-users] doctrine:build-sql looking at stale (?) version of schema.yml

2011-04-12 Thread Georg
AFAIK it mixes the model class files and schema.yml when building SQL.
Try running doctrine:build --all-classes before doctrine:build-sql

Am 13.04.2011 01:40, schrieb OnDistantShores:
> I've been making some changes to my DB schema, so I updated my
> schema.yml file. However, when I go to run "./symfony doctrine:build-
> sql" it *kind of* looks at a stale version of the schema.yml file, as
> if some of the old config is cached somewhere.
> 
> I used to have a table called "author" but I updated it to
> "content_author". I've looked through my schema.yml file and I can't
> find any mentions of "author" (except where the text search matches it
> within "content_author", obviously). I've also searched through my
> entire code base and got the same result.
> 
> The strangest thing is that it isn't just looking at a stale version -
> when I run "doctrine:build-sql" the resulting schema.sql file has both
> the "author" and "content_author" definitions. Just to re-iterate,
> I've changed "author" TO "content_author" - it would make a little
> more sense if it just got the old one, but why is it getting both!?!
> 
> Any and all help would be appreciated, because this is extremely
> frustrating.
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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]authentication with email

2011-04-01 Thread georg
You just change the return value of getUsername(). Instead of returning the 
user's name you return its email address

public function getUsername() {
return $this->email;
}

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] FrameworkExtraBundle

2011-03-29 Thread georg
This functionality is already bulit-in:

_acmedemo_annotated_routes:
resource: @AcmeDemo/Controller
type: annotation

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] PR8: Custom roles for access control

2011-03-28 Thread georg
Hi,

I'm having an issue with the security component.

In the docs it says that when using a custom Role object you should not use 
the ROLE_ prefix for the name of your roles.
But if I omit the prefix and call my role ADMIN instead of ROLE_ADMIN then 
an AccessDenied exception is thrown on every request. If I change use the 
prefix in my custom roles then everything works as expected.

So, is this a bug or are the docs not up to date? Or is there even an option 
to configure the behavior?

regards
georg

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

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


Re: [symfony-users][Symfony2]Multiple routes in annotations

2011-03-26 Thread georg
Hi,

has this been solved or has a solution been found?
I'm also very interested in achieving the same thing as Mark.

thanks
georg

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

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


Re: [symfony-users] cannot load i18n helper in layout when redirected to login by sfDoctrineGuradPlugin

2011-03-19 Thread Georg


Am 18.03.2011 23:13, schrieb Francesco Levorato:
> On Fri, Mar 18, 2011 at 11:06 PM, Georg  wrote:
>> How to proceed in this case?
> 
> Hi Georg,
> if you use the __() everywhere you may as well always include it in
> the configuration.
> See 
> http://www.symfony-project.org/reference/1_4/en/04-Settings#chapter_04_sub_standard_helpers
> 
> Cheers,
> Francesco
> 
Hello Francesco,

I knew about this setting, but it wasn't clear to me that it would
magically solve my problem. Thanks a lot!

Georg

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

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


[symfony-users] cannot load i18n helper in layout when redirected to login by sfDoctrineGuradPlugin

2011-03-18 Thread Georg
Hello group,

I have an annoying problem. I am using the "__" function to translate
some texts in the layout.php template. In order to have the function
defined, I use

use_helper('i18n');

This works well in my application, but if my login expires, I am
forwarded/redirected to the login page. But in this context the
autoloader does not find the i18n helper, and an exception is raised. No
chance to login :-(

How to proceed in this case?

Georg

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

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


Re: [symfony-users] Re: Doctrine version classes

2011-02-22 Thread Georg
Be careful with the generateFiles option. This regenerates the files on
*each* usage of the model class (see the change time of the generated
file after a usage). And this creates serious troubles with APC, because
APC always re-caches the file, and this leads to have cache
fragmentation, and possibly segmentation faults.
See http://www.doctrine-project.org/jira/browse/DC-974
If you experience this, consider setting apc.file_md5 to true.


Am 21.02.2011 08:02, schrieb Sebastien Armand [Pink]:
> Found the reason behind this issue though I don't have any very good
> solution for now, but in case someone else gets this kind of problem,
> here it goes:
> 
> First of all you need the 'generateFiles' option to be true when you
> define your versionable models. Once this is done, you will have a new
> 'ModelVersion' class file. The 'BaseModelVersion' class only defines
> columns, not the relations. Copy pasting the relations defined in the
> 'BaseModel' class into 'ModelVersion::setTableDefinition()' will do the
> job and now your version class has its relations defined too.
> 
> However if you ever create a query with the 'Model' class, since it has
> the versionable behavior, it will define the 'ModelVersion' table
> altogether. (Define here means in memory, for Doctrine to be able to
> work with those table). This definition will be made through the
> behavior and not through the files that we just created. Since Doctrine
> makes use of some caching techniques, it won't redefine the
> 'ModelVersion' when we try to use it. Therefore the relations won't be
> set up. Whenever we want to use those version classes in a DQL query
> with their related components, we need to redefine the table and erase
> the version Doctrine could previously have. For this, just create an
> object and use the setTableDefinition method:
> 
> $object = new ModelVersion();
> $object->setTableDefinition();
> 
> From now on, the Version table is defined with the relations set.
> 
> Looking at the code for the Versionable behavior I found a
> 'generateRelations' option which is already set to 'true' by default.
> However it is never used and doesn't link to anything. I guess there was
> a plan to implement such possibilities but for whatever reason it didn't
> happen. Since Doctrine's focus is now on Doctrine 2 and no longer on 1.2
> I don't see any change happening here so I'll keep using the workaround
> I found.
> 
> Hope this might be of some help to other people.
> 
> 
> 
> 
> 
> 
> 
> On Thu, Jan 6, 2011 at 6:34 PM, Sebastien Armand [Pink]
> mailto:khe...@gmail.com>> wrote:
> 
> Now the query I was trying earlier is working. However, I need to
> also query a few other tables that are relations on my object, but
> the relations are not set as part as the Version object.
> I did override the setUp method of the version objects in order to
> benefit from the relations directly.
> 
> So far so good, in my action I can start a query like this:
> $q = Doctrine_Query::create()
> ->from('ObjectVersion ov')
> ->leftJoin('ov.Address a')
> 
> This works just fine and I can create the query I want BUT BUT only
> as long as I create the query from the action...
> 
> If I try to create that query from a "xxxTable" class for example,
> then the "Address" relation is not recognized anymore by Doctrine.
> 
> Any ideas on this?
> 
> 
> On Wed, Dec 29, 2010 at 4:29 PM, Sebastien Armand [Pink]
> mailto:khe...@gmail.com>> wrote:
> 
> 1- When using the Doctrine plugin for symfony, and the
> versionable behavior, the version classes don't seem to be
> generated like specified in the Doctrine documentation. However
> the version classes for the forms are generated. Is there a way
> to generate the model classes too?
> 
> 2- Now more importantly, I want, through the version table, to
> get a snapshot of what the main table was at a given time T. So
> I'm trying to select only records that satisfy "updated_at" < T,
> but among those records I might have multiple versions of the
> same record and I only want the one that was the most up to date
> at time T. In SQL I can make a subquery on the same table to get
> the maximum "updated_at" value before T or the maximum version
> number with "updated_at" < T.
> 
> The same request in DQL does not seem to work. If I try:
> 
> $q = Doctrine_Core::getTable('ObjectVersion')->createQuery('fv1')
> ->where('fv1.updated_at = (select
> max(fv2.updated_at) from ObjectVersion fv2 where fv1.id
>  = fv2.id  and fv2.updated_at <
> ?)','2010-12-29 06:40:59');
> 
> I get an exception "Couldn't find class fv2".
> 
> However if I output the DQL from the query, what I get
> corresponds perfectly to the SQL I could use directly in th

Re: [symfony-users] Relationships and i18n

2011-02-19 Thread Georg
Do you use multiple database connections? I had this problem once in
this configuration, and I only found an ugly solution.

Am 17.02.2011 18:43, schrieb Paolo Niccolò Giubelli:
> Hi!
> 
> I have the following schema:
> 
>  
> 
> Category:
> 
>   actAs:
> 
> Timestampable: ~   
> 
> I18n:
> 
>   fields: [name]
> 
>   columns:   
> 
> name:
> 
>   type: string(255)
> 
>   relations:
> 
> Category:
> 
>   class: Category
> 
>   local: parent_id
> 
>   foreign: child_id
> 
>   refClass: CategoryReference
> 
>   foreignAlias: Parent
> 
> Products:
> 
>   type: many
> 
>   class: Product
> 
>   local: id
> 
>   foreign: category_id
> 
> CategoryReference:
> 
>   columns:
> 
> parent_id:
> 
>   type: integer
> 
>   primary: true
> 
> child_id:
> 
>   type: integer
> 
>   primary: true
> 
>  
> 
> As you can see, Category has a relation with itself, so to create a
> category tree.
> 
> Everything works fine until I try to edit a category using
> admin-generated forms, as it says:
> 
> *SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.name' in
> 'field list'*
> 
> It tries to retrieve “name” field from “category” table instead of
> “category_translation”… why? :-| Is this a bug?
> 
> I spent a lot of time trying to find a solution, but I didn’t succeeded.
> 
> I used this schema in other projects, without i18n, and it works flawlessy.
> 
> I’m using symfony 1.4.9 (this happens also on 1.4.8).
> 
>  
> 
> Thank you in advance!
> 
>  
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] How to populate a non-view template and return as text?

2011-01-09 Thread Georg
http://www.symfony-project.org/plugins/ggEmailPlugin

Am 09.01.2011 22:23, schrieb Eric B:
> Hi,
> 
> Given that Symfony is built around templates, I am trying to figure out
> how I can leverage the power of the templates for other things, such as
> emails.  For example, I would like to write up my email in a template
> form, then simply pass it the necessary variables to populate it. 
> Finally, if I could "get" the output as text, I could assign it to the
> body of my mail, and off I go.  That would allow me to separate the
> contents from my action.
> 
> I've checked the docs, but haven't found anything that really explains
> how I could make something like this work.  For instance, I'd love to be
> able to do somehting like:
> 
>// start pseudo-code
>$emailTemplate = new Template("myEmailTemplateName" );
>$emailTemplate->setVar( $user );
>$body = $emailTemplate->getMergedTemplate();
>// end psuedo-code
> 
> $email = Swift_Message::newInstance();
> $email->setFrom( "someaddr...@something.com
> " );
> $email->setTo( $user->getEmail() );
> $email->setSubject( "subject line" );
> $email->setBody( $body );
>
> $this->getMailer()->send( $email );
> 
> 
> Then in the "myEmailTemplate" I'd be able to put in whatever text I wanted.
> 
> Do I need to install another template engine plugin for something like
> this?  Or can I use what Symfony already has?
> 
> Thanks!
> 
> Eric
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] How do I explicitly specify Doctrine connection name when connecting to multiple DBs using Symfony 1.4.8 / Doctrine 1.2?

2010-12-16 Thread Georg
This works for me. I can use tables from all databases in one action.
Are you sure that the class is bound to the correct database?

Am 16.12.2010 21:43, schrieb dmitrypol:
> I am using Symfony 1.4.8 / Doctrine 1.2 to connect to multiple DBs.
> In my_project_name/config/databases.yml I created connections – db1st,
> db2nd, db3rd.  I built my schema from existing DBs (doctrine:build-
> schema) and generated code (doctrine:build --model --forms --
> filters).
> 
> I created a module based on the table/class that is present in
> db2nd.
> php symfony doctrine:generate-module --non-verbose-templates frontend
> my_module_name MyClassName
> In my BaseClassName.class.php files I see
> Doctrine_Manager::getInstance()->bindComponent('ClassName', 'db2nd');
> 
> When I browse to http://.../frontend_dev.php/my_module_name
> I get
> SQLSTATE[42S02]: Base table or view not found: 1146 Table
> 'db3.my_table_name' doesn't exist. Failing Query: "SELECT t.column1,
> t.column2 FROM my_table_name t"
> When I click Queries in webdebug toolbar I see
> 0.00s, "db3rd" connection
> 
> It always uses the last connection by default and the table does not
> exist in that DB.  How do I tell it to use specific connection?  I got
> it to work by creating separate applications for each DB (one
> connection per app) but it’s crazy to do that.
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] [Symfony 2] Binding object and data without a form?

2010-11-23 Thread Georg
Hi,

I use the form component for js forms also for data validation, but not
(obviously) for form display. Why don't you just set up a form (or even
better, let doctrine generate it for you) and just use it for validating
the request only?

Georg

Am 21.11.2010 17:37, schrieb Gustavo Adrian:
> Hi!
> 
> I'm developing an ExtJS app and I don't use the Form component because I
> need to create the forms in JS. My question is if there's a way to bind
> the data coming from the request to the object, without using the Form.
> What I'm currently doing is something like:
> 
> $validator = $this->container->get( 'validator' );
> $data = $this->container->get( 'request' )->request->get( 'myEntity' );
> 
> $myObject = new MyEntity();
> $myObject->setName( $data[ 'name' ] );
> 
> // Set all remaining values..
> 
> $result = $validator->validate( $myObject );
> 
> 
> For that reason I'm planning to develop a simple data binder component
> for such cases but I was wondering if anyone has a better way of doing
> this that I don't know about.
> 
> 
> 
> Thanks in advance.
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] Remove column through schema.yml (Doctrine)

2010-10-21 Thread Georg
Obviously, if you want to remove a column, you have to *remove* it from
the scheam.yml file (just delete it) ;-)

Am 21.10.2010 15:39, schrieb Thomas Ohms:
> Hi all,
> 
> after searching for over an hour I just ask, what seems not to be
> asked before:
> I I like to remove a column from a schema (project based) so
> generating a migrations diff will automatically create a removeColumn
> in migration file. How can I do it?
> 
> My thought was adding column schema.yml in projects config dir, but it
> doesn't seem to work.
> 
> I tried to set a null value (~), a boolean or nothing at all after
> column's name, but I always get an alteration of the column instead of
> removing it.
> 
> Is that supported anyway and if yes what am I doing wrong?
> 
> Cheers,
> Thomas
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] HTTPS/SSL standard in 1.4

2010-10-15 Thread Georg
Actually it is in the 1.4 docs, see
http://www.symfony-project.org/gentle-introduction/1_4/en/06-Inside-the-Controller-Layer
Listing 6-33

I admit it's hard to find, it seems google does not index 1.4 docs :-(

Am 15.10.2010 02:07, schrieb JamesD:
> Hello,
> 
> First off I'd like to commend everyone who has contributed to Symfony.
> Amazing stuff. There seems to be one thing lacking in the
> documentation for 1.4 though, and I haven't had too much success
> figuring out what the standard is in Symfony for managing HTTPS. Is
> the Symfony plugin the standard for working with secure pages? It's
> odd that it isn't tagged with 1.4 nor mentioned in the docs if that's
> the case.
> 
> http://www.symfony-project.org/plugins/sfSslRequirementPlugin
> 
> Anyways, I've found a few blog posts on the internet that attempt to
> also address the issue, but I just find it surprising that the Symfony
> documentation doesn't even talk about HTTPS. Here are a couple of
> options I discovered:
> 
> http://www.saynotoflash.com/archives/symfony-1-2-redirect-specific-modules-and-actions-to-https-ssl/
> http://usefulthink.com/2010-04/using-ssl-for-some-routes-in-symfony-1-3/
> 
> If someone could point me in the correct direction for the best
> practice for HTTPS in symfony, that would be greatly appreciated.
> 
> 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


Re: [symfony-users] distinguishing between task and web request

2010-10-13 Thread Georg
execute

sfContext::createInstance($this->configuration);

in the task as the first line in execute(). I have always wondered why
this is not done by default in tasks...

Am 13.10.2010 11:08, schrieb axel at:
> hello,
> 
> I need to distinguish if a model function was called within a web
> request or run within a task (to avoid error thrown by
> sfContext::getInstance() when executed within a taks)
> 
> thx 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


Re: [symfony-users] Need ideas: weird doctrine problem

2010-10-06 Thread Georg
Sorry, forgot the relations in data.schema.yml in my previous post:

data.schema.yml
_
connection: data
LocalBinaryReading:
  tableName: binary_reading
  columns:
name: {type: string, length: 255, notnull: true, unique: true}
Station:
  columns:
d1: { type: integer, notnull: false, default: null, name:
"d1_binary_reading_id as d1" }
  relations:
BinaryReadingD1: { class: LocalBinaryReading, local:
d1_binary_reading_id, foreign: id, onDelete: RESTRICT }
_
is correct.

Am 06.10.2010 10:49, schrieb Georg:
> Hi,
> 
> I have a weird doctrine problem, and no clue, where to look to find the
> cause :-(
> In short, a doctrine get method returns different object types in test
> and in dev environment.
> 
> In detail:
> I have two schema files (the connection sites and data go to different
> databases)
> 
> sites.schema.yml:
> __
> connection: sites
> BinaryReading:
>   tableName: binary_reading
>   columns:
> name: {type: string, length: 255, notnull: true, unique: true}
> _
> 
> and data.schema.yml
> _
> connection: data
> LocalBinaryReading:
>   tableName: binary_reading
>   columns:
> name: {type: string, length: 255, notnull: true, unique: true}
> Station:
>   columns:
> d1: { type: integer, notnull: false, default: null, name:
> "d1_binary_reading_id as d1" }
> BinaryReadingD1: { class: LocalBinaryReading, local:
> d1_binary_reading_id, foreign: id, onDelete: RESTRICT }
> _
> 
> And the weird thing is that if I run
> 
> echo get_class($station->getBinaryReadingD1());
> 
> * in a task (env=dev), the output is "LocalBinaryReading"
> * but in a test, the output is "BinaryReading".
> 
> If you have any ideas, what could cause this, or where to look, please
> let me now, this is driving me crazy. Or maybe this is a side effect of
> something else, but what???
> 
> Georg
> 

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

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


[symfony-users] Need ideas: weird doctrine problem

2010-10-06 Thread Georg
Hi,

I have a weird doctrine problem, and no clue, where to look to find the
cause :-(
In short, a doctrine get method returns different object types in test
and in dev environment.

In detail:
I have two schema files (the connection sites and data go to different
databases)

sites.schema.yml:
__
connection: sites
BinaryReading:
  tableName: binary_reading
  columns:
name: {type: string, length: 255, notnull: true, unique: true}
_

and data.schema.yml
_
connection: data
LocalBinaryReading:
  tableName: binary_reading
  columns:
name: {type: string, length: 255, notnull: true, unique: true}
Station:
  columns:
d1: { type: integer, notnull: false, default: null, name:
"d1_binary_reading_id as d1" }
BinaryReadingD1: { class: LocalBinaryReading, local:
d1_binary_reading_id, foreign: id, onDelete: RESTRICT }
_

And the weird thing is that if I run

echo get_class($station->getBinaryReadingD1());

* in a task (env=dev), the output is "LocalBinaryReading"
* but in a test, the output is "BinaryReading".

If you have any ideas, what could cause this, or where to look, please
let me now, this is driving me crazy. Or maybe this is a side effect of
something else, but what???

Georg

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

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


Re: [symfony-users] Using 'IN' in a subquery with doctrine

2010-08-26 Thread Georg
I see.
so if the model looks like this
panel:
  columns:
id:
furniture_id:
  relations:
furniture: {local: furniture_id, foreign: id, foreignAlias: panels}

you should be able to do it like this:
$query = new Doctrine_Query();
$query->select('f.*')->distinct()->from('furniture
f')->leftJoin('f.panels p')->whereIn('p.id', array(1,7,8,9));


Am 27.08.2010 07:50, schrieb Sebastien Armand [Pink]:
> Ok, probably did not explain myself very well then. I receive an array
> of panel Ids that I know have "issues", but since the panels are only
> parts of a bigger thing that is a furniture, I'm not interested in
> showing anyone that those panel have issues, I'd rather show that the
> bigger furniture as a whole has issues.
> 
> Therefore, upon receiving that list of troubled panels, I want to get
> all the related furniture (each panel has one and only one furniture)
> and display it later.
> 
> The model is something like:
> furniture:
>   id:
>   other_non_relevant_columns:
> 
> panel:
>   id:
>   furniture_id:
>   other_non_relevant_stuff:
> 
> The solution you just described here works, but as you said it's an ugly
> cheat (still looking better than the one I'm currently using though!)
> 
> 2010/8/27 Georg mailto:geor...@have2.com>>
> 
> Actually I do not understant what you want to do. You have a group of
> panels, and want to find a group of furniture so that no panel is
> without furniture. But I can't image what you want to do with this
> information without the relation to each panel.
> 
> I have no good solution for your problem, only an ugly cheat :-(
> 
> $pids = array(1,7,8,9);
> Doctrine_Query::create()->from('Furniture f')->where('f.id
> <http://f.id> IN (SELECT
> pa.furniture_id FROM Panel pa WHERE pa.id <http://pa.id> IN
> ('.implode(', ',
> array_fill(0, count($pids), '?').') )', $pids);
> 
> Am 27.08.2010 05:05, schrieb Sebastien Armand [Pink]:
> > It wouldn't be whereIn('f.id <http://f.id> <http://f.id>',
> array(1,7,8,9)), because
> > 1,7,8,9 are the ids of the panels.
> > So I tried fetching the first request as an array (that I did hope
> would
> > be an array of Ids) and using that array in whereIn('f.id
> <http://f.id>
> > <http://f.id>', $furnitureIdArray)
> > But it turns out this array is like this: [ 0 => [ 'id' => '1' ,
> > 'furniture_id' => 7 ] , 1 => [ 'id' => '8' , 'furniture_id' => 79 ]  ]
> > So the only solution I found from there was to go through that whole
> > array and build an array where I only have the furniture ids for my
> > second request.
> >
> > Still I don't like that solution in that:
> > - I have to query the DB 2 times instead of using a subquery
> > - I have to loop through my first query results to build the arguments
> > of the second query.
> > - Something seems pretty wrong in here when I do all this!
> >
> > 2010/8/26 Georg mailto:geor...@have2.com>
> <mailto:geor...@have2.com <mailto:geor...@have2.com>>>
> >
> > try whereIn('f.id <http://f.id> <http://f.id>', array(1,7,8,9))
> >
> > Am 26.08.2010 11:12, schrieb Sebastien Armand [Pink]:
> > > 'IN' being one of the worst possible keyword to search
> online ever, I
> > > found nothing interesting to solve my problem, so here it goes:
> > >
> > > My query should look something like this:
> > >
> > > Doctrine_Query::create()->from('Furniture f')->where('f.id
> <http://f.id>
> > <http://f.id> <http://f.id>
> > > IN (SELECT pa.furniture_id FROM Panel pa WHERE pa.id
> <http://pa.id>
> > <http://pa.id> <http://pa.id> IN ?
> > > )', array(array(1,7,8,9));
> > >
> > > so each 'furniture' has many panels, and a panel has a
> furniture_id. I
> > > received a list of panel ids and want to get all the
> furnitures (sorry
> > > for the awful plural) linked to those panels.
> > >
> > > Doing it this way, when I output the DQL, I see: IN
> (?,?,?,?), but
> > then
>  

Re: [symfony-users] Using 'IN' in a subquery with doctrine

2010-08-26 Thread Georg
Actually I do not understant what you want to do. You have a group of
panels, and want to find a group of furniture so that no panel is
without furniture. But I can't image what you want to do with this
information without the relation to each panel.

I have no good solution for your problem, only an ugly cheat :-(

$pids = array(1,7,8,9);
Doctrine_Query::create()->from('Furniture f')->where('f.id IN (SELECT
pa.furniture_id FROM Panel pa WHERE pa.id IN ('.implode(', ',
array_fill(0, count($pids), '?').') )', $pids);

Am 27.08.2010 05:05, schrieb Sebastien Armand [Pink]:
> It wouldn't be whereIn('f.id <http://f.id>', array(1,7,8,9)), because
> 1,7,8,9 are the ids of the panels.
> So I tried fetching the first request as an array (that I did hope would
> be an array of Ids) and using that array in whereIn('f.id
> <http://f.id>', $furnitureIdArray)
> But it turns out this array is like this: [ 0 => [ 'id' => '1' ,
> 'furniture_id' => 7 ] , 1 => [ 'id' => '8' , 'furniture_id' => 79 ]  ]
> So the only solution I found from there was to go through that whole
> array and build an array where I only have the furniture ids for my
> second request.
> 
> Still I don't like that solution in that:
> - I have to query the DB 2 times instead of using a subquery
> - I have to loop through my first query results to build the arguments
> of the second query.
> - Something seems pretty wrong in here when I do all this!
> 
> 2010/8/26 Georg mailto:geor...@have2.com>>
> 
> try whereIn('f.id <http://f.id>', array(1,7,8,9))
> 
> Am 26.08.2010 11:12, schrieb Sebastien Armand [Pink]:
> > 'IN' being one of the worst possible keyword to search online ever, I
> > found nothing interesting to solve my problem, so here it goes:
> >
> > My query should look something like this:
> >
> > Doctrine_Query::create()->from('Furniture f')->where('f.id
> <http://f.id> <http://f.id>
> > IN (SELECT pa.furniture_id FROM Panel pa WHERE pa.id
> <http://pa.id> <http://pa.id> IN ?
> > )', array(array(1,7,8,9));
> >
> > so each 'furniture' has many panels, and a panel has a furniture_id. I
> > received a list of panel ids and want to get all the furnitures (sorry
> > for the awful plural) linked to those panels.
> >
> > Doing it this way, when I output the DQL, I see: IN (?,?,?,?), but
> then
> > have an error:
> >
> >
> > Invalid parameter number: number of bound variables does not match
> > number of tokens
> >
> > If I change the double array into just one array, then the DQL only
> > reads: IN ? and I get the same error since I have 4 parameters but
> only
> > 1 question mark.
> >
> > I also tried creating another doctrine query on panels:
> > $panQuery = Doctrine_Query::create()->
> > select('pa.furniture_id')->
> > from('Panel pa')->
> > whereIn('pa.id <http://pa.id> <http://pa.id>',
> array(1,7,8,9));
> >
> > and having my global query like this:
> >  $q =Doctrine_Query::create()
> > ->from('Furniture f')
> > ->where('f.id <http://f.id> <http://f.id> IN (?) ',
> $panQuery->getDql());
> >
> > The output Dql is something I can get, put in my phpMyAdmin and I will
> > get 2 results. I get 0 through doctrine though.
> >
> > Any advice on how to use IN within subqueries is very much welcome!
> >
> > --
> > 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 

Re: [symfony-users] Using 'IN' in a subquery with doctrine

2010-08-26 Thread Georg
try whereIn('f.id', array(1,7,8,9))

Am 26.08.2010 11:12, schrieb Sebastien Armand [Pink]:
> 'IN' being one of the worst possible keyword to search online ever, I
> found nothing interesting to solve my problem, so here it goes:
> 
> My query should look something like this:
> 
> Doctrine_Query::create()->from('Furniture f')->where('f.id 
> IN (SELECT pa.furniture_id FROM Panel pa WHERE pa.id  IN ?
> )', array(array(1,7,8,9));
> 
> so each 'furniture' has many panels, and a panel has a furniture_id. I
> received a list of panel ids and want to get all the furnitures (sorry
> for the awful plural) linked to those panels.
> 
> Doing it this way, when I output the DQL, I see: IN (?,?,?,?), but then
> have an error:
> 
> 
> Invalid parameter number: number of bound variables does not match
> number of tokens
> 
> If I change the double array into just one array, then the DQL only
> reads: IN ? and I get the same error since I have 4 parameters but only
> 1 question mark.
> 
> I also tried creating another doctrine query on panels:
> $panQuery = Doctrine_Query::create()->
> select('pa.furniture_id')->
> from('Panel pa')->
> whereIn('pa.id ', array(1,7,8,9));
> 
> and having my global query like this:
>  $q =Doctrine_Query::create()
> ->from('Furniture f')
> ->where('f.id  IN (?) ', $panQuery->getDql());
> 
> The output Dql is something I can get, put in my phpMyAdmin and I will
> get 2 results. I get 0 through doctrine though.
> 
> Any advice on how to use IN within subqueries is very much welcome!
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] setCookie with a different domain

2010-08-26 Thread Georg
AFAIK for security reasons, you cannot set cookies for another domain.
Sub domains of your own domain are possible.

Am 26.08.2010 03:53, schrieb Mariano Sola:
> Hi all, how is it going?
> 
> I'd like to ask you how can I set a domain that is not the same the
> setCookie method is invoked in order to be read from other domain.
> 
> Currently I'm doing the following but the cookie is not created:
> 
> $response = sfContext::getInstance()->getResponse();
> $response->setCookie("TestCookie", "valorCookie", null, "/",
> "www.example.com ", 0, 0);
> 
> The weird thing here is that if I replace "www.example.com
> " with "" the cookie is being created correctly
> using as domain "localhost" which is my Dev environment domain.
> 
> Somebody faced with this issue? Is there some piece of the configuration
> I missed?
> 
> Thanks in advance!
> *mariano ::*
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] Re: Unhappy: sending mails with layout

2010-08-23 Thread Georg
Hello,

I created a plugin with this functionality
(http://www.symfony-project.org/plugins/ggEmailPlugin). I am using it in
a live project, and it works well in my settings.
If you have time please give it a try and report any issues you may find.

Georg



Am 19.08.2010 23:18, schrieb Antoine S.:
> Hi,
> 
> I quiet like to use the dispatcher to send email.
> The listener will build the email.
> 
> For the layout, I only use partial -renderPartial(), that can act as a
> layout because you can
> include other partial/component in a partial.
> 
> Maybe with sfView or sfPHPView there is a way to render a complete
> layout..
> I am quiet interested too if there is an easy solution.
> 
> If not, partial and component are good.
> 
> On Aug 19, 1:22 am, Georg  wrote:
>> Hello,
>>
>> I am confused. I would like to send emails with layout and template from
>> any place in my project, application or a task.
>> Reading the docs
>> (http://www.symfony-project.org/more-with-symfony/1_4/en/04-Emails), it
>> tells me to put each email in a class, and "Of course, adding a base
>> class to centralize the shared headers like the From header, or to add a
>> common signature can be convenient".
>>
>> Here comes the part why I am unhappy and confused, I have a cool MVC
>> framework, and for emails I should go back to home-brew PHP and mix view
>> and controller?
>>
>> Wouldn't it be cleaner to put the email views in a plugin, and make them
>> accessible from everywhere?
>>
>> I would have expected a plugin that makes this possible, but no.
>>
>> How are you doing it, where do you put the presentation layers of your
>> emails?
>>
>> Georg
> 

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

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


Re: [symfony-users] How to set a field with the id of the doctrine object in the saving process

2010-08-19 Thread Georg
Why don't you give it just a random name?

Am 19.08.2010 21:55, schrieb Alexis Sanchez:
> Hi!
> 
> I have a doctrine model like this:
> 
> Asset:
>   columns:
> filename: { type: string(255), notnull: false, unique: true }
> filesize: { type: integer, notnull: true }
> 
> In the saving process I want to check if the user has left the
> filename empty. In that case i want to set the filename with the id of
> the object.
> 
> The problem is that I don't know where the Id of the object is aviable
> in the saving process. żhave I to do it in the doSave method? żafter o
> before calling the parent::doSave
> 
> I want to do something like this:
> 
> public function doSave($con = null)
> {
> 
> if(null === $this->getObject()->getFilename()){
> $this->getObject()->setFilename($this->getObject()-
>> getId());
> }
> 
> parent::doSave($con);
> }
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] Unhappy: sending mails with layout

2010-08-19 Thread Georg
Please?

Am 18.08.2010 15:22, schrieb Georg:
> Hello,
> 
> I am confused. I would like to send emails with layout and template from
> any place in my project, application or task.
> Reading the docs
> (http://www.symfony-project.org/more-with-symfony/1_4/en/04-Emails), it
> tells me to put each email in a class, and "Of course, adding a base
> class to centralize the shared headers like the From header, or to add a
> common signature can be convenient".
> 
> Here comes the part why I am unhappy and confused, I have a cool MVC
> framework, and for emails I should go back to home-brew PHP and mix view
> and controller?
> 
> Wouldn't it be cleaner to put the email views in a plugin, and make them
> accessible from everywhere?
> 
> I would have expected a plugin that makes this possible, but no.
> 
> How are you doing it, where do you put the presentation layers of your
> emails?
> 
> Georg
> 

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

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


[symfony-users] Unhappy: sending mails with layout

2010-08-18 Thread Georg
Hello,

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

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

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

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

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

Georg

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

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


Re: [symfony-users] Inconsistent syntax errors in cache files

2010-07-30 Thread Georg
I had a similar issue once. I am not sure what exactly it was, but I
think it was two errors playing together. Symfony tries to chmod/umask
the cache file after it is written, and I have a virtual linux server
accessing the data on a windows share which does not allow chmod. So an
error occured after the first cache file was written, but I didn't see
the error message because I had the sfErrorNotifier plugin in this env,
and it was not configured yet. And after each start only the next cache
file was written, so eventually after some tries it worked normally,
because in the end all cache files were written.
Try to comment out the lines 365 and 366 (chmod, umask) in
lib/vendor/symfony/lib/config/sfConfigCache.class.php, this helped in my
case.

HTH Georg


Am 29.07.2010 18:07, schrieb Jonotron:
> I've just started playing with Symfony 1.4.6 (after having worked with
> 1.0 many moons ago) and I am having a significant problem with the
> generated cache files. It seems as though they are not being generated
> correctly but in an inconsistent manner. I will get syntax errors in a
> few cache files that will eventually disappear if I cache:clear and
> reload the page enough times (sometimes requiring 5-6 cache clears).
> 
> The syntax errors are inconsistent but usually:
> unexpected $end in /myproject/cache/frontend/dev/config/
> config_autoload.yml.php
> unexpected $end in /myproject/cache/frontend/dev/config/
> config_factories.yml.php
> 
> I also get the error on the command line when I try a doctrine:build-
> model. It gets to the "resetting application autoloaders" step then
> gives me an "unexpected $end in /myproject/cache/frontend/dev/config/
> config_autoload.yml.php". This error disappears if I try
> doctrine:build-model enough times.
> 
> I am running Ubuntu 10.04, Apache 2.2.14, PHP 5.3.2 with APC (above
> errors appear with APC on or off) and Symfony 1.4.6 (installed from
> tar.gz)
> 
> Any ideas what is going on? It's putting a bad taste in my mouth and
> quite frustrating to work this way.
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] Array Problems

2010-07-28 Thread Georg
???

foreach ($var as $val){
  echo $val['email'];
}

Am 28.07.2010 17:08, schrieb Andro Fumero:
> hello,
> 
> can someone help me how to display the array below like
> 
> ex. "so...@yahoo.com and some2.yahoo.com"
> 
> Array ( [0] => Array ( [id] => 1 [email] => so...@yahoo.com )
>[1] => Array ( [id] => 17 [email] => so...@yahoo.com )
>  )
> 
> Thanks
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] Re: We are facing some issues with symfony backend.

2010-07-26 Thread Georg
brajesh,

the admin generator receives an empty (= '') form field when saving an
object, and this is stored. If you want to change empty to null, add a
preSave() method to your object, that checks for empty fields:

public function preSave($event){
  if ($this->nullablefield === ''){
$this->nullablefield = null;
  }
}

HTH Georg

Am 26.07.2010 12:54, schrieb brajesh:
> Hi friends,
> 
> I have generated backend by symfony.
> Suppose i have a table in schema.yml
>   listing:
> id:
> type: char
> name:
> 
> Then i have generated Model, Sql and Backend by symfony.
> Now the problem is: If, in the database "listing.type"  have null
> value and i open a listing by symfony backend to Edit.
> 
> We did not done any changes and save this listing. Then all columns
> that have null values replaced by blank values for this listing.
> 
> 
> On Jul 24, 6:11 pm, John Kary  wrote:
>> Firstly, I'd recommend reading about the difference between a NULL
>> value and a blank string 
>> value:http://www.databasedev.co.uk/null_values_defined.html
>>
>> A NULL is a truly unknown value. Like if you loaded fixtures and did
>> not define some fields in the fixture, the records would import with
>> NULL values in those columns you did not define.
>>
>> But if presented with a form that has a field for a value, and you do
>> not enter a value, you were given a chance to complete that field, and
>> so it IS known.
>>
>> The solution would be to remove the field you want to keep as NULL
>> from your form's configure() method:
>>
>> class UserForm extends BaseUserForm
>> {
>> public function configure()
>> {
>> unset($this['middle_initial']);
>> }
>>
>> }
>>
>> On Jul 24, 3:50 am, brajesh  wrote:
>>
>>> Hi Friends,
>>
>>> The backend displlays the NULL values stored in db as blank textboxes.
>>> When no values are entered in the backend tool, it is stored as a
>>> blank value in the database rather than a NULL value. How can I set it
>>> as a NULL value?
>>
>>> Please help...
>>
>>> Thanks
>>> Brajesh
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: caching problem in firefox

2010-07-26 Thread Georg
Lea,

I think this happens:
if the user is not authenticated, the page is added to the cache by your
ConditionalCacheFilter. And if withLayout is set, the cache sets a cache
expiry time in the http header that is equal to the ttl
(sfCacheFilter::setCacheExpiration()).
Now the user logs in, and the user is redirected to the homepage. But
firefox recognizes the url, and has a ttl of one hour for it, so does
not request the page again.

You have two choices IMO:

1) Let the client cache the page and use another route for the homepage
action for logged in users (@loggedInHomepage):
cache.yml
homepage:
  enabled: true
  with_layout: true

loggedInHomepage:
  enabled: false
 and redirect the user to @loggedInHomepage in the action if he/she is
not coming through this route.

The advantage of this is that the browser has two urls, where one is
cached and the other not by the browser (reducing the server load
further and speeding up the user experience, and you can drop your
ConditionalCacheFilter and use vanilla symfony cache)

2) Let the server do the caching:
change your ConditionalCacheFilter to use the addCache method with the
clientLifeTime parameter set to 0:
$cache->addCache($page['module'], $page['action'], array('lifeTime' =>
$page['ttl'], 'withLayout' => $page['withLayout'], 'clientLifeTime' => 0));
(hmm, reading sfCacheFilter::setCacheExpiration(), I am not sure if this
works, maybe you should should set clientLifeTime to 1 (nobody can login
in less then one second ;-), check for yourself)

This means the the client will always request the page again, and
symfony serves if from it's cache as long as the user is not logged in
(which I guess whas the intended behaviour by you)

HTH Georg

Am 26.07.2010 12:04, schrieb Lea Hänsenberger:
> No, we use a filter class. The filter.yml entry is the following:
> 
> conditionalCache:
>   # all pages added to this are cached only for anonymous users
>   class: ConditionalCacheFilter
>   param:
> pages:
>   - { module: home, action: index, ttl: 3600, withLayout: true }
> 
> The ConditionalCacheFilter class looks like this:
> 
> class ConditionalCacheFilter extends sfFilter
> {
>   public function execute($filterChain)
>   {
> $context = $this->getContext();
> 
> if (($cache = $context->getViewCacheManager()))
> {
>   if (!$context->getUser()->isAuthenticated())
>   {
> foreach ((array)$this->getParameter('pages') as $page)
> {
>   if (!isset($page['withLayout']))
>   {
> $page['withLayout'] = false;
>   }
>   $cache->addCache($page['module'], $page['action'], array('lifeTime' 
> => $page['ttl'], 'withLayout' => $page['withLayout']));
> }
>   }
> }
> // Execute next filter
> $filterChain->execute();
>   }
> }
> 
> On Jul 26, 2010, at 11:58 , Georg wrote:
> 
>> Do you have with_layout: true in your cache.yml?
>>
>> Am 26.07.2010 11:17, schrieb Lea Hänsenberger:
>>> Hi Georg,
>>>
>>> Ok, I tried with disabling all the firefox addons, clearing the cache and 
>>> sending the cache headers in both the homepage action and the login action. 
>>> I encountered the same behaviour.
>>> If I check the http response on the login page I see the headers I sent. On 
>>> the homepage they seem to be overwritten by the cache filter. 
>>> After the login I'm being redirected to the homepage, but the homepage is 
>>> not re-requested from the server anymore (in firebug's net tab there is no 
>>> request to the homepage).
>>>
>>> Cheers,
>>> Lea
>>>
>>> On Jul 26, 2010, at 10:54 , Georg wrote:
>>>
>>>> Lea,
>>>>
>>>> does this happen also on a firefox out of the box (meaning have you some
>>>> add-ons that mess up your firefox's cache?) because I do not expirience
>>>> this behaviour.
>>>> And are you sending the cache headers on the homepage before login?
>>>> And have you cleared the firefox's cache before doing another test?
>>>> I know, simple things, just to be sure...
>>>>
>>>> HTH Georg
>>>>
>>>> Am 26.07.2010 10:28, schrieb Lea Haensenberger:
>>>>> Hi,
>>>>>
>>>>> I just tried that, it didn't change anything.
>>>>>
>>>>> On Jul 23, 1:16 am, Gustavo Adrian 
>>>>> wrote:
>>>>>> Hi,
>>>>>>
>>>>&g

Re: [symfony-users] Re: caching problem in firefox

2010-07-26 Thread Georg
Do you have with_layout: true in your cache.yml?

Am 26.07.2010 11:17, schrieb Lea Hänsenberger:
> Hi Georg,
> 
> Ok, I tried with disabling all the firefox addons, clearing the cache and 
> sending the cache headers in both the homepage action and the login action. I 
> encountered the same behaviour.
> If I check the http response on the login page I see the headers I sent. On 
> the homepage they seem to be overwritten by the cache filter. 
> After the login I'm being redirected to the homepage, but the homepage is not 
> re-requested from the server anymore (in firebug's net tab there is no 
> request to the homepage).
> 
> Cheers,
> Lea
> 
> On Jul 26, 2010, at 10:54 , Georg wrote:
> 
>> Lea,
>>
>> does this happen also on a firefox out of the box (meaning have you some
>> add-ons that mess up your firefox's cache?) because I do not expirience
>> this behaviour.
>> And are you sending the cache headers on the homepage before login?
>> And have you cleared the firefox's cache before doing another test?
>> I know, simple things, just to be sure...
>>
>> HTH Georg
>>
>> Am 26.07.2010 10:28, schrieb Lea Haensenberger:
>>> Hi,
>>>
>>> I just tried that, it didn't change anything.
>>>
>>> On Jul 23, 1:16 am, Gustavo Adrian 
>>> wrote:
>>>> Hi,
>>>>
>>>> Did you try to disable local caching on the action with headers
>>>> "Cache-control" and "Pragma" to see what happens?
>>>>
>>>> $this->getResponse()->setHttpHeader("Cache-Control", "no-cache");
>>>> $this->getResponse()->setHttpHeader("Pragma", "no-cache");
>>>> $this->getResponse()->setHttpHeader("Expires", 0);
>>>>
>>>> On Thu, Jul 22, 2010 at 11:37 AM, Lea Haensenberger 
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> I found out that when disabling the memory cache in firefox or when
>>>>> setting check.doc_frequency to 1, i.e. request page on every load,
>>>>> everything works fine. doc_frequency is usually set to 3, i.e. check
>>>>> validity of the page by looking at the modified date and reload if
>>>>> necessary, and the modified date changes when going back to the
>>>>> homepage but the page is not actually reloaded.
>>>>
>>>>> Maybe with that additional information someone can help me solve that
>>>>> problem!?
>>>>
>>>>> Cheers,
>>>>> Lea
>>>>
>>>>> On Jul 22, 10:42 am, Lea Haensenberger  wrote:
>>>>>> Does nobody know that problem? I'm a bit lost and I'll have to turn
>>>>>> offcachingif we can't solve the problem.
>>>>>> Does anyone have any idea what could be the reason for that behaviour?
>>>>
>>>>>> Lea
>>>>
>>>>>> On Jul 16, 3:52 pm, pghoratiu  wrote:
>>>>
>>>>>>> Do you have this behavior also with the development controller
>>>>>>> (frontend_dev.php)?
>>>>
>>>>>>>   gabriel
>>>>
>>>>>>> On Jul 16, 4:09 pm, Lea Haensenberger  wrote:
>>>>
>>>>>>>> I've encountered a strange problem with firefox andcaching. When I
>>>>>>>> log in and get redirected to the homepage afterwards I don't see that
>>>>>>>> I'm logged in. If I have a look at
>>>>> context->getUser()->isAuthenticated() I get 'false'. After manually
>>>>> reloading the
>>>>
>>>>>>>> homepage everything is fine. I already tried invalidating the cache
>>>>> on
>>>>>>>> log in, doesn't help.
>>>>>>>> It works fine in Safari.
>>>>>>>> Does anyone have an idea what happens with firefox here?
>>>>
>>>>>>>> Cheers,
>>>>>>>> Lea
>>>>
>>>>> --
>>>>> If you want to report a vulnerability issue on symfony, please send it to
>>>>> security at symfony-project.com
>>>>
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "symfony users" group.
>>>>> To post to this group, send email to symfony-users@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> symfony-users+unsubscr...@googlegroups.com>>>>  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
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: caching problem in firefox

2010-07-26 Thread Georg
Lea,

does this happen also on a firefox out of the box (meaning have you some
add-ons that mess up your firefox's cache?) because I do not expirience
this behaviour.
And are you sending the cache headers on the homepage before login?
And have you cleared the firefox's cache before doing another test?
I know, simple things, just to be sure...

HTH Georg

Am 26.07.2010 10:28, schrieb Lea Haensenberger:
> Hi,
> 
> I just tried that, it didn't change anything.
> 
> On Jul 23, 1:16 am, Gustavo Adrian 
> wrote:
>> Hi,
>>
>> Did you try to disable local caching on the action with headers
>> "Cache-control" and "Pragma" to see what happens?
>>
>> $this->getResponse()->setHttpHeader("Cache-Control", "no-cache");
>> $this->getResponse()->setHttpHeader("Pragma", "no-cache");
>> $this->getResponse()->setHttpHeader("Expires", 0);
>>
>> On Thu, Jul 22, 2010 at 11:37 AM, Lea Haensenberger 
>> wrote:
>>
>>
>>
>>> I found out that when disabling the memory cache in firefox or when
>>> setting check.doc_frequency to 1, i.e. request page on every load,
>>> everything works fine. doc_frequency is usually set to 3, i.e. check
>>> validity of the page by looking at the modified date and reload if
>>> necessary, and the modified date changes when going back to the
>>> homepage but the page is not actually reloaded.
>>
>>> Maybe with that additional information someone can help me solve that
>>> problem!?
>>
>>> Cheers,
>>> Lea
>>
>>> On Jul 22, 10:42 am, Lea Haensenberger  wrote:
>>>> Does nobody know that problem? I'm a bit lost and I'll have to turn
>>>> offcachingif we can't solve the problem.
>>>> Does anyone have any idea what could be the reason for that behaviour?
>>
>>>> Lea
>>
>>>> On Jul 16, 3:52 pm, pghoratiu  wrote:
>>
>>>>> Do you have this behavior also with the development controller
>>>>> (frontend_dev.php)?
>>
>>>>>gabriel
>>
>>>>> On Jul 16, 4:09 pm, Lea Haensenberger  wrote:
>>
>>>>>> I've encountered a strange problem with firefox andcaching. When I
>>>>>> log in and get redirected to the homepage afterwards I don't see that
>>>>>> I'm logged in. If I have a look at
>>> context->getUser()->isAuthenticated() I get 'false'. After manually
>>> reloading the
>>
>>>>>> homepage everything is fine. I already tried invalidating the cache
>>> on
>>>>>> log in, doesn't help.
>>>>>> It works fine in Safari.
>>>>>> Does anyone have an idea what happens with firefox here?
>>
>>>>>> Cheers,
>>>>>> Lea
>>
>>> --
>>> If you want to report a vulnerability issue on symfony, please send it to
>>> security at symfony-project.com
>>
>>> You received this message because you are subscribed to the Google
>>> Groups "symfony users" group.
>>> To post to this group, send email to symfony-users@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> symfony-users+unsubscr...@googlegroups.com>> 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


Re: [symfony-users] Need help with Doctrine migration

2010-07-13 Thread Georg
Hi Joe,

for me this works really well:
add the column to the table in schema.yml
DO NOT ./symfony doctrine:build --all-classes
BUT
./symfony doctrine:generate-migrations-diff
AND NOW ./symfony doctrine:build --all-classes

Now you should be able to run
./symfony doctrine:migrate

BTW: Delete all old migration files before doing this. And you db user
needs the rights to add tables the first time you run migrations.

HTH

PS: The migration files name's start with a timestamp. From this
timestamp doctrine determines in which order to run the migrations (if
you have more than one migration file), and which version of the
database. The first time when you run a migration, doctrine creates a
table migration_version where it keeps the database's version.


Am 13.07.2010 17:22, schrieb Joe:
> Hey everyone,
> 
> I am maintaining a Symfony 1.4 application. I need to add a column to
> an existing table in production database. I am trying to use Doctrine
> migration ability to do so.
> 
> My first command was:
> php symfony doctrine:generate-migrations-db.
> 
> I get the error: Could not generate migration classes from database
> 
> 
> 
> I then tried to generate my own migration class:
> php symfony doctrine:generate-migration AddMymoduleMyfield
> 
> Class was generated as well as 91 others that re-create my complete
> database (isn't this supposed to be the result of the first command ?)
> Problem is, as soon as I launch:
> php symfony doctrine:migrate
> 
> Here's the output I get:
> 
>>> doctrine  Migrating from version 1 to 92
> 
> I then get error saying that table already exists. So I gather
> migration is going to try to recreate databases from start, and
> PostgreSQL returning 'already exists' error.
> 
> Simply put, is there a way to ask Symfony to migrate from version 91
> to 92 (instead of 1 to 92) ??
> 

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

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


[symfony-users] $form->bind() should return the form object...

2010-07-01 Thread Georg
Hello,

I think that the bind() method of the Form object should return the
object to make it possible to chain methods, for my personal use of
forms, this would make sense:

if ($request->isMethod('POST') &&
$form->bind($request->getParameter('formvars'))->isValid()){
...
} else {
...
}

Because now I have
if ($request->isMethod('POST')){
  $form->bind($request->getParameter('formvars'));
  if ($form->isValid()){
...
  }
// and now where to put the else?
  else {
//   here?
  }
}else {
// or here?
}

What do you think?

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] Customizable processes

2010-06-30 Thread Georg
I too would be very interested in a workflow engine/builder of some
kind. Has anybody realised any part of this in a project?

@Sebastien: Do you want to run all sub company custom processes in one
symfony installation, or does each sub company receive their own
installation?

BR Georg

Am 30.06.2010 08:26, schrieb Sebastien Armand [Pink]:
> Hello everyone,
> 
> I am soon to start a new symfony based project that will have to be
> customized / adapted depending on the company that is going to use it.
> All those are sub-companies of our company and work on the same topic,
> with processes that are similar but not identical. And get more or less
> complex depending on the size of the company.
> 
> Most of the basic actions that will be taken on the system are common
> ones, I mean creating a contract, requires at least getting a client a
> product and a price together, no matter how you wish to do it. But they
> might occur in a certain order for a company and in a different order in
> a second company. Or some steps like a validation or approval might be
> required somewhere but completely useless for other companies and
> therefore troublesome if we keep such steps active for them.
> 
> I have read a bit about the event dispatcher and events in Symfony and
> think there might be something here that could help us although I don't
> see clearly yet how it could be used to customize the workflow of
> certain business objects. And of course that workflow would have to be
> adapted for different companies outside of the code. Even if it's
> something that has to generate code for the project later on or
> whatever. The primary definition of that workflow should be a
> configuration file of any kind.
> 
> I'm pretty sure that this need is something that has already been
> required by other people. I'm also pretty sure that I don't have the
> right vocabulary to describe it right now otherwise google would send me
> some information about what I'm looking for!
> 
> Any insight on this issue / link towards interesting readings that I
> missed would be very much appreciated.
> 
> Thanks!
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


Re: [symfony-users] Re: how to prevent save in preInsert?

2010-05-29 Thread Georg Gell
add this to each form's configure() method, that you want to have flood
protected (I expect that you want to protect this way (form) of entering
data from flooding, and not the model itself):

$this->validatorSchema->setPostValidator(new CombValidator(null,
array(), array('invalid' => 'Flooding is not acceptable')));

and put the CombValidator in the lib dir:

class CombValidator extends sfValidatorSchema {
  protected function doClean($values) {
if ($isFlood){
  throw new sfValidatorError($this, 'invalid');
}
  }
}


Am 29.05.2010 06:17, schrieb comb:
> Hey & Thanks! Yeah it's more clean like you describe to do it in
> processForm or the isValid for the form classes, but then I have to
> add this validation to each model-actions-class/model-form, that I
> want to be flood-protected. Isn't there a way to prevent code-
> duplication by using the preInsert hooks or something else? (DRY-
> principle)
> (That's maybe what the thread is about... best practice regarding DRY
> or not DRY).
> 
> On 28 Mai, 14:24, Tom Ptacnik  wrote:
>> If you want to redirect back to the filled form when user don't wait
>> enough, then I think the best solution would be to do this validation
>> in the moment as classic validation of the form fields.
>>
>> I suggest to create some class for this validation ...
>> FloodProtector.class.php
>> then create some method testFlood() maybe static maybe not :)
>>
>> And I see two options:
>>
>> Option 1)
>>  Do this validation in the form object. For example in the method
>> isValid()
>> .. overwrite it ..
>>
>> public function isValid()
>> {
>>   if (FloodProtector::testFlood())
>>   {
>>.. set error message somehow
>>   return false;
>>   }
>>
>>   return parent::isValid();
>>
>> }
>>
>> Option 2)
>>  Check for this in the action next to the $form->isValid();
>>
>> protected function processForm(sfWebRequest $request, sfForm $form)
>> {
>>   $form->bind($request->getParameter($form->getName()), $request-
>>
>>> getFiles($form->getName()));
>>
>>   if ($form->isValid())
>>   {
>> if (FloodProtector::testFlood())
>> {
>>   $this->getUser()->setFlash('error', 'The item has not been saved
>> due to flood protection.');
>> }
>> else
>> {
>>  ... classic process if form is valid
>> ...
>>
>> On 27 kvě, 22:04, comb  wrote:
>>
>>> that works! =) It prevent's the insert itself and I know, how to
>>> redirect back to the form, but I cannot figure out, how to display the
>>> given form values from the invoker again. My form is always empty :-/
>>
>>> class FloodCheckListener extends Doctrine_Record_Listener
>>> {
>>> //...
>>> public function preInsert(Doctrine_Event $event)
>>> {
>>> if (sfContext::hasInstance())
>>> {
>>> if (true) // check user attributes and DB for 
>>> flooding
>>> {
>>> $event->skipOperation(); // do not insert
>>> 
>>> sfContext::getInstance()->getUser()->setFlash('error', 'You have
>>> to wait some time before you can post again!');
>>> $ref = 
>>> sfContext::getInstance()->getRequest()->getReferer();
>>> if (empty($ref))
>>> {
>>> $ref = '@homepage';
>>> }
>>> 
>>> sfContext::getInstance()->getController()->redirect($ref);
>>> // TODO how to submit the invoker-values to 
>>> the form??
>>> die(); // cancel current route-execution
>>> }
>>> }
>>> }
>>
>>> }
>>
>>> This is very dirty and I don't know how to write this behavior in a
>>> better / cleaner way.
>>
>>> Any help would be appreciated.
>>
>>> Comb
>>
>>> On 27 Mai, 16:46, Daniel Lohse  wrote:
>>
 http://www.doctrine-project.org/projects/orm/1.2/docs/manual/event-li...
>>
 scroll down a little bit to the line: $event->skipOperation();
>>
 This should do what you want?
>>
 Daniel
>>
 On 27.05.2010, at 16:41, comb wrote:
>>
> Hey thanks, but it does not work :-(
> class FloodCheckListener extends Doctrine_Record_Listener
> {
>//...
>public function preInsert(Doctrine_Event $event)
>{
>return false;
>}
> }
> The record is saved anyway.
>>
> On 27 Mai, 16:26, Robert Schoenthal  wrote:
>> he,
>>
>> try to "return false" in your preInsert Method, it think it should
>> work
>>
>> On May 27, 12:39 am, comb  wrote:
>>
>>> Hi,
>>
>>> i'm writing a CheckFloodable-Behavior.
>>> Before a new record is saved, I would like to prevent the insertion of
>>> the new record if the user did not wait long enough.
>>> It's very dirty since I use the sfContext::getInstance() quite much,
>>> but my 

Re: [symfony-users] Templates in a single directory

2010-05-17 Thread Georg Gell
It might be worth looking into using your own view class:
something along

class myView extends sfPHPView {
  public function setDirectory($directory){
$this->directory = $directory . '/theme'; //whatever, must be full path
  }
}

and in filters.yml
rendering:
  class: myView

But then caching will probably not differentiate between the themes, but
that would be the next step ;-)

Am 16.05.2010 19:53, schrieb Davide Borsatto:
> Hi everybody,
> 
> for the project I've been working on I need to be able to define
> multiple themes.
> With "theme" I mean the full thing, including php code for the
> templates, images, stylesheets and javascripts too.
> 
> But symfony templates structure is not quite friendly for this kind of
> operation, since we have files on
> 
> - apps/frontend/templates/
> - apps/frontend/modules/*/templates/
> - web/images
> - web/css
> - web/js
> 
> Which is not a good solution to mantain.
> My idea was to package themes in the "data" directory, creating
> something like
> 
> - data
> -- themes
> --- default
>  css
>  js
>  images
>  templates
>  modules
> - module1
> - module2
> 
> Basically I need to be able to put every file needed in a single
> directory (like most CMS do).
> 
> Since the data dir is not world wide accessible, I thought about
> creating a task that creates symlinks in the web directory, so this
> problem is easily solved.
> 
> Now about the PHP files: what's the best solution to handle this?
> I think I have two choices:
> 1 make symfony look into the right directories, creating custom view
> and partial classes
> 2 making the apps/frontend/templates and apps/frontend/modules/*/
> templates symlink to the directory theme
> 
> I like more the first solution, but after a while looking in the
> symfony core I still can't figure out how to "redirect" all paths to
> the theme dir. Setting the global layout is as easy as doing
> 
> sfConfig::set('sf_app_template_dir', $themeDir . '/templates')
> 
> But module templates are a bit harder to configure. Actually, I still
> don't know how to do that :)
> 
> So this is my question: which one is the best approach? I'd rather not
> have symlinks all over my project, but that seems to be the easiest
> solution (one console task to handle everything, no symfony classes to
> override, no risks to forget about this or that...).
> 

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] a question about routing framework :P

2010-04-01 Thread Georg Gell
try to put something like this in routing.yml

auckland:
  options: { segment_separators: [/, ., -] }


Am 01.04.2010 08:39, schrieb Lee Joseph:
> as I know routing framework in symfony which separates url information
> with slash '/'  or dot '.' like
> 
> some_route:
>   url:  /:module/:actions/:id
> 
> 
> I just want know is there anything I can do to make some Url like
> .com/auckland/module-action-id
> 

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

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

To unsubscribe, reply using "remove me" as the subject.


Re: [symfony-users] Symfony License issue

2010-03-15 Thread Georg Gell
Hi,

checkout symfony and execute
>find . -name 'LICENSE*'
in it's folder.

Am 13.03.2010 10:29, schrieb Avinash:
> Hi There,
> 
> I am not sure if this is right place, but I need to clear my doubt
> that if i can create a symfony based product for selling instances to
> clients without paying to any one or there is any paid version of
> symfony framework.
> I do have gone through licenses posted on http://www.symfony-project.org/
> at multiple locations including CCPL (the most confusing one) but
> still not clear with legality.
> Or let me know where I should see.
> Please 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


Re: [symfony-users] Slow template rendering

2010-01-28 Thread Georg Gell
Axel,

is it possible that the creation of the user objects takes such a long
time? I don't know what your user objects do, or how many are in this
list, but just for displaying the names of the users, I wouldn't
create objects, but hydrate with Doctrine_Core::HYDRATE_SCALAR.
Try if this works more quickly:

set up this method in your Event object:

class Event extends BaseEvent{
...
public function getUserListAsArray()
{
  return Doctrine::getTable('Users')->createQuery()->where('event_id =
?', $this->id)->execute(array(), Doctrine_Core::HYDRATE_SCALAR);
}

and in the template:

getUserListAsArray() as $user){
echo <<
  {$user['firstname']} {$user['lastname']}

EOT;
} ?>

Does this solve your speed problem?

Georg

Am 27.01.2010 19:58, schrieb axel at:
> hello list,
> 
> symfony seems to be extrem slow - compared to "native" php
> a request with the following code takes ~26 seconds (count($event-
>> getUserList()) == 5000)
> 
> getUserList() as $user):  ?>
>
>   getFirstname(). " ". $user->getLastname
> (); ?>
> 
>  
> 
> type  calls   time (ms)   time (%)
> Configuration 13  1932.20 7
> Factories 1   361.77  1
> Database (Doctrine)   8   0.060
> Action "event/listAction" 1   19.53   0
> View "Success" for "event/listAction" 1   25653.2093
> Partial "event/_assets"   1   1.410
> Partial "event/_flashes"  1   5.310
> Component "address/menuItems" 1   68.60   0
> Partial "address/_menuItems"  1   3.230
> Component "address/loginState"1   0.060
> Partial "address/_loginState" 1   2.060
> 
> the doctrine database query is ok
> I don't think that the templating is the problem, (I tried to do the
> output with echo $user->... from within the action what took as long
> as if I used the template engine. for me it seems to be a doctrine
> problem (foreach...?)
> 
> is there a way to improove this poor results?
> 

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



Re: [symfony-users] No content

2010-01-21 Thread Georg Gell
This happens sometimes when you have a fatal php error in the template
(or a method called from the template)

Am 21.01.2010 17:24, schrieb Pax95:
> I've installed a project in my local server - WampServer and it works
> successfully. I added test content and uploaded it into server
> (www.linuxpl.com) and it doesn't show anything.
> 
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] URGENT: default_messages translation

2010-01-20 Thread Georg Gell
Am 19.01.2010 14:40, schrieb diogobaeder:
> Hi, guys,
> 
> I've posted this one:
> http://groups.google.com/group/symfony-users/browse_thread/thread/5432958e71a54747/76035d6987e00ad8?lnk=gst&q=diogobaeder#76035d6987e00ad8
> 
> But I haven't found a solution, yet. The problem is, I have to deliver
> the website for my client, and he's complaining that part of the
> interface is still in English.
> 
> What do you recommend me to do? Create Symfony patches in order to
> give support for these changes? Or is there a way to translate it,
> already?
> 
> Thanks!
> 

I think you should ask this question on the symfony-devs list. IMO your
translation efforts should not be wasted on local patches, but made
available to the community.
-- 
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: sfDoctrineGuard is killing me

2010-01-11 Thread Georg Gell
This is a mysql specific error, because mysql only allows 64 bytes
length (http://dev.mysql.com/doc/refman/5.0/en/identifiers.html). It
seems that the SQL standard defines 128 bytes (
http://bugs.mysql.com/bug.php?id=13942)
I think you should file a bug report for doctrine.

Am 12.01.2010 00:31, schrieb Mike Church:
> 
> 
> On Jan 11, 12:30 pm, Georg Gell  wrote:
>> probably the key name is too long. Try if this works:
>> ALTER TABLE sf_guard_group_permission ADD CONSTRAINT
>> g FOREIGN KEY (permission_id) REFERENCES sf_guard_permission(id)
>>
>> Am 11.01.2010 07:54, schrieb Mike Church:
>>
> 
> Wow!
> 
> Thank you mysql for not telling me that there is a limit to the name
> of a FK CONSTRAINT!!
> 
> Thank you Georg.
> 
> I will look into getting the sfDoctrineGuard plug in maintainers to
> change it.
> 
> Any suggestions on how I can change it?  Editing data/sql/schema.sql
> and doing ./symfony doctrine:insert-sql doesn't do it.  Is the schema
> coming from somewhere else and merged into ata/sql/schema.sql during
> the insert?  When I change the CONSTRAINTS to much shorter versions,
> the do the SQL manually, it works.
> 
> 
> 
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] sfDoctrineGuard is killing me

2010-01-11 Thread Georg Gell
probably the key name is too long. Try if this works:
ALTER TABLE sf_guard_group_permission ADD CONSTRAINT
g FOREIGN KEY (permission_id) REFERENCES sf_guard_permission(id)

Am 11.01.2010 07:54, schrieb Mike Church:
> Hi Folks:
> 
> I have been trying to deploy, I have everything working right locally.
> 
> Now without implying I've tried everything I can tell you all that I
> am at the end of my rope.  When I use the svn version of
> sfDoctrineGuard from:
> 
> http://svn.symfony-project.com/plugins/sfDoctrineGuardPlugin/trunk
> (currently revision 26468)
> 
> and symfony 1.4
> 
> Then do a
> 
> ./symfony doctrine:build --all --env=prod
> 
> I get:
> 
> SQLSTATE[HY000]: General error: 1005 Can't create table './quicksand-
> staging/#sql-899_274.frm' (errno: 121). Failing Query: "ALTER TABLE
> sf_guard_group_permission ADD CONSTRAINT
> sf_guard_group_permission_permission_id_sf_guard_permission_id FOREIGN
> KEY (permission_id) REFERENCES sf_guard_permission(id)". Failing
> Query: ALTER TABLE sf_guard_group_permission ADD CONSTRAINT
> sf_guard_group_permission_permission_id_sf_guard_permission_id FOREIGN
> KEY (permission_id) REFERENCES sf_guard_permission(id)
> 
> Any ideas?  I'm using integer(4) for any fields holding sfGuardUser
> ids (which fixed it when I was using 1.2 - and was a major pain and
> took a long time to find).  I tried straight integer as well.
> 
> This is a constraint inside the sfDoctrineGuard plugin, isn't it?
> 
> And yes, I'm clearing the cache. Etc.  Is there a special unblemished
> version of sfDoctrineGuard I need to use?
> 
> It burns me that it runs locally.  Actually, kills me.
> 
> Thanks for any input.
> 
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Offbeat: open source vs closed source technologies

2010-01-08 Thread Georg Gell


Am 08.01.2010 15:20, schrieb Lee Bolding:
> 
> On 8 Jan 2010, at 13:43, Eno wrote:
> 
>> On Fri, 8 Jan 2010, Lee Bolding wrote:
>>
>>> The whole IIS/windows server licensing issue is also beginning to  
>>> disappear - if you want a well supported, enterprise grade, stable and  
>>> scalable PHP environment, you'll likely want Zend Server - which costs  
>>> around the same as a Windows Server license. Apache, lighttp, nginx  
>>> etc are all free, but who actually supports them? If your server goes  
>>> bump in the night, who you gonna call?
>>
>> We have our own support team to call :-)
> 
> Yes, but a salaried employee is more expensive than raising a ticket on a 
> case-by-case basis with the likes of Zend (or buying a support contract to 
> begin with)
> 
The funny thing is that the Zend server consists mainly of OS software,
apache, mysql and php. This shows how to earn money with OS, package OS,
optimize it and sell it as a CS package with support.
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Offbeat: open source vs closed source technologies

2010-01-08 Thread Georg Gell
Hi,

Am 08.01.2010 09:46, schrieb Parijat Kalia:
> Hey guys,
> 
> Just lighting up everyone's day, would like to get as many as possible
> arguments on this. Me and a friend of mine, had a debate last evening,
> about open source(PHP) vs closed source technologies(DOT NET).He raised
> the following points:
> 
> 1. He feels that open source is not reliable whereas closed source is.
> The logic being that, once the application is developed and sold, if it
> runs into some kind of a bug or an error, there is support team for
> closed source technologies who are going to come and help you fix it,
> whereas this is not a guarantee in open source technologies.

Depends.
Why do you think there are more apache servers than iis servers on the
web? Because they are more reliable and cheaper, and they have a large
user base that will help you out for free.
Firefox vs IE? Judge for yourself.
PHP vs .Net? I think it will take a long time to get a bug fixed in both
of them, you will rather do a work around. Where in both products the
community will help. But with .Net you can also ask MS.

> 
> 2. Development for a successful open source technology is community
> dependent, implying the choice is still on a faithful group of users,
> whereas in closed source technologies it is more reliable because it is
> being backed by a company (microsoft for .NET and SAP for SAP).

Hmm, IMO the costs are lower in some cases. Because all major OS
products are quite stable and have a very good QMS.
Take for example symfony: In his post
http://www.mail-archive.com/symfony-d...@googlegroups.com/msg05854.html
Fabien complains that nobody pays for symfony support.
[quote]
Keep in mind that symfony is an Open-Source project, so everybody can
contribute and scratch its itch. The core developers and all plugin
developers are all working for free. Of course, Sensio sponsors the
framework, of course it dedicates a lot of time and money to it, and of
it can even provide extended support for all versions for companies
willing to pay. And do you know how many companies, except Sensio
customers, signed up for extended support in the last 2 years? None!
Yep, that's right, not a single one.[/quote]

This shows that all developers using symfony think it is cheaper to ask
the community then to pay for support.
If you want to make a choice in a real case, try to calculate the TCO.

>  3. The third point that was raised is, closed source technologies
> enforce quality control as opposed to open source technologies, where
> the onus on quality control in case of the latter, is more on the
> developer himself.

See above.

> The reasoning I could offer was that big companies such as Yahoo (
> symfony), facebook (php), and Twitter (rails) rely on open source
> technologies, surely they are aware of the above points but still choose
> to go with open source rather than closed source technologies. Money is
> not the most important criteria for these companies, and there
> definitely is a better reason why they choose open rather than closed
> source technologies.  

I think most people decide for OS because
* they like the idea of OS
* it is cheaper
* if they really need additional functionality, they can add it (by
themselves or other developers) without having to wait for Godot
* the product has a big community to ask

Decisions to use CSs are based on
* they need/want professional support
* it is cheaper
* the product is developed for a company that uses CSs only

And then there is the middle, usage of open source with professional
support, like mysql offers.



> However, it is still not convincing me for I found myself agreeing to
> the points my friend raised in favor of closed source technologies. Can
> anyone shed a light on this?
> 
> 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.




Re: [symfony-users] admin generator, change redirect target after create/update

2009-12-21 Thread Georg Gell
No, we can't. The exception is thrown after response::send() is executed :-(


Am 20.12.2009 19:34, schrieb Alexandre Salomé:
> The exception is thrown by the redirect method, to stop any execution.
> 
> So when the exception is thrown, you form was already saved.
> 
> The real question is "can we over-redirect" ?
> 
> 
> 2009/12/20 Georg Gell mailto:geor...@have2.com>>
> 
> Hi,
> 
> no, this will not work, because I want to change the redirect after the
> form has been successfully processed, which means no exception to catch.
> 
> Georg
> 
> Am 19.12.2009 22:54, schrieb Alexandre Salomé:
> > Hi,
> >
> >   You can wrap the function in a try...catch block and do your stuff :
> >
> > public function processForm()
> > {
> >   try
> >   {
> > parent::processForm();
> >   }
> >   catch (sfStopException $e)
> >   {
> > $this->redirect(...);
>     >   }
> > }
> >
> >
> > Not sure if this will work... Try and tell us.
> >
> > Alexandre
> >
> > 2009/12/19 Georg Gell  <mailto:geor...@have2.com> <mailto:geor...@have2.com
> <mailto:geor...@have2.com>>>
> >
> > Hello,
> >
> > I would like to change the target of the redirect in an auto
> generated
> > admin form, after the object is saved.
>     > This target is hard coded in processForm() in the base action.
> Is there
> > an easier way then copying the whole processForm() method into the
> > action, and then change only the target (40 lines DoRY).
> >
> > Thanks Georg
> 
> --
> 
> You received this 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.
> 
> 
> 
> 
> 
> -- 
> Alexandre Salomé
> http://alexandre-salome.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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.

--

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




Re: [symfony-users] Development infrastructure

2009-12-20 Thread Georg Gell
You might use a virtual server.
I have a virtual ubuntu server in a vbox with bridged network.
So it has it's own network address and can be reached from the whole
network, and the source code is on a shared windows directory mounted by
smbfs. I used vboxsf for mounting the share, but had some troubles with it.
This way you can perform symfony commands both on windows and on ubuntu,
doing exactely the same thing.
And you can edit the files locally from Netbeans, and even debug the
files step by step on the server from within Netbeans.
You have to patch two symfony files for this to work, i have attached
patches. The first removes a warning by php, that it cannot chmod on
remote filesystems. The other doesn't create symlinks, but copies the
directories, which is the normal behaviour for windows. Now symfony
tasks behave the same way in windows and ubuntu environment, afaik.

Georg

Am 20.12.2009 15:57, schrieb HiDDeN:
> Hey guys. How is your development infrastructure?
> 
> I like to develop against a Linux machine. I create my symfony project
> there and then with Eclipse PDT + Remote System Explorer I edit the
> files remotely.
> 
> Now I discovered Netbeans 6.8 with PHP + Symfony support natively,
> it's smaller and faster, but it hasn't support for remote editing. The
> only thing it has is downloading everything to local.
> 
> 
> Do you have any tips you would like to share?
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 
> 

--

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


Index: sfConfigCache.class.php
===
--- sfConfigCache.class.php (revision 25402)
+++ sfConfigCache.class.php (working copy)
@@ -362,7 +362,7 @@
   }
 }
 
-chmod($cache, 0666);
+@chmod($cache, 0666);
 umask($current_umask);
   }
 
Index: sfFilesystem.class.php
===
--- sfFilesystem.class.php  (revision 25402)
+++ sfFilesystem.class.php  (working copy)
@@ -198,12 +198,12 @@
*/
   public function symlink($originDir, $targetDir, $copyOnWindows = false)
   {
-if (!function_exists('symlink') && $copyOnWindows)
-{
+//if (!function_exists('symlink') && $copyOnWindows)
+//{
   $finder = sfFinder::type('any');
   $this->mirror($originDir, $targetDir, $finder);
   return;
-}
+//}
 
 $ok = false;
 if (is_link($targetDir))


Re: [symfony-users] admin generator, change redirect target after create/update

2009-12-20 Thread Georg Gell
Hi,

no, this will not work, because I want to change the redirect after the
form has been successfully processed, which means no exception to catch.

Georg

Am 19.12.2009 22:54, schrieb Alexandre Salomé:
> Hi,
> 
>   You can wrap the function in a try...catch block and do your stuff :
> 
> public function processForm()
> {
>   try
>   {
> parent::processForm();
>   }
>   catch (sfStopException $e)
>   {
> $this->redirect(...);
>   }
> }
> 
> 
> Not sure if this will work... Try and tell us.
> 
> Alexandre
> 
> 2009/12/19 Georg Gell mailto:geor...@have2.com>>
> 
> Hello,
> 
> I would like to change the target of the redirect in an auto generated
> admin form, after the object is saved.
> This target is hard coded in processForm() in the base action. Is there
> an easier way then copying the whole processForm() method into the
> action, and then change only the target (40 lines DoRY).
> 
> Thanks Georg

--

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] admin generator, change redirect target after create/update

2009-12-19 Thread Georg Gell
Hello,

I would like to change the target of the redirect in an auto generated
admin form, after the object is saved.
This target is hard coded in processForm() in the base action. Is there
an easier way then copying the whole processForm() method into the
action, and then change only the target (40 lines DoRY).

Thanks Georg

--

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




Re: [symfony-users] OT: Create PHPCod comments automatically

2009-12-17 Thread Georg Gell
Cool!

Thanks Georg

Am 17.12.2009 09:45, schrieb Christopher Schnell:
> NetBeans does that. all you have to do is to add /** above the method 
> and press enter. It can also handle type-hinting.
> 
> Regards,
> Christopher.
> 
> Georg Gell schrieb:
>> Hello list,
>>
>> just a quick OT post:
>>
>> I am looking for a way to auto add auto prefilled PHPDoc comments on my
>> PHP files.
>> For example if I have a method like this:
>>
>> public function doSomething($var){
>>
>> then it should add above (if no PHPDoc comment is already existing)
>>
>> /**
>> * doSomething
>> *
>> * @author Me
>> * @param $var
>> * @return
>> *
>> */
>>
>> Even better if the content of the created PHPDocs could be configured. I
>> was using PHPEdit once, and this IDE had that kind of functionality, but
>> I am missing it in Netbeans.
>>
>> How do you add those PHPDocs?
>>
>> Thanks
>> Georg
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "symfony users" group.
>> To post to this group, send email to symfony-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> symfony-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/symfony-users?hl=en.
>>
>>
>>
>>   
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 
> 

--

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] OT: Create PHPCod comments automatically

2009-12-17 Thread Georg Gell
Hello list,

just a quick OT post:

I am looking for a way to auto add auto prefilled PHPDoc comments on my
PHP files.
For example if I have a method like this:

public function doSomething($var){

then it should add above (if no PHPDoc comment is already existing)

/**
* doSomething
*
* @author Me
* @param $var
* @return
*
*/

Even better if the content of the created PHPDocs could be configured. I
was using PHPEdit once, and this IDE had that kind of functionality, but
I am missing it in Netbeans.

How do you add those PHPDocs?

Thanks
Georg

--

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




Re: [symfony-users] problem with functional test for upload

2009-12-11 Thread Georg Gell
Hi,

I don't really understand what you mean that I should so.
I understand that the 'file' parameter is not empty, because I am trying
to upload a file. But it shouldn't be a path either IMO, I just used
this test to show the value of the 'file' parameter, which is not a
file, but a path.
The real problem is the second test, where the sfFileValidator complains
about the missing file.

Georg

Am 11.12.2009 13:36, schrieb Alexandru-Emil Lupu:
> Check your
> IsParameter('file','')
> The test expects no file but you send one... so the file parameter is
> not empty.
> 
> sent via htc magic
> 
>> On Dec 11, 2009 2:01 PM, "Georg Gell" > <mailto:geor...@have2.com>> wrote:
>>
>> Hello,
>>
>> I have an action that accepts file uploads from a desktop program.
>> I use a form for validation (see below) and if the form is valid, I
>> process the uploaded files(see action below). This works as expected.
>>
>> But the functional tests (see below) do not upload any file (result see
>> below, result 37 shows, that no file is uploaded, but only the path, and
>> 39 shows that the sfFileValidator complains that the file is required).
>>
>> I checked the docs, but I only found this
>> (http://www.symfony-project.org/jobeet/1_4/Doctrine/en/11): "The browser
>> also simulates file uploads if you pass the absolute path to the file to
>> upload." which either I don't understand or doesn't work.
>>
>> Has anyone done file uploads in a functional test, and how?
>>
>> Thanks
>> Georg
>>
>> my functional test:
>> __
>> $in2 = array('path' => '/path',
>>  'md5' => 'e1aab77d216d8ad97ff143823a75038e',
>>  'ci' => '0123456789abcdef0123456789abcdef',
>>  'file' =>
>> '/var/www/shared/appxxx/test/fixtures/testdata/images/IMG_0283.JPG');
>>
>> $browser = new sfTestFunctional(new sfBrowser());
>> $browser->
>> //...
>> info('post remote/upload - returns OK')->
>>  post('http://client.virtual/remote/upload', $in2)->
>>  with('request')->begin()->
>>isParameter('module', 'remote')->
>>isParameter('action', 'upload')->
>>isParameter('ci', '0123456789abcdef0123456789abcdef')->
>>isParameter('md5', 'e1aab77d216d8ad97ff143823a75038e')->
>>isParameter('path', '/path')->
>>isParameter('file', '')->
>>  end()->
>>  with('response')->begin()->
>>isStatusCode(200)->
>>matches('#OK#')->
>>  end();
>> __
>>
>> the validation form:
>> __
>> class UploadForm extends BaseForm {
>>
>> public function configure() {
>>  $this->setValidators(array(
>>'ci' => new sfValidatorString(array('max_length' => 32, 'min_length'
>> => 32)),
>>'path' => new sfValidatorDoctrineChoice(array('model' => 'Path',
>> 'column' => 'path')),
>>'md5' => new sfValidatorString(array('max_length' => 32,
>> 'min_length' => 32)),
>>'file' => new sfValidatorFile(array('max_size' => 20,
>> 'mime_types' => 'web_images')),
>>  'module' => new sfValidatorPass(),
>>  'action' => new sfValidatorPass(),
>> ));
>>   $this->disableLocalCSRFProtection();
>>  }
>> }
>> __
>>  and the action looks like this:
>> __
>> public function executeUpload(sfWebRequest $request) {
>>  if ($request->isMethod('post')) {
>>  $this->form = new UploadForm();
>>  $this->form->bind($request->getParameterHolder()->getAll(),
>> $request->getFiles());
>>  if ($this->form->isValid()) {
>>// to something
>>return $this->renderText('OK');
>>  } else {
>>$result = 'ERROR: ';
>>foreach($this->form->getErrorSchema()->getErrors() as $k => $error) {
>>  $result .= "\n$k: " . $error->getMessage();
>>}
>>return $this->renderText($result);
>>  }
>> }
>> return $this->renderText('ERROR Invalid method');

[symfony-users] problem with functional test for upload

2009-12-11 Thread Georg Gell
Hello,

I have an action that accepts file uploads from a desktop program.
I use a form for validation (see below) and if the form is valid, I
process the uploaded files(see action below). This works as expected.

But the functional tests (see below) do not upload any file (result see
below, result 37 shows, that no file is uploaded, but only the path, and
39 shows that the sfFileValidator complains that the file is required).

I checked the docs, but I only found this
(http://www.symfony-project.org/jobeet/1_4/Doctrine/en/11): "The browser
also simulates file uploads if you pass the absolute path to the file to
upload." which either I don't understand or doesn't work.

Has anyone done file uploads in a functional test, and how?

Thanks
Georg

my functional test:
__
$in2 = array('path' => '/path',
  'md5' => 'e1aab77d216d8ad97ff143823a75038e',
  'ci' => '0123456789abcdef0123456789abcdef',
  'file' =>
'/var/www/shared/appxxx/test/fixtures/testdata/images/IMG_0283.JPG');

$browser = new sfTestFunctional(new sfBrowser());
$browser->
//...
info('post remote/upload - returns OK')->
  post('http://client.virtual/remote/upload', $in2)->
  with('request')->begin()->
isParameter('module', 'remote')->
isParameter('action', 'upload')->
isParameter('ci', '0123456789abcdef0123456789abcdef')->
isParameter('md5', 'e1aab77d216d8ad97ff143823a75038e')->
isParameter('path', '/path')->
isParameter('file', '')->
  end()->
  with('response')->begin()->
isStatusCode(200)->
matches('#OK#')->
  end();
__

the validation form:
__
class UploadForm extends BaseForm {

public function configure() {
  $this->setValidators(array(
'ci' => new sfValidatorString(array('max_length' => 32, 'min_length'
=> 32)),
'path' => new sfValidatorDoctrineChoice(array('model' => 'Path',
'column' => 'path')),
'md5' => new sfValidatorString(array('max_length' => 32,
'min_length' => 32)),
'file' => new sfValidatorFile(array('max_size' => 20,
'mime_types' => 'web_images')),
  'module' => new sfValidatorPass(),
  'action' => new sfValidatorPass(),
 ));
   $this->disableLocalCSRFProtection();
  }
}
__
 and the action looks like this:
__
public function executeUpload(sfWebRequest $request) {
  if ($request->isMethod('post')) {
  $this->form = new UploadForm();
  $this->form->bind($request->getParameterHolder()->getAll(),
$request->getFiles());
  if ($this->form->isValid()) {
// to something
return $this->renderText('OK');
  } else {
$result = 'ERROR: ';
foreach($this->form->getErrorSchema()->getErrors() as $k => $error) {
  $result .= "\n$k: " . $error->getMessage();
}
return $this->renderText($result);
  }
}
return $this->renderText('ERROR Invalid method');
}
__
and the test result:
__
not ok 37 - request parameter file is ""
# Failed test
(./lib/vendor/symfony/lib/test/sfTesterRequest.class.php at line 48)
#got:
'/var/www/shared/appxxx/test/fixtures/testdata/images/IMG_0283.JPG'
#   expected: ''
ok 38 - status code is 200
not ok 39 - response content matches regex #OK#
# Failed test
(./lib/vendor/symfony/lib/test/sfTesterResponse.class.php at line 383)
# 'ERROR:
file: Required.'
#   doesn't match '#OK#'

--

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




Re: [symfony-users] token ##PACKAGE## in sf1.4 base model classes should be replaced by?

2009-12-07 Thread Georg Gell
Oh, I thought that I could just edit properties.ini and append a line
with email:john@example.com, I didn't know that the possible
settings are predefined.

Thanks for the explanation

Georg

Jonathan Wage schrieb:
> I don't think properties.ini has an e-mail property? I am not sure. That
> would be a question for Kris, I am not sure.
> 
> - Jon
> 
> On Mon, Dec 7, 2009 at 2:56 PM, Georg Gell  <mailto:geor...@have2.com>> wrote:
> 
> Yes, svn update, symfony doctrine:build --all-classes and it is working
> out of the box. Thanks a lot for your work.
> Just out of curiosity, what is the reason why ##EMAIL## is not parsed
> out of properties.ini, or rather not at all ATM?
> 
> Georg
> 
> Jonathan Wage schrieb:
> > This is fixed now in SVN and the values come from the
> properties.ini file.
> >
> > - Jon
> >
> > On Thu, Dec 3, 2009 at 4:15 PM, Georg Gell  <mailto:geor...@have2.com>
> > <mailto:geor...@have2.com <mailto:geor...@have2.com>>> wrote:
> >
> > Hi,
> >
> > the following tokens can be found in the autogenerated base model
> > classes in sf 1.4.
> >  * @package##PACKAGE##
> >  * @subpackage ##SUBPACKAGE##
> >  * @author ##NAME## <##EMAIL##>
> > Is there a way to replace them by real values? Or are they
> placeholders
> > for future use?
> >
> > TIA Georg
> >
> > --
> >
> > You received this 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>
> > <mailto: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>
> > <mailto:symfony-users%2bunsubscr...@googlegroups.com
> <mailto:symfony-users%252bunsubscr...@googlegroups.com>>.
> > For more options, visit this group at
> > http://groups.google.com/group/symfony-users?hl=en.
> >
> >
> >
> >
> >
> > --
> > Jonathan H. Wage (+1 415 992 5468)
> > Open Source Software Developer & Evangelist
> > sensiolabs.com <http://sensiolabs.com> <http://sensiolabs.com> |
> jwage.com <http://jwage.com> <http://jwage.com> |
> > doctrine-project.org <http://doctrine-project.org>
> <http://doctrine-project.org> | symfony-project.org
> <http://symfony-project.org>
> > <http://symfony-project.org>
> >
> > You should follow me on Twitter: http://www.twitter.com/jwage
> >
> > You can contact Jonathan about Doctrine, Symfony and Open-Source
> or for
> > training, consulting, application development, or business related
> > questions at jonathan.w...@sensio.com
> <mailto:jonathan.w...@sensio.com> <mailto:jonathan.w...@sensio.com
> <mailto:jonathan.w...@sensio.com>>
> >
> > --
> >
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to
> symfony-users@googlegroups.com <mailto:symfony-users@googlegroups.com>.
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> <mailto:symfony-users%2bunsubscr...@googlegroups.com>.
> > For more options, visit this group at
> > http://groups.google.com/group/symfony-users?hl=en.
> 
> --
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> <mailto:symfony-users@googlegroups.com>.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> <mailto:symfony-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 
> 
> 
> 
> -- 
> Jonathan H. Wage (+1 415 992 5468)
> Open Source Software Developer & Evangelist
> sensiolabs.com <http://sensiolabs.com> 

Re: [symfony-users] token ##PACKAGE## in sf1.4 base model classes should be replaced by?

2009-12-07 Thread Georg Gell
Yes, svn update, symfony doctrine:build --all-classes and it is working
out of the box. Thanks a lot for your work.
Just out of curiosity, what is the reason why ##EMAIL## is not parsed
out of properties.ini, or rather not at all ATM?

Georg

Jonathan Wage schrieb:
> This is fixed now in SVN and the values come from the properties.ini file.
> 
> - Jon
> 
> On Thu, Dec 3, 2009 at 4:15 PM, Georg Gell  <mailto:geor...@have2.com>> wrote:
> 
> Hi,
> 
> the following tokens can be found in the autogenerated base model
> classes in sf 1.4.
>  * @package##PACKAGE##
>  * @subpackage ##SUBPACKAGE##
>  * @author ##NAME## <##EMAIL##>
> Is there a way to replace them by real values? Or are they placeholders
> for future use?
> 
> TIA Georg
> 
> --
> 
> You received this 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.
> 
> 
> 
> 
> 
> -- 
> Jonathan H. Wage (+1 415 992 5468)
> Open Source Software Developer & Evangelist
> sensiolabs.com <http://sensiolabs.com> | jwage.com <http://jwage.com> |
> doctrine-project.org <http://doctrine-project.org> | symfony-project.org
> <http://symfony-project.org>
> 
> You should follow me on Twitter: http://www.twitter.com/jwage
> 
> You can contact Jonathan about Doctrine, Symfony and Open-Source or for
> training, consulting, application development, or business related
> questions at jonathan.w...@sensio.com <mailto:jonathan.w...@sensio.com>
> 
> --
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.

--

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




Re: [symfony-users] check in model class if it is used from doctrine:data-load task

2009-12-07 Thread Georg Gell
Hi,

interesting approach, thanks, I would never have thought of this :-/
Is there a way to implement the creation of the fictive is_import column
automatically in the dump when doing the task doctrine:data-dump?

Georg

Alexandre Salomé schrieb:
> You shouldn't handle the question like this...
> 
> A proper way :
> 
> In your fixtures, add a fictive column : "is_import"
> 
> For example :
> 
> myModel:
>   mm_01:
> name: Bobby
> is_active: true
> is_import: true
> 
> 
> In your class, add :
> 
> protected $isImport = false;
> 
> public function setIsImport($value)
> {
>   $this->isImport = $value;
> }
> 
> 
> And in your postInsert, just test :
> 
> if ($this->isImport)
> {
>   // your stuff
> }
> 
> 
> Nicest way,
> 
> Alexandre
> 
> 2009/12/4 Georg Gell mailto:geor...@have2.com>>
> 
> Hello group,
> 
> how can I check in a model class if the class is used from the
> doctrine:data-load task instead from the normal application?
> 
> Example model "Model"
> 
> class Model extends BaseModel
> {
> public function postInsert($event)
> {
> if (not in "symfony doctrine:data-load"){
> //do some wild things that don't need to be done for each reload
> }
> }
> }
> 
> Thanks a lot
> Georg
> 
> --
> 
> You received this 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.
> 
> 
> 
> 
> 
> -- 
> Alexandre Salomé -- alexandre.sal...@gmail.com
> <mailto:alexandre.sal...@gmail.com>
> 
> --
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.

--

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




[symfony-users] check in model class if it is used from doctrine:data-load task

2009-12-04 Thread Georg Gell
Hello group,

how can I check in a model class if the class is used from the
doctrine:data-load task instead from the normal application?

Example model "Model"

class Model extends BaseModel
{
public function postInsert($event)
{
if (not in "symfony doctrine:data-load"){
//do some wild things that don't need to be done for each reload
}
}
}

Thanks a lot
Georg

--

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




Re: [symfony-users] Where to put the logic?

2009-12-04 Thread Georg Gell
Hi Stéphane,

I don't understand what you mean.

To clarify:
I would like to put the business logic in the model. The business logic
states in my case that no "Client" object can be without a "User" object.

Following this reasoning, I added a postInsert() method in the "Client"
object, that creates a "User" object. IMO the only way to make sure that
no "Client" objects without a defined state can exist (ie without a
"User" object).
This works like expected in my applications, the "Client" object and all
related objects (ie it's "User" object, ...) are always in a defined
state after creation, no matter where they are created.

The problem starts when I try to reset my database for unit tests. If I
use the task doctrine:data-load, an unwanted (at least by me ;-)) side
effect happens.
doctrine:data-load first inserts the "Client" object, and this triggers
the postInsert() logic, creating a new "User" object implicitly. And
then doctrine:data-load continues with inserting the "User" object that
the "Client" object already had a the time when I created the fixture.

The result is that the doctrine:data-load task changes the content of
the database in one doctrine:data-dump and doctrine:data-load cycle
(adding an additional "User" object).
This means I am not able to unit test my model or to test any
application logic, because I cannot load clean data in the database for
each test.
There is already a ticket for this:
http://trac.symfony-project.org/ticket/5799
but it was set to invalid.

I see the following solutions to get doctrine:data-load to work with my
business logic. I am rather not a symfony expert, I hope I am missing
something obvious, and I just didn't find it in the docs. This also
explains the email's subject "Where to put the logic":
* Move the business logic to the controllers: In this case
doctrine:data-load would not trigger the creation of a "User" object for
each new "Client" object that is saved, because it is not in the model.
But I would have to make sure that the controller logic is the same
everywhere a "Client" object is created.
* Find a way to check in the postInsert method if I am running from a
doctrine:data-load task, and in this case skip the business logic. IMO
this would add controller logic in the model, but if I could identify
the doctrine:data-load task, this would be my preferred approach.
* To have an argument for the doctrine:data-load task, not to trigger
the doctrine events.
* Did I miss something obvious?

Thanks for reading up to here (in case anyone sees this :-D)

Georg




Stéphane schrieb:
> First, Hello (sorry) :-)
> 
> I was assuming this was happening to one of your class; is this
> happening to all/other classes ?
> 
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> 
> 
> On Thu, Dec 3, 2009 at 10:53 PM, Georg Gell  <mailto:geor...@have2.com>> wrote:
> 
> Where would you register the listener?
> 
> If it is registered in the form action, this would only be an elaborate
> extension of the controller logic: instead of creating the ""Client"" 
> object
> and afterwards the "User" object directly in the controller, I would
> register a listener in the controller that gets called if a ""Client"" is
> created just in this controller action, which is the same.
> 
> If I register it in an application config class, this would lead to
> inconsistent behaviour, because if I create a ""Client"" object in app1, a
> "User" object would be created, and in app2 not.
> 
> This would mean it would have to be registered in the project config.
> And there it would be triggered by the doctrine:data-load task again
> (resulting in double "User"s, see my other post)
> 
> Georg
> 
> Stéphane schrieb:
> > The controller isn't responsible for application logic.
> > It must be in your model (if you can...).
> >
> > For this kind of case, I would prefer playing with events.
> > For example, when "User" is created just dispatch an event like
> > ""User"s."User".new" or whatever sounds like.
> > Then "connect" the app-logic method that add admin-role to "User" using
> > eventdispather.connect( '"User"s."User".new', your class method);
> > This way the method of creating the "User" is strictly "limited" to its
> > area : creating a "User";
>

Re: [symfony-users] Where to put the logic?

2009-12-03 Thread Georg Gell
Where would you register the listener?

If it is registered in the form action, this would only be an elaborate
extension of the controller logic: instead of creating the Client object
and afterwards the User object directly in the controller, I would
register a listener in the controller that gets called if a Client is
created just in this controller action, which is the same.

If I register it in an application config class, this would lead to
inconsistent behaviour, because if I create a Client object in app1, a
User object would be created, and in app2 not.

This would mean it would have to be registered in the project config.
And there it would be triggered by the doctrine:data-load task again
(resulting in double users, see my other post)

Georg

Stéphane schrieb:
> The controller isn't responsible for application logic.
> It must be in your model (if you can...).
> 
> For this kind of case, I would prefer playing with events.
> For example, when user is created just dispatch an event like
> "users.user.new" or whatever sounds like.
> Then "connect" the app-logic method that add admin-role to user using
> eventdispather.connect( 'users.user.new', your class method);
> This way the method of creating the user is strictly "limited" to its
> area : creating a user;
> Then somewhere else (in a dedicated class), write the method which will
> add admin-role to the newly created user (which will be the subject of
> the event).
> Check the doc for more info (event system).
> 
> Before Printing, Think about Your Environmental Responsibility!
> Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!
> 
> 
> On Mon, Nov 30, 2009 at 9:37 PM, Bernhard Schussek  <mailto:bschus...@gmail.com>> wrote:
> 
> Hi Georg,
> 
> Why don't you just override the save() method of the Client class? You
> could, for example, check whether any user is associated with the
> client and, if not, do it manually before calling parent::save().
> 
> I personally would prefer to put this logic into the form for creating
> the Client though, because "magic" save-methods can lead to tricky
> problems. Is this an option for you?
> 
> Bernhard
> 
> --
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> <mailto:symfony-users@googlegroups.com>.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> <mailto:symfony-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 
> 
> --
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.

--

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




Re: [symfony-users] Where to put the logic?

2009-12-03 Thread Georg Gell
Hi Bernhard,

actually I had the logic in a postInsert method of the Client class,
which IMO made the most sense. But this lead to the following surprise:
When I used

$ symfony doctrine:data-load

from a fixture with one client and one user I suddenly ended with two
users instead of one. First data-load inserted the client and triggered
the postInsert event, which created a user. Then data-load continued
with adding a user, and hey presto, suddenly there were two :-(
And I was forced to use mysqldump. I have always wondered why
doctrine:data-load doesn't behave the same way like mysqldump, just dump
and load sql data, which I expected by the name (data-dump and data-load)?

I am forced to go along the controller/form solution, because for the
test cases I need fresh data in the db, and mysqldump is not an option
is this case. But this feels wrong.

Georg

Bernhard Schussek schrieb:
> Hi Georg,
> 
> Why don't you just override the save() method of the Client class? You
> could, for example, check whether any user is associated with the
> client and, if not, do it manually before calling parent::save().
> 
> I personally would prefer to put this logic into the form for creating
> the Client though, because "magic" save-methods can lead to tricky
> problems. Is this an option for you?
> 
> Bernhard
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> symfony-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/symfony-users?hl=en.
> 
> 
> 

--

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




[symfony-users] token ##PACKAGE## in sf1.4 base model classes should be replaced by?

2009-12-03 Thread Georg Gell
Hi,

the following tokens can be found in the autogenerated base model
classes in sf 1.4.
 * @package##PACKAGE##
 * @subpackage ##SUBPACKAGE##
 * @author ##NAME## <##EMAIL##>
Is there a way to replace them by real values? Or are they placeholders
for future use?

TIA Georg

--

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] Where to put the logic?

2009-11-30 Thread Georg Gell
Hello,

in my application, I would like to have this logic:

When I add a client, I would like to autmatically add an admin user for
the client. For me this belongs to the client object logic, and I have
put it in postInsert.

But if I use doctrine:data-dump and afterwards doctrine:data-load, I
receive double users (or unique constraint violations), because first a
user is inserted by the client object, and then by doctrine:data-load.

One could argue that the addition of the admin user is not part of the
model logic, but the controller should take care of it.

What is the best way to do this? Is there a way in doctrine to switch of
all pre/post save code for data-load?

Georg

--

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] difficulties with doctrine:data-dump in sf1.4

2009-11-23 Thread Georg Gell
Hello,

I have suddenly problems when I try to dump my data.
My model has a listener attached, that changes some queries.
Until now this didn't matter when using doctrine:data-dump. I updated
yesterday to sf 1.4, and now I can't dump the data anymore, because the
listener is executed.
This does not make sense when dumping the data, because the listener is
used for the application to keep certain restraints (which obviously do
not need to be checked when dumping data, because dumping does not
change the data).
How can I get rid of this?

Is there a way to know if the listener is run in a task? Then it could
deactivate itself?

Thanks
Georg

--

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




[symfony-users] Doctrine behaviour adds field, how to get rid of it's validator in auto generated forms in sf 1.3?

2009-11-11 Thread Georg Gell

Dear list,

I have a Doctrine behaviour that sets the correct client id on some
tables on each save, update and select.
The idea is that I put

ActAs: ClientAware

in the schema.yml file for each table that should have a connection to
the client table, and the result would be:

* create a field client_id in the table -> works
* create a relation to the client table with a foreign alias -> works
* always set the right client id -> works
* prevent auto generated forms to display this field -> no idea how
* prevent auto generated forms to validate this not existing field -> no
idea how

What is the best approach for this in Symfony 1.3 aka Doctrine 1.2?

TIA Georg

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



[symfony-users] Doctrine nestedSet delete with application level cascade

2009-11-09 Thread Georg Gell

Is there a way to have a table with the nestedSet behaviour cascade it's
delete on the application level (like cascade: [delete]? I have a file
for each record in the file system that I would like to delete also.

Georg

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



[symfony-users] Re: non ascii chars in Fixtures files

2009-11-06 Thread Georg Gell

Did you save the fixtures file in UTF8?

cosmy schrieb:
> Hi all,
>  do you know a method to load fixtures data without losing chars like
> àèìòù and others?
> It exchanges them with a question mark during the data-load.
> 
> thank you in advance
> > 
> 

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



[symfony-users] Re: Doctrine:data-load error: which table, which field, which value???

2009-11-02 Thread Georg Gell

Sorry, forgot to mention that I am using Doctrine. I am going to upgrade
to symfony 1.3 today, if you can send me your patch I would be grateful.

Thanks Georg

David Ashwood schrieb:
> Assuming you're using Doctrine - which version of symfony are you using?
> I have a small patch for 1.3 that gives more detail for errors that I
> can easily convert to sf 1.2.
> 
> I mentioned the issues with non-verbose error messages in a Doctrine
> ticket recently with data imports and I think it's something in the
> pipeline.
> 
> On Mon, 2009-11-02 at 11:20 +0100, Georg Gell wrote: 
>> Hi,
>>
>> I changed parts of my table definitions to a behaviour, and now
>> doctrine_data-load does not work any more with data, that were
>> previously working.
>> No big problem so far, probably made an error.
>> BUT:
>> The only message I have is this:
>>
>> "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
>> '1' for key 1"
>>
>> This does not help me, because I have no idea what the problem could be.
>> I tried to run symfony with -t option, but this does not help.
>>
>> How can I find out in which table, in which field and which value should
>> be inserted, when the error occured?
>>
>> Thanks in advance
>> Georg
>>
> 
> 
> 
> > 
> 

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



[symfony-users] Doctrine:data-load error: which table, which field, which value???

2009-11-02 Thread Georg Gell

Hi,

I changed parts of my table definitions to a behaviour, and now
doctrine_data-load does not work any more with data, that were
previously working.
No big problem so far, probably made an error.
BUT:
The only message I have is this:

"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'1' for key 1"

This does not help me, because I have no idea what the problem could be.
I tried to run symfony with -t option, but this does not help.

How can I find out in which table, in which field and which value should
be inserted, when the error occured?

Thanks in advance
Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] use renderPartial in a filer

2009-10-23 Thread Georg Gell

Hi,

afaik renderPartial is a method of the action. How can I call it in a
filter? Probably through the action stack, but I am too tired to search
through the docs again. Is it it fifo or filo?

TIA
Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] culture aware sfValidatorNumber, what are you using?

2009-10-07 Thread Georg Gell

In german, a decimal number looks like this: 5,2, not 5.2 like PHP is
expecting.
If a user enters a decimal number in a form, sfValidatorNumber rejects it.
I was expecting sfValidatorNumber to use the user culture to resolve
this, but it does not.
I found an old ticket on trac
(http://trac.symfony-project.org/ticket/4071), but obviously nothing
happened.

What are you doing in this case? Has anybody a culture aware
sfValidatorNumber class?

Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: if (condition): endif: not working

2009-10-06 Thread Georg Gell

Guessing: you have short_open_tag=1 in php.ini on your pc, but
short_open_tag=0 on your laptop.

Avani schrieb:
> Below is my code
> 
> 
> 
> 345:   
> 346:347:  
> if($show_left_sliding_menu == 'yes' || $module ==
> 'photolibrary' || $module == 'videolibrary'){ ?>
> 348:
> 349: ($tab=="photolibrary"): ?> class="current"  href=" echo url_for('photolibrary/index'.$multimedia_param); ?>">> 
> 351:
> 352: ($tab=="videolibrary"): ?> class="current"  href=" echo url_for('videolibrary/index'.$multimedia_param); ?>"> 353:src="/images/video-app.png" title="Video Library" alt="Video
> Library" />
> 354:
> 355:
> 356:
> 357: 358:  
> if($show_left_sliding_menu == 'yes') { ?>
> 359:
> 360:
> 361:
> 362:
> 363:
> 364:   
> 
> Here, if I delete line 349  to 353, then it is working correctly.
> 
> Dont know why is the problem??
> 
> 
> 
> 
> 
> On Oct 7, 10:05 am, Jeremy Thomerson 
> wrote:
>> Please provide lines 345 - 365 of
>> C:\xampp\htdocs\td\apps\core\templates\layout.php would be helpful.
>>
>> Jeremy
>>
>> On Tue, Oct 6, 2009 at 9:03 PM, Avani  wrote:
>>
>>> Oh sorry, it was typing mistake.
>>> whole project is working in my 1 pc. When I copy the same into my
>>> other pc, it is giving errors
>>> "Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\td\apps
>>> \core\templates\layout.php on line 354"  everywhere where I have
>>> used
>>> 
>>> something
>>> 
>>> On Oct 7, 9:59 am, Sid Bachtiar  wrote:
 It should be:
 
   Hola hola hola
 
 On Wed, Oct 7, 2009 at 2:58 PM, Avani  wrote:
> Hi all,
> I am working on symfony since last 1 month. Yday I just installed
> symfony to my other laptop. I dont know why I am getting errors in my
> templates which works for my pc.
> I am gettting errors everywhere when I used
>  endif: ?>
> if I have used(traditional php syntax)  then it is
> working.
> Can anybody help me?
> Thanks in advance.
 --
 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-users@googlegroups.com
To unsubscribe from this group, 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: Call For Information Re-organization [opinions needed]

2009-09-25 Thread Georg Gell

Hi,

as I am just now developing a symfony application, I will watch myself
how I try to get the information I need and maybe add some suggestions.

In general I would like to say that the symfony documentation is very
comprehensive and well done. Thanks to the symfony team for it. On some
parts the navigation could be improved, because I find myself very often
using google to find the information that is already provided on the site.

Maybe some suggestions that come to my mind right now:
(ref link for all examples:
http://www.symfony-project.org/book/1_2/14-Generators)

There is a search field on the right side of all documentation. AFAIK
this should search in the actual document I am reading.

For me an improvement would be to have the search field on top in the
right column, so I wouldn't have to search for it (see ref link and try
to find the search field).

And IMO the search should not be on the document I am reading only, but
on the whole documentation. The reason for this is, that some infos
probably are not in the document I am reading. For example in the
generator docs (ref link), I read something, and need some info about
the forms used (but they are not in the book, so they will not be
found). And even worse, when I use the navigation links on the right
side, I come to information about form helpers, and how to process a
form, but this is not the way the admin generator works, and now I am
even more confused. But if the search had provided a link to the new
form framework, I would have to read for a day again ;-)

BTW it seems that the search is not working as intended ATM. Go to the
ref link above and enter any term in the search, nothing is found.

I think that the search is well structured on php.net
(http://de.php.net/manual/en/). Here you find the search on top always
in the same place, and you can choose the scope of your search. On
symfony docs, options could be [this document, all documentation, API
documentation, all site, ...]

If I use google to find something in the docs, I am stuck in the chapter
then. Use my ref link again. Somewhere down the page you find "Chapter
18 explains the concept of Join more extensively." Good information. But
how the get there?
I can scroll down to the bottom, click on next chapter, wait for it to
load, scroll down again, and this four times.
Here my suggestions would be to add a link to the index in the middle,
and add the whole navigation on top also (last chapter, index, next
chapter).
Also maybe there would be an option to automatically create a link for
chapter ## in the docs?

I think most of the suggestions are implemented quite quickly and would
help me a lot. Anyone else also?

Georg

fakingfantastic schrieb:
> I recently had a discussion with Fabien about this topic, and he
> suggested it would be best if I stage the debate here.
> 
> Has anyone ever felt like the information they needed to get on
> Symfony was hard to find? Do you find that the information you need is
> very-well documented on the site, but it takes a while to search for?
> These are very big issues for me that over the last 6 months of me
> learning the framework, have made it quite difficult.
> 
> Do not get me wrong: I am not say "Symfony isn't well documented" (I
> made that mistake when talking with Fabien). What I am saying is
> Symfony-Project.org, for whatever reason, is always very difficult for
> me to search through to find what I am looking for. I feel that it has
> to do with the way the content is organized on the site. It doesn't
> feel very compartmentalized to me. When I need to find out some
> information on the framework, I seem to always have the same 3 issues:
> "What am I trying to find out", "Where do I search to find the
> information", and "Is this information outdated"?
> 
> For now, I was to leave what I am asking a little vague, in hopes to
> see what that naturally brings out in people about this. My ultimate
> goal would be trying to put together an initiative to re-organize and
> enhance the site to make it more "intuative" (if that's the right
> word) for new-comers and seasoned users alike.
> 
> Feel free to irc me at fakingfantastic aswell, i'm usually 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: Insert custom styles in template

2009-09-21 Thread Georg Gell

Right, thank you

Davide Borsatto schrieb:
> Slots are the solution to your problem, read about them in the docs
> 
> > 
> 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: Insert custom styles in template

2009-09-18 Thread Georg Gell

Again thanks for the answer.
It seems to me that I have three possibilities:

1.) I can use

$this->getContext()->getRequest()->setAttribute('style', 
'.item{width='.$width.'px;}</style');
and use

<?php echo $sf_request->getAttribute('style') ?>
in layout.php

2.) I can use a slot

3.) I can define another layout file in view.yml for the module (at least I 
think).

Which of these options is best performance wise, how do they affect caching?

Georg



Casey schrieb:
> Maybe you could use a filter or the preExecute method of the actions
> class?  Without knowing at which point the data becomes available
> thats the best that I can suggest.  Perhaps you could create a slot in
> the layout within the head portion of the template.  If it really
> truly is only that one value, you could set a slot to be just the
> width integer in the style definition.  Then, use the has_slot method
> to implement a default value.  Once you do that you can call the
> setSlot method in your action to populate the width value.  Its
> probably not the most maintainable solution either, but I don't know
> that there is one.  The only other thing I can think of is to use ajax
> calls to update the object's contents and size.
>
> HTH,
> Casey
> On Sep 18, 2:27 pm, Georg Gell <geor...@have2.com> wrote:
>   
>> Hi,
>>
>> thanks for the answer.
>> at 1) AFAIK <style> should ony be in <head>,  and I cannot put anything
>> in <head> in my template, this would have to be in layout.php, and there
>> I think I cannot access $this->style from the action, or can I?
>> at 2 a) b) I only want to change one value dynamically for each request,
>> so this css would have to be it's own action. I would like to avoid the
>> overhead to create the action and add another request from the browser
>> that slows down the page load.
>> at 2 c) same reason like 1, I can't put anything in <head> from the
>> template.
>>
>> Georg
>>
>> Alexandru-Emil Lupu schrieb:
>>
>>
>>
>> 
>>> 1)  in your action $this->style = '<style>'; and then in your
>>> templates echo $foo;
>>> 2) alternative css for the pages you want modified.
>>> a)  from module/config/view.yml add
>>>   
>>> action:
>>>   stylesheets: ["/alternate_index"] # check the doc
>>> b) in your template add
>>> 
>>> c) add it by hand in your template
>>>   
>>> I would recomend just 2a or 2b, as being most appropriate for a long
>>> term maintainability.
>>>   
>>> Alecs
>>>   
>>> On Fri, Sep 18, 2009 at 11:16 PM, Georg Gell >> <mailto:geor...@have2.com>> wrote:
>>>   
>>> Hi,
>>>   
>>> how can I include some custom style information in a specific
>>> template?
>>> I would like to change the size of some divs fitting to the items
>>> in them.
>>> So i think i am looking for a way to insert something like
>>> .item{width:17px} into the template, where the 17px
>>> will
>>> be different for each request.
>>> I could create a helper for that, and use it in layout.php, but what
>>> information is available to this helper during the time it is used?
>>> Probably nothing from the action?
>>>   
>>> Any ideas?
>>>   
>>> Georg
>>>   
>>> --
>>> As programmers create bigger & better idiot proof programs, so the
>>> universe creates bigger & better idiots!
>>> I am on web:  http://www.alecslupu.ro/
>>> I am on twitter:http://twitter.com/alecslupu
>>> I am on linkedIn:http://www.linkedin.com/in/alecslupu
>>> Tel: (+4)0748.543.798
>>>   
> >
>   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: Insert custom styles in template

2009-09-18 Thread Georg Gell

Hi,

thanks for the answer.
at 1) AFAIK  should ony be in <head>,  and I cannot put anything 
in <head> in my template, this would have to be in layout.php, and there 
I think I cannot access $this->style from the action, or can I?
at 2 a) b) I only want to change one value dynamically for each request, 
so this css would have to be it's own action. I would like to avoid the 
overhead to create the action and add another request from the browser 
that slows down the page load.
at 2 c) same reason like 1, I can't put anything in <head> from the 
template.

Georg

Alexandru-Emil Lupu schrieb:
> 1)  in your action $this->style = '<style>'; and then in your 
> templates echo $foo;
> 2) alternative css for the pages you want modified.
> a)  from module/config/view.yml add
>
> action:
>   stylesheets: ["/alternate_index"] # check the doc
> b) in your template add
> 
> c) add it by hand in your template
>
>
> I would recomend just 2a or 2b, as being most appropriate for a long 
> term maintainability.
>
> Alecs
>
> On Fri, Sep 18, 2009 at 11:16 PM, Georg Gell  <mailto:geor...@have2.com>> wrote:
>
>
> Hi,
>
> how can I include some custom style information in a specific
> template?
> I would like to change the size of some divs fitting to the items
> in them.
> So i think i am looking for a way to insert something like
> .item{width:17px} into the template, where the 17px
> will
> be different for each request.
> I could create a helper for that, and use it in layout.php, but what
> information is available to this helper during the time it is used?
> Probably nothing from the action?
>
> Any ideas?
>
> Georg
>
>
>
>
>
> -- 
> As programmers create bigger & better idiot proof programs, so the 
> universe creates bigger & better idiots!
> I am on web:  http://www.alecslupu.ro/
> I am on twitter: http://twitter.com/alecslupu
> I am on linkedIn: http://www.linkedin.com/in/alecslupu
> Tel: (+4)0748.543.798
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] Insert custom styles in template

2009-09-18 Thread Georg Gell

Hi,

how can I include some custom style information in a specific template?
I would like to change the size of some divs fitting to the items in them.
So i think i am looking for a way to insert something like
.item{width:17px} into the template, where the 17px will
be different for each request.
I could create a helper for that, and use it in layout.php, but what
information is available to this helper during the time it is used?
Probably nothing from the action?

Any ideas?

Georg

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



[symfony-users] How can I set a different base class for each Doctrine record?

2009-09-04 Thread Georg Gell

Dear list,

is it possible to set a certain base class for each doctrine record?
I tried baseClassName, but this was not working like expected.

I would like to have

Adress extends BaseAdress extends ClientAwareDoctrineRecord extends
Doctrine_Record

for all tables, that have a reference to the client in a multi client
system. Is there a way to define a different base class for the base
table class for each table?

Thanks in advance for your help

Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] Can't get Doctrine Nested Set on an aliased multi root column to work

2009-08-31 Thread Georg Gell

Hello,

I am trying Doctrine for a new project, so my Doctrine level is newbie.

I would like to have nested albums with one root album per client, so I
set up the table like this:

Album:
  actAs:
NestedSet: {hasManyRoots: true, rootColumnName: client_id }
  columns:
path: { type: string, length: 255, notnull: true}
client_id: { type: integer, notnull: true, name: "client_id as
clientID" }
  relations:
Client: { local: client_id, foreign: id, foreignAlias: Albums,
onDelete: CASCADE }
  indexes:
pathAndClientAreUnique:
  fields: [path, client_id]
  type: unique

And then I try to set the root node like this:

$root = new Album();
$root->path = "/";
$root->clientID = sfConfig::get('app_clientid');
$tree = Doctrine::getTable('Album')->getTree();
$tree->createRoot($root);

And this does not work. It seems that there is a problem with the alias
for client_id. If I run it with yaml table file like above, I get an
exception:

Doctrine_Record_UnknownPropertyException
Unknown record property / related component "client_id" on "Album"

But if I change the yaml file to

NestedSet: {hasManyRoots: true, rootColumnName: clientID }

it finds the right column, but then the mysql query is wrong:

Doctrine_Connection_Mysql_Exception
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'clientid' in
'field list'
Doctrine_Connection->exec('INSERT INTO album (path, clientid,
image_size, thumbnail_size, priceset_id, lft, rgt, level) VALUES (?, ?,
?, ?, ?, ?, ?, ?)', array('/', 1, 600, 150, 1, '1', '2', 0))

Here Doctrine uses the alias name instead of the mysql column name.

What can I do (unless removing my alias is the only solution)?

Georg

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: wrong-generated sql-query (symfony propel-generate-crud)

2008-04-16 Thread Georg Sorst

Hi Dan,

looks very much like you are passing the wrong value (ie. NULL) to the
RetrieveByPK() method. Can you check if this might be the case?

Cheers,
Georg

Dan Jipa schrieb:
> 
> One of my actions in a module calls the *RetrievebyPK method* and
> generated 0 results.
> I've used the debug mode and I discovered a *wrong generated sql-query*.
> 
> SELECT menu_items.ID, menu_items.CATEGORY_ID, menu_items.PRODUCT_NAME, 
> menu_items.OWNER_ID, ... WHERE menu_items.ID IS NULL
> 
> 
> I can't understand the where-clause (where menu_items.ID is null)
> because menu_items.ID is the primary key with auto-increment option.
> I double check the schema.xml file, I regenerated the model, reinsert
> sql-query.
> 
> Everything seems to be alright. Where is the problem with my (crud)
> generated query?
> I appreciate your help! Cool
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Accesing config values

2008-04-08 Thread Georg Sorst

Hey Reynier,

the second line in your app.yml should be indented because it is a
subkey of dev, so to say. So it should look like this:

dev:
  CantidadCategorias: 2

If this doesn't help, have a look at the cached output of app.yml which
should be at cache/myapps/dev/config/config_app.yml.php to see how the
key is transformed to PHP.

Cheers,
Georg

Reynier Perez Mira schrieb:
> Hi every:
> I need to paginate some values from a query. This is not a problem because I 
> can use sfPropelPager class. For that I do this at first:
> 
> public function executeListar()
> {
>   $this->pag = new sfPropelPager('Nombre_Clase', cantidad_por_pagina);
> }
> 
> Now I want to create some global var and access to they using sfConfig class. 
> I've been reading the Definitive Guide to Symfony specifically the epigraph 
> "Accessing the Configuration from Code"
> and there the authors said that I can use the file app.yml. They explain also 
> that this file is inside myproject/apps/myapps/config/app.yml[1] but I think 
> that I can copy that file to /mymodule/config and use this also. Well before 
> trying with "mymodules" folder I work with the default file [1]. Then I do 
> this:
> 
> dev:
> CantidadCategorias: 2
> 
> In my actions.class.php I wrote this:
> 
> public function executeListar()
> {
>   $this->pag = new sfPropelPager('Nombre_Clase', 
> sfConfig::get('app_CantidadCategorias', 5));
> }
> 
> When I call the URL: http://localhost/backend_dev.php/geslicsoft/Listar this 
> should list the result two by two but it doesn't list as I expect. The table 
> inside the DB has 5 or more records.
> 
> ¿What I'm doing wrong?
> Cheers and thanks in advance
> Ing. Reynier Pérez Mira
> Grupo Soporte al Desarrollo - Dirección Técnica IP 
> 
>  
> 
> __ Information from ESET NOD32 Antivirus, version of virus signature 
> database 3008 (20080408) __
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
>  
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: sfGuardPlugin installation nightmare! :-(

2008-04-08 Thread Georg Sorst

Hey Sid,

just to get an idea, what's being displayed instead of the login page?
What happens if you directly access the login page (there should be a
special route /login or just use /sfGuardAuth/signin )?

Could you probably upload the symfony log somewhere?

Cheers,
Georg

Sid Bachtiar schrieb:
> Hi all,
> 
> I spent all afternoon without luck trying to install sfGuardPlugin.
> I'm up to this part:
> 
> You're done. Now, if you try to access a secure page, you will be
> redirected to the login page. If you have loaded the default fixture
> file, try to login with admin as username and admin as password.
> 
> But whatever I did, I couldn't make it display the login page! I did
> exactly as instructed on the wiki page.
> 
> http://trac.symfony-project.com/wiki/sfGuardPluginFor10
> 
> My symfony version:
> 
> Installed packages, channel pear.symfony-project.com:
> =
> Package Version State
> symfony 1.0.11  stable
> 
> My app settings.yml
> 
> all:
>   .settings:
> enabled_modules:  [sfGuardAuth]
>   .actions
> login_module: sfGuardAuth
> login_action: signin
> secure_module:sfGuardAuth
> secure_action:secure
> error_404_module: default   # To be called when a 404 error is raised
> error_404_action: error404  # Or when the requested URL doesn't
> match any route
> prod:
>   .settings:
> no_script_name:   on
> dev:
>   .settings:
> # E_ALL | E_STRICT = 4095
> error_reporting:4095
> web_debug:  on
> cache:  off
> no_script_name: off
> etag:   off
> 
> test:
>   .settings:
> # E_ALL | E_STRICT & ~E_NOTICE = 2047
> error_reporting:2047
> cache:  off
> web_debug:  off
> no_script_name: off
> etag:   off
> 
> Any idea what I might have missed?
> 
> Sid
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Problems to get Oracle working - databases.yml

2008-04-04 Thread Georg Sorst

Hey Pedro,

I can't really help you with the issue itself, but can you check if a
connection to the Oracle DB is actually made when you request your page
by looking at the Oracle logs or something similar? Too bad the error
message isn't printed out correctly by Symfony.

Cheers,
Georg

Pedro Casado schrieb:
> Im running symfony 1.0.13
> Ive just installed Oracle from a rpm on a Fedora 7.
> Everything is ok. Ive created an user and its logging in on the schema
> throught console without problems.
> 
> Im now testing..
> My schema.yml:
> 
> propel:
>   cliente:
> id:
> nome:  varchar(200)
> 
> 
> propel.ini
> 
> propel.database= oracle
> propel.database.createUrl  = oracle://user:passlocalhost/
> propel.database.url= oracle://user:[EMAIL PROTECTED]/xe
> propel.disableIdentifierQuoting = true
> 
> databases.yml (without tabs)
> 
> all:
>   propel:
> class:  sfPropelDatabase
> param:
>   dsn:  oracle://user:[EMAIL PROTECTED]/xe
> 
> 
> symfony propel-build-sql -> OK
> symfony-propel-build-model -> OK
> symfony-propel-insert-sql -> OK
> symfony propel-generate-crud frontend cliente Cliente -> OK
> symfony cc
> 
> When i access domain/frontend_dev.php/cliente im having:
> 
> [PropelException]
> [wrapped: connect failed [User Info: Array]]
> 
> Why propel-insert-sql works and this doesnt? The connection string are
> the same, isnt it ? Ive also tried others syntaxs for databases.yml but
> no success.
> 
> -- 
> Pedro Casado
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Modules organisation

2008-04-03 Thread Georg Sorst

Hi Nicolas,

what's your motivation behind this separation you are trying to achieve?

Anyway, this separation is already built into Symfony, just not across
different files and directories depending on the layer.  The URL
myproject/product/listproduct/ for example will actually call the
executeListproduct() action in the product module's actions. This action
will then use the listproductSuccess.php template for its output. So
there's your separation :) Hopefully that may help you.

If you need more info on this, have a look at the Symfony book and the
tutorials.

Cheers,
Georg

Nicolas Tavantzis schrieb:
> Hello everybody,
> 
> I'm just a beginner in using symfony and I want to know if it's
> possible to separate the organisation of my modules.
> 
> I give you an exemple :
> 
> this is my path :
> 
> /trunk/apps/frontend/modules/
> 
> I want to separate my modules header, footer and leftnav of the rest
> of my modules like this :
> 
> /trunks/apps/frontend/modules/commun/header/
> /trunks/apps/frontend/modules/commun/footer/
> /trunks/apps/frontend/modules/commun/leftnav/
> 
> and
> 
> /trunks/apps/frontend/modules/product/search/
> /trunks/apps/frontend/modules/product/listproduct/
> ...
> 
> I know I can do a rewriting of my url but that's not that I want to
> do, I want to seperate my modules in my structure.
> 
> Do you think it's possible ? Because when I call one of my module
> like : myproject/product/listproduct/ or myproject/listproduct/ it
> don't work.
> 
> 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-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] sfPropelVersionableBehaviorPlugin: creating a new resource version without modifying the resource

2008-03-28 Thread Georg Sorst

Hey list,

I am currently looking for a way to create a new resource version
without modifying the resource itself. The problem is that in order to
create a new resource version the behavior's preSave() and postSave()
hooks have to be called which is done implicitly by calling the
resource's save() method. If I do this the resource will be modified
obviously. The conditional versioning doesn't help either as this does
the opposite of what I want (modifying the resource without creating a
new resource version).

What I'm currently doing is manually calling preSave(), addVersion() and
postSave() along with some other minor tweaks. This works but requires
quite some redundant code. So, am I missing something or is such a
functionality not included yet?

The background is that I want to (ab)use
sfPropelVersionableBehaviorPlugin for some sort of approvable- changes-
system. This means for example when a non-admin user edits an object the
 object itself is not modified but a new version is created
nevertheless. The admin can then review this change and either approve
and merge it with the object or reject it and just discard the resource
version.

Thanks and cheers,
Georg


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Nested Set without single root?

2008-03-28 Thread Georg Sorst

Hi Daniel,

Richtermeister schrieb:
> Hey guys,
> 
> thanks for the responses, but now I'm confused..
> If I call make-root on a new node, and do that with many nodes
> (supposedly my root layer) they all have 1 as left, and thus this
> can't be right. Having a common root works, but semantically it
> doesn't sit well with me.
> 
> Somehow I never get an answer to the "rebuild right and left"
> question. Does everybody build their trees from scratch?

I'm certain I have seen a code snippet on this (probably on the symfony
snippet page) but for the life of me I can't find it anymore. But it
should give you a good starting point if you can find it :)

Cheers,
Georg

> 
> Thanks though, I keep digging.
> Daniel
> 
> 
> On Mar 26, 6:36 am, gestadieu <[EMAIL PROTECTED]> wrote:
>> I am not sure you can simply modify your node (or do it manually in
>> the db!) but for sure the plugin allows you to have several root like
>> you want to do.
>>
>> On Mar 26, 12:49 pm, Richtermeister <[EMAIL PROTECTED]> wrote:
>>
>>> Hi all,
>>> I'm trying the propel nested set behavior for the first time, and I
>>> was wondering if there always has to be one single root node, or if
>>> multiple nodes (in the same scope) can be at the root.
>>> For example, I'm trying to use a category table such as this:
>>> -> makeup
>>> --> --> anti-aging
>>> --> --> mascara
>>> -> lotions
>>> --> --> moisturizing
>>> --> --> sunscreen
>>> -> nail-polish
>>> where makeup, lotions, and nailpolish are the root categories.. while
>>> I was just using the adjacent list method, that was no problem, but
>>> now I have a hard time putting nodes at the root. If I call makeRoot()
>>> on an existing node, I get an exception.
>>> Also, I was wondering how I would convert an existing hierarchy from
>>> an ajacent list to a nested set, so I don't have to re-build the tree
>>> through the app. It seems the right and left values can always be
>>> rebuild from the parent id alone.. shouldn't there be a function like
>>> this bundled with the plugin?
>>> Thanks for all help,
>>> I'm looking forward to figure this out better.
>>> Have a great night,
>>> Daniel
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: sfPropelActAsTaggableBehavior and mixins

2008-03-27 Thread Georg Sorst

Hi Gergo,

according to the behavior's documentation there really is no
'removeTags' method, just 'removeAllTags' or 'removeTag'. Are you sure
you're using the right method?

Cheers,
Georg


pihentagy schrieb:
> Hi all!
> 
> I've tried to implement deleting all tags belonging to an object with
> mixins, but ran into the following issue:
> 
> I should write this way:
> 
> sfMixer::register('BaseOrganisation:delete:pre', array('Organisation',
> 'beforeDelete'));
> 
> But: it will pass a BaseOrganisation to the beforeDelete function.
> And, while the taggable plugin is a behaviour plugin for the
> Organisation class, it complains about:
> Call to undefined method BaseOrganisation::removeTags
> 
> How can I overcome this problem?
> 
> thanks
> Gergo
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Working with slots first time

2008-03-27 Thread Georg Sorst

Hi Reynier,

sounds good so far, but it depends on what your action is doing. Just
calling the 'license' module with no action name will call
executeIndex(). From there you can forward() to 'license/editAutor'
which will call executeEditAutor(). Just return sfView::SUCCESS in that
action and you should be all set. Hope that helps!

Cheers,
Georg

Reynier Perez Mira schrieb:
> Hi every:
> I have a menu and I need this menu specific only for admin pages. For that I 
> think the better option is "slots". Well I put this code inside 
> backend/templates/layout.php:
>
> 
>
> And in my backend/modules/license/templates/EditAutorSuccess.php the menu 
> code:
>
> 
>   Here goes my menu
> 
>
> How I can show this slot when I call http://localhost/backend_dev.php/license?
>
> Cheers and thanks in advance
> Ing. Reynier Pérez Mira
> Grupo Soporte al Desarrollo - Dirección Técnica
>
>
> >
>   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: dev environment not running with linux

2008-03-27 Thread Georg Sorst

Hey Martin,

I'm a little late but this bug report might help:
http://trac.symfony-project.com/ticket/2438

Using this allows me to actually use xdebug as a debugger :)

Cheers,
Georg

Martin Groh schrieb:
> Please stop bothering!! I've got it!
> There seem to be problems with my xdebug configuration.
> When I turn xdebug off, everything is fine.
> 
> now has clue Martin
> 
> 
> 
> Martin Groh schrieb:
>> first of all thanks a lot for all the support in this thread. The
>> community is one thing that makes symfony so special.
>>
>> here are the results of my checks:
>> - memory_limit is set to 32M
>> - log and cache dir are writeable
>> - error level was adjusted with no effect
>>
>> the silly thing is, that when I turn on web_debug in prod-environment
>> it works perfectly. So no problem with the alias as well.
>> What I found out is that I have nasty 'segmentation fault' errors in
>> my apache logs. I think I'll fix that first before I blame symfony for
>> all the mess.
>>
>> see you
>> not so very clueless Martin
>>
>>
>> Grégoire Hubert schrieb:
>>> Ooops forget it, in the check list you have :
>>>
>>> log to be writeable (it seems to be the case)
>>> cache to be writeable (rm -rf cache/* to be sure)
>>> memory_limit to be at least 32M in the php.ini
>>>
>>>   
>>
>>
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: sfGuard: getUsername in template

2008-03-07 Thread Georg Sorst

Hey Pierre,

$sf_user->getGuardUser()->getUsername() works for me. Did you do the
whole myUser.class.php thing (
http://trac.symfony-project.com/wiki/sfGuardPluginFor10#Secureyourapplication
) ? Can you check that $sf_user is an object of class myUser and that
myUser.class.php extends sfGuardSecurityUser?

Cheers,
Georg

Pierre schrieb:
>> $sf_user->getGuardUser()->getUsername()
>>
>> I think.
> 
> Yeah, that's how it should be. But apparently the getGuardUser-method  
> returns an empty variable and I can't figure out why. A logged-in  
> user would be supposed to have all the associated data of the user- 
> table at hand, isn't it?
> 
> Pierre
> 
>> -Original Message-
>> From: symfony-users@googlegroups.com [mailto:symfony- 
>> [EMAIL PROTECTED]
>> On Behalf Of Pierre
>> Sent: 07 March 2008 17:05
>> To: symfony users
>> Subject: [symfony-users] sfGuard: getUsername in template
>>
>>
>> Hi folks,
>>
>> might be a dumb question but how can I get the username of an
>> authenticated user in my template?
>>
>> I use symfony 1.0.7 and just installed sfGuardPlugin. So far
>> everything works fine but when i want to output the name of the
>> currently logged user like this:
>>
>> getUsername() ?>
>>
>> I get the following error:
>>
>> Fatal error: Call to a member function getUsername() on a non-object
>> in /Users/ralf/Sites/picit/plugins/sfGuardPlugin/lib/user/
>> sfGuardSecurityUser.class.php on line 139
>>
>> I configured everything as far as I can see like described in the
>> sfGuardPluginExtraDocumentation.
>> I can login and logout and everything is kind of secure, but I don't
>> get the user object.
>>
>> Any suggestions?
>>
>> Thanks,
>> Pierre
>>
>>
>>
>>
>>
> 
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: "Smart" Routing Rules?

2008-03-07 Thread Georg Sorst

Hey Daniel,

This is certainly not the smartest solution but it's probably as good as
the requirements: ... you mentioned as long as they don't really exist
:) Couldn't you check in the executeShowPage action whether the
requested page_name is actually the name of an existing module, and if
so, forward to that module, otherwise display the requested page? It's
just a handful of code, and the only drawback is that it's not in the
routing.yml where it actually belongs.

Cheers,
Georg

Richtermeister schrieb:
> Hi all,
> 
> as of late I've been implementing a "page module" that allows me to
> create random static pages via wysiwyg editor. Since they are supposed
> to look like root-level pages, the page module (unfortunately) becomes
> king in my routing file.
> 
> For example:
> 
> /privacy.html
> 
> Routing rule:
> 
> page_module:
>   url:/:page_name
>   param: { module: pages, action: showPage }
> 
> 
> Now, that works fine, but problem is that all the real modules can't
> easily be accessed by browsing to them and counting on their default
> action to fire, so in order to access the news module, I'd have to
> place the routing rule:
> 
> news_module:
>   url:   /news
>   param: { module: news, action: list }
> 
> above the rule for the page module. And I'd have to do this for every
> module.
> So my question is, is it possible to arrive at a construct such as:
> 
> module:
>   url:   /:module
>   param: { action: list }
>   requirements: { //module is a real module that exists in this app }
> 
> page_module:...
> 
> That would rock, methinks.
> Or how do you  guys go about serving "random" pages?
> 
> Thanks for help,
> have a great day,
> Daniel
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Askeet Day3 : php load_data.php

2008-03-07 Thread Georg Sorst

Hey David,

just for curiosity's sake, what did you or Frank do to solve the
problem? Did you just restart the tutorial from the beginning?

Cheers,
Georg

David BOUCHÉ schrieb:
> Special thanks to Frank that help me since yesterday.
> My code succefully import data on his computer.
> 
> So i've return at the begining and it works.
> 
> thanks for all.
> 
> Tommorow : Askeet day 4 !!
> 
> 
> See you all,
> David BOUCHÉ.
> 
> On 6 mar, 11:49, David BOUCHÉ <[EMAIL PROTECTED]> wrote:
>> Hi Frank,
>>
>> I follow your advice, I've cleared the cache and I've lauch this
>> import again :
>>
>> [EMAIL PROTECTED] askeet]$ symfony cc
>>
>>
>>
>>>> file+ /home/david/public_html/askeet/frontend_dev.lck
>>>> chmod 777 /home/david/public_html/askeet/frontend_dev.lck
>>>> file- /home/david/public_html/askeet/...es_question_config_view.yml.php
>>>> file- /home/david/public_html/askeet/.../config/config_autoload.yml.php
>>>> file- /home/david/public_html/askeet/...config/config_databases.yml.php
>>>> file- /home/david/public_html/askeet/...uestion_config_security.yml.php
>>>> file- /home/david/public_html/askeet/...d/dev/config/config_php.yml.php
>>>> file- /home/david/public_html/askeet/...question_config_filters.yml.php
>>>> file- /home/david/public_html/askeet/...les_default_config_view.yml.php
>>>> file- /home/david/public_html/askeet/.../config/config_settings.yml.php
>>>> file- /home/david/public_html/askeet/...default_config_security.yml.php
>>>> file- /home/david/public_html/askeet/...config/config_factories.yml.php
>>>> file- /home/david/public_html/askeet/...efault_config_generator.yml.php
>>>> file- /home/david/public_html/askeet/...s_default_config_module.yml.php
>>>> file- /home/david/public_html/askeet/...d/dev/config/config_app.yml.php
>>>> file- /home/david/public_html/askeet/..._default_config_filters.yml.php
>>>> file- /home/david/public_html/askeet/...v/config/config_logging.yml.php
>>>> file- /home/david/public_html/askeet/.../config_config_handlers.yml.php
>>>> file- /home/david/public_html/askeet/..._question_config_module.yml.php
>>>> file- /home/david/public_html/askeet/...estion_config_generator.yml.php
>>>> file- /home/david/public_html/askeet/...v/config/config_routing.yml.php
>>>> file- /home/david/public_html/askeet/frontend_dev.lck
>>>> file+ /home/david/public_html/askeet/frontend_prod.lck
>>>> chmod 777 /home/david/public_html/askeet/frontend_prod.lck
>>>> file- /home/david/public_html/askeet/...prod/config/config_i18n.yml.php
>>>> file- /home/david/public_html/askeet/...es_question_config_view.yml.php
>>>> file- /home/david/public_html/askeet/.../config/config_autoload.yml.php
>>>> file- /home/david/public_html/askeet/...config/config_databases.yml.php
>>>> file- /home/david/public_html/askeet/...he/frontend/prod/config/VERSION
>>>> file- /home/david/public_html/askeet/...uestion_config_security.yml.php
>>>> file- /home/david/public_html/askeet/.../prod/config/config_php.yml.php
>>>> file- /home/david/public_html/askeet/...question_config_filters.yml.php
>>>> file- /home/david/public_html/askeet/.../config/config_settings.yml.php
>>>> file- /home/david/public_html/askeet/...config/config_factories.yml.php
>>>> file- /home/david/public_html/askeet/...onfig_bootstrap_compile.yml.php
>>>> file- /home/david/public_html/askeet/.../prod/config/config_app.yml.php
>>>> file- /home/david/public_html/askeet/...d/config/config_logging.yml.php
>>>> file- /home/david/public_html/askeet/.../config_config_handlers.yml.php
>>>> file- /home/david/public_html/askeet/..._question_config_module.yml.php
>>>> file- /home/david/public_html/askeet/...estion_config_generator.yml.php
>>>> file- /home/david/public_html/askeet/...fig/config_core_compile.yml.php
>>>> file- /home/david/public_html/askeet/...d/config/config_routing.yml.php
>>>> file- /home/david/public_html/askeet/frontend_prod.lck
>> [EMAIL PROTECTED] batch]$ php load_data.php
>> ** same result **
>>
>> again perplexed.
>>
>> Thanks for your support.
>>
>> On 6 mar, 07:35, Frank van Noorden <[EMAIL PROTECTED]> wrote:
>>
>>> Hi David,
>>> Did you already clear the cache with com

[symfony-users] Re: Separete in three phisical layers a symfony project

2008-03-07 Thread Georg Sorst

Good question, I wonder what other more knowledgeable persons have to
say to that.

Just from the top of my mind, I don't think you can actually divide a
symfony project across multiple servers. However I can see two other
ways to use your three servers and share the load:

1. You can setup some load-balancing so that the requests get
distributed across your three servers. This one comes with a certain
degree of redundancy and is tricky to setup because all databases have
to stay synced.
2. You can put your DB on one server, the actual Symfony project on
another and the public webserver on the third. Symfony will store cached
files and assets on the third server which also receives the requests
from the internet. If it can't fulfill a request because there is no
cached output yet the request will be passed on to Symfony. I can't give
you any further details on how that actually works but I'm sure it's
possible. However, the overhead is probably rather large and I have no
idea how well it scales.

Cheers,
Georg


Yusdenis Sanchez Perodin schrieb:
>  
> Hello everybody:
>  
> I need to separete  my symfony project in three phisical layers because we 
> have three server for the aplications host. One server for the presentations 
> layer, other for logical layer and the other for the model layer.
>  
> Can we separete a symfony project in three phisical layers??
> [EMAIL PROTECTED],Yusdenis Sánchez Perodín 
>  
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Maintaining DB scripts using Propel

2008-03-06 Thread Georg Sorst

For a quicker and of course dirtier way I've been using mysqldiff (
http://www.mysqldiff.org/ ), a little PHP app that is able to generate
diffs between two SQL schemas or DBs. You can for example create a diff
between your development and your production database and then apply
this diff to your prod. DB. This is certainly not industrial-grade but
so far it has successfully kept me from implementing a real solution :)

Cheers,
Georg


Piers Warmers schrieb:
> 
> Yep, migrations is the way to go.
> 
> There is a propel plugin for this also:
> 
> http://trac.symfony-project.com/wiki/sfPropelMigrationsLightPlugin
> 
> - Piers
> 
> On 06/03/2008, at 4:43 PM, Jonathan Wage wrote:
> 
>> This is a common problem with databases, unfortunately symfony +
>> Propel does not offer anything in this regard. This is solved with
>> something called "database migrations." With any database abstraction
>> layer, it provides an API for communicating with a database,
>> regardless of the type. Doctrine has a features that solves this exact
>> problem. Basically, we have a migration utility where you can write a
>> migration class, which represents the changes for a specific version
>> of the database. The migration class has an up() and a down() method
>> where you can interact with a fluent interface for doing things like
>> createTable(), renameColumn(), etc. Their are methods available for
>> performing all of the operations on the database to keep it up to date
>> with your models, in a programmatic way. Now, Doctrine offers some
>> convenience methods for generating these migration classes from an
>> existing database or set of models currently. Thought, I am working on
>> a feature where you will be able to change your models/schema files,
>> and it will compare the schema information in your existing database
>> to your modified models, and is able to generate a Migration class for
>> the differences between the two. So, for now you have to just manually
>> write the up() and down() method in the migration class to perform the
>> changes you made in your models.
>>
>> Here is a simple example:
>> 001_add_new_table.php
>> class AddNewTable extends Doctrine_Migration
>> {
>>  public function up()
>>  {
>>$this->createTable('new_table');
>>  }
>>
>>  public function down();
>>  {
>>$this->dropTable('new_table');
>>  }
>> }
>>
>> The syntax is a little more then that, but it is just an example. The
>> up() does the adding, and the down() negates everything that the up()
>> does. This allows you to walk through each migration class executing
>> the up() or down() method depending on whether you are migrating up or
>> down. This is all handled automatically.
>>
>> From the command line you would then run "symfony doctrine-migrate",
>> and it would see that the current version of the database is 0, and it
>> would see that 001 migration class exists, so it would migrate to
>> version 1 and update the current version which is kept track of by
>> Doctrine.
>>
>> If you wanted to, you could run "symfony doctrine-migrate 0" and it
>> would execute the down() method on all the classes from the current
>> version down to the version you specified to migrate to.
>>
>> You can read more about migrations here:
>> http://www.phpdoctrine.org/documentation/manual/0_10?one- 
>> page#migration
>> And you can read about how to use Doctrine instead of Propel in
>> symfony here: http://trac.symfony-project.com/wiki/sfDoctrinePlugin
>>
>> The switch is pretty much transparent and you can use Doctrine instead
>> of Propel without losing any symfony specific functionality.
>>
>> - Jon
>>
>> On Thu, Mar 6, 2008 at 4:13 AM, Sumedh <[EMAIL PROTECTED]>  
>> wrote:
>>> Hi friends,
>>>
>>> I saw that whenever I want to change my DB, say add a column, and I
>>> fire propel-build-model command, Propel changes the create table
>>> commands in the script to add or remove those columns.
>>>
>>> This makes it hard to version the changes and replicate them in
>>> different environments.
>>>
>>> When I have some schema in Dev, and I make some changes to it for a
>>> feature, I would require a DB script that gives me those changes, so
>>> that I can fire it on Stage and Prod, and test the code.
>>>
>>> Does Propel / Symfony offer something like this, or is it done
>>> manually by everyone?
>>>
>>> - Thanks,
>>> Sumedh
>>
>>
>> -- 
>> Jonathan Wage
>> http://www.jwage.com
>> http://www.centresource.com
>>
> 
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Askeet Day3 : php load_data.php

2008-03-05 Thread Georg Sorst

Hi David,

if you just want to load fixtures there is already a task for that, it's
called

  php symfony propel-load-data 

That's not in accordance with the askeet tutorial but it's the way of
the symfony pro user ;) Have a look at
http://www.symfony-project.org/book/1_0/16-Application-Management-Tools#Populating%20a%20Database
for more info.

Other than that I'm not really sure what the problem is. Can you check
if /lib/model/UserPeer.php actually exists? If it doesn't
try running

  php symfony propel-build-model

and check again. If it still doesn't exist I'll have to think harder :)

Cheers,
Georg


David BOUCHÉ schrieb:
> Hello,
> 
> I have a problem when I try to populate the database with the batch :
> 
> [EMAIL PROTECTED] batch]$ php load_data.php
> PHP Fatal error:  Uncaught exception 'sfException' with message
> 'Unable to find path for class "UserPeer".' in /usr/share/pear/symfony/
> addon/propel/sfPropelData.class.php:207
> Stack trace:
> #0 /usr/share/pear/symfony/addon/propel/sfPropelData.class.php(46):
> sfPropelData->doDeleteCurrentData(Array)
> #1 /home/david/public_html/askeet/batch/load_data.php(15):
> sfPropelData->loadData('/home/david/pub...')
> #2 {main}
>   thrown in /usr/share/pear/symfony/addon/propel/
> sfPropelData.class.php on line 207
> 
> Fatal error: Uncaught exception 'sfException' with message 'Unable to
> find path for class "UserPeer".' in /usr/share/pear/symfony/addon/
> propel/sfPropelData.class.php:207
> Stack trace:
> #0 /usr/share/pear/symfony/addon/propel/sfPropelData.class.php(46):
> sfPropelData->doDeleteCurrentData(Array)
> #1 /home/david/public_html/askeet/batch/load_data.php(15):
> sfPropelData->loadData('/home/david/pub...')
> #2 {main}
>   thrown in /usr/share/pear/symfony/addon/propel/
> sfPropelData.class.php on line 207
> 
> 
> More informations :
> 
> [EMAIL PROTECTED] askeet]$ uname -a
> Linux mayflower 2.6.18-xenU #1 SMP Thu Feb 28 15:48:53 CET 2008 i686
> Dual-Core AMD Opteron(tm) Processor 8218 GNU/Linux
> 
> [EMAIL PROTECTED] askeet]$ cat config/databases.yml
> #all:
> #  propel:
> #class:  sfPropelDatabase
> #param:
> #  dsn:  mysql://[EMAIL PROTECTED]/dbname
> all:
>   propel:
> class:  sfPropelDatabase
> param:
>   phptype:  mysql
>   host: localhost
>   database: askeet
>   username: **utilisateur**
>   password: **secret**
> 
> [EMAIL PROTECTED] askeet]$ cat batch/load_data.php
>  
> define('SF_ROOT_DIR',realpath(dirname(__FILE__).'/..'));
> define('SF_APP', 'frontend');
> define('SF_ENVIRONMENT', 'dev');
> define('SF_DEBUG',   true);
> 
> require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
> 
> // initialize database manager
> $databaseManager = new sfDatabaseManager();
> $databaseManager->initialize();
> 
> $data = new sfPropelData();
> $data->setDeleteCurrentData(false);
> $data-
>> loadData(sfConfig::get('sf_data_dir').DIRECTORY_SEPARATOR.'fixtures');
> 
> ?>
> 
> If you need more information, reply to this topic i will give you
> more !
> 
> Thanks for your support,
> Willou.
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: Putting forms in session

2008-03-05 Thread Georg Sorst

Is that really an issue? I mean, in a production environment you would
probably shut down your site and clear all sessions anyway before you
move to the new code.

Cheers,
Georg


Thomas Rabaix schrieb:
> CO2, let's imagine the situation :
>  - you store an object in the session
>  - then you refactore your code by renaming the class
>  - the next time the user connect to your site, the class does not
> exists anymore
>  - and you get a silent error !
> 
> Hope it make sense.
> Thomas
> 
> On Tue, Mar 4, 2008 at 3:45 PM, CO2 <[EMAIL PROTECTED]> wrote:
>>  You can add objects to php sessions as well. I don't get it why the
>>  symfony docs tell you not to do it because it's quite simple when
>>  adding the object which is displayed in the form to the session.
>>
>>
>>
>>  On 4 Mrz., 13:27, Sumedh <[EMAIL PROTECTED]> wrote:
>>  > So Lee...
>>  >
>>  > When you submit a tab and move to next step of the wizard...you
>>  > maintain the field values in session manually, by code? every field
>>  > set as a session attribute with a different key? :|
>>  >
>>  > On Mar 4, 4:10 pm, "Lee Bolding" <[EMAIL PROTECTED]> wrote:
>>  >
>>  > > I'm not entirely sure I agree with that.
>>  >
>>  > > Usability in that sense is subjective - to an able bodied person, yes.
>>  >
>>  > > At the moment I'm involved with a lot of usability stuff for disabled 
>> people
>>  > > - JS validation is often a usability anti-pattern when combined with a
>>  > > screen reader. I'm happy to trade off some server performance for a
>>  > > better/consistent experience for all users.
>>  >
>>  > > -Original Message-
>>  > > From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED]
>>  >
>>  > > On Behalf Of Ian P. Christian
>>  > > Sent: 04 March 2008 10:36
>>  > > To: symfony-users@googlegroups.com
>>  > > Subject: [symfony-users] Re: Putting forms in session
>>  >
>>  > > Lee Bolding wrote:
>>  >
>>  > > > I don't know about JS validation, I don't use it for the above 
>> reasons...
>>  > > > (can anybody give me an instance where JS validation *IS* useful?)
>>  >
>>  > > Improving usability. Obviously you should ever rely on it, but it saves
>>  > > a roundtrip to the server to validate, therefore improving livliness,
>>  > > and reducing server load.
>>  >
>>
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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: sfAdmin generator auto components

2008-03-03 Thread Georg Sorst

Hi florynth,

did you create a new admin generator template which should also create
an autoModuleNameComponent? If not, then no such component will be
generated and you should just extend sfComponents like you would with a
normal component in a module.

If you have in fact added a component to the template and it still
doesn't get generated then (from the top of my head) you have to extend
the sfPropelAdminGenerator or one of its parents. Somewhere in there is
a list of files that will be generated which does not include
components.class.php by default, try sf{Crud}Generator.class.php .

Cheers,
Georg

florynth schrieb:
> This is a question that I've post on the forum, listening from Fabien
> advice I'll try the newsletter from now on...
> 
> Hi,
> 
> I have modify the default theme for the propel-init-admin by admin a
> auto components. Everything is generating properly but the
> autoModuleNameComponents that my components is extending from is not
> found (unlike the autoModuleNameActions) what can I do ?
> 
> I know this is probably a high level question but still it will be
> great to have some 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: how to discover types in propel model?

2008-03-03 Thread Georg Sorst

Hi Mohammad,

do you want to use type-checking for your model depending on the column
type or do you want to get some information about the corresponding
table from your model?

For the first case, Propel should already do that. For the latter case,
you can get all kinds of information about the columns (type, primary /
foreign key etc.) from the table map. To get the table map for a certain
model class use the peer method BasePeer::getTableMap()
and then have a look at the TableMap class to see what can be done with it.

Best regards,
Georg

Mohammad Ali Safari schrieb:
> Hi
> I am using propel-build-schema to create a schema from my existing
> database and then create my model. However, it seems the model does not
> give me much information about column in my tables such as their types.
> 
> 
> Is there any way to force propel to include such information (specially
> the column types) in the generated model classes?
> 
> cheers,
> --mohammad
> 
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google 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
-~--~~~~--~~--~--~---



  1   2   >