[symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-17 Thread RusAlex
IT's a standart fixtures:
sfGuardUser:
  User_admin:
first_name: John
last_name:  Doe
email_address:  john@gmail.com
username:   admin
password:   admin
is_super_admin: true
Groups: [Group_admin]

sfGuardGroup:
  Group_admin:
name:   admin
description:Administrator group
Permissions:[Permission_admin]

sfGuardPermission:
  Permission_admin:
name:   admin
description:Administrator permission

On Aug 17, 3:12 pm, Javier Garcia  wrote:
>   Could paste the fixture?
>
> On 08/17/2010 12:50 PM, RusAlex wrote:
>
>
>
>
>
> > No im sorry i have mistake in pasting. I have a correct relations
> > RankDomain:
> >    columns:
> >      name: { type: string(255), notnull: true, unique: true }
> >      user_id: { type: integer, notnull:true }
> >    relations:
> >      sfGuardUser: { local: user_id, foreign: id }
>
> > but error still exist
>
> > On Aug 17, 11:44 am, Joep Brunsveld  wrote:
> >> It seems that you forgot the "relations" indentation.
>
> >> It must be:
> >> RankDomain:
> >>    columns:
> >>      name: { type: string(255), notnull: true, unique: true }
> >>      user_id: { type: integer, notnull:true }
> >>    relations:
> >>      sfGuardUser: { local: user_id, foreign: id }
>
> >> On Aug 17, 7:33 am, RusAlex  wrote:
>
> >>> schema.yml
> >>> RankDomain:
> >>>    columns:
> >>>      name: { type: string(255), notnull: true, unique: true }
> >>>      user_id: { type: integer, notnull:true }
> >>>      sfGuardUser: { local: user_id, foreign: id }
> >>> $php symfony doctrine:build --all --and-load
> >>> and see red Error:
> >>>    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
> >>> update a child row: a foreign key constraint fails
> >>> (`ranks`.`rank_domain`, CONSTRAINT
> >>> `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> >>> REFERENCES `sf_guard_user` (`id`))
> >>> What im doing wrong ?
>
> --
> Javi
>
> Ubuntu 8.04

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

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


[symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-17 Thread RusAlex
If integer(4) have another error:
SQLSTATE[HY000]: General error: 1005 Can't create table
'ranks.#sql-3a5_b1c' (errno: 150). Failing Query: "ALTER TABLE
rank_domain ADD CONSTRAINT rank_domain_user_id_sf_guard_user_id
FOREIGN KEY (user_id) REFERENCES sf_guard_user(id)". Failing Query:
ALTER TABLE rank_domain ADD CONSTRAINT
rank_domain_user_id_sf_guard_user_id FOREIGN KEY (user_id) REFERENCES
sf_guard_user(id)

On Aug 17, 5:50 pm, qp  wrote:
> try changing the type attribute of the foreignKey "user_id" under
> RankDomain to type: integer(4)
> i.e
> RankDomain:
>   columns:
>     name: { type: string(255), notnull: true, unique: true }
>     user_id: { type: integer(4), notnull:true }
>   relations:
>     sfGuardUser: { local: user_id, foreign: id }
>
> On Aug 17, 2:12 pm, Javier Garcia  wrote:
>
>
>
> >   Could paste the fixture?
>
> > On 08/17/2010 12:50 PM, RusAlex wrote:
>
> > > No im sorry i have mistake in pasting. I have a correct relations
> > > RankDomain:
> > >    columns:
> > >      name: { type: string(255), notnull: true, unique: true }
> > >      user_id: { type: integer, notnull:true }
> > >    relations:
> > >      sfGuardUser: { local: user_id, foreign: id }
>
> > > but error still exist
>
> > > On Aug 17, 11:44 am, Joep Brunsveld  wrote:
> > >> It seems that you forgot the "relations" indentation.
>
> > >> It must be:
> > >> RankDomain:
> > >>    columns:
> > >>      name: { type: string(255), notnull: true, unique: true }
> > >>      user_id: { type: integer, notnull:true }
> > >>    relations:
> > >>      sfGuardUser: { local: user_id, foreign: id }
>
> > >> On Aug 17, 7:33 am, RusAlex  wrote:
>
> > >>> schema.yml
> > >>> RankDomain:
> > >>>    columns:
> > >>>      name: { type: string(255), notnull: true, unique: true }
> > >>>      user_id: { type: integer, notnull:true }
> > >>>      sfGuardUser: { local: user_id, foreign: id }
> > >>> $php symfony doctrine:build --all --and-load
> > >>> and see red Error:
> > >>>    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
> > >>> update a child row: a foreign key constraint fails
> > >>> (`ranks`.`rank_domain`, CONSTRAINT
> > >>> `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> > >>> REFERENCES `sf_guard_user` (`id`))
> > >>> What im doing wrong ?
>
> > --
> > Javi
>
> > Ubuntu 8.04

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

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


[symfony-users] APPs vs Modules/Actions: Pro's and Con's????

2010-08-17 Thread Kei Takahashi
Hi, I am seeking opinions.

We have a group of about 5 developers and we are engaging in a
discussion about how to structure a project. In the past, each
developer has made a separate configuration system for various
websites. One is reporting, one is configurations and settings, etc.

Now, we are adopting symfony as a framework as these systems are
refactored. We want a centralized administrative application, and we
want to refactor the old systems all together to be accessed by this
one administration system. Now, here is where I am seeking opinions,
as none of us are authority's on symfony. Do we:

- create a 'backend' and put all the functionality under modules and
actions?
PROs:
CONs:

- create a separate APP for each within the PROJECT, and manipulate
the routing and layout to be shared for a consistent back end, css,
etc?
PROs:
CONs:

That is the conversation that is taking place. Pro's and Con's for
keeping them separated by Application or by having everyone use the
same backend application and put their functionality into modules and
actions.

Opinions from experienced symfony developers is highly appreciated.
We're really just searching for information (IE: Pro's/Con's) so we
can make informed decisions in our planning process. Thanks.

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

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


[symfony-users] Re: basic Action module/action does not exist

2010-08-17 Thread Abraham
My problem is that i'm getting this

404 | Not Found | sfError404Exception
Action "poa_propuesto/action" does not exist.
stack trace

when I click  trasladar action in the list view of poa_propuesto
module. I have the executeListTrasladar action defined, so i don't
know what is the problem. The action should be executed but i'm
getting an error 404, that's my problem :S

On Aug 17, 9:19 am, Massimiliano Arione  wrote:
> On 17 Ago, 06:43, Abraham  wrote:
>
> > any ideas to overcome my problem?
>
> What is your problem? It's not really clear in your message.
>
> cheers
> Massimiliano

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

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


Re: [symfony-users] link_to_function

2010-08-17 Thread Daniel Lohse
Mhm, I meant the link_to function – damnit (sorry), I should have read your 
post better, because now I see that you do want to use link_to_function.

Maybe you could send a parameter through the JavaScript (just a string like 
'do_x' or 'do_y') and then decide in the symfony action what to execute/do 
according to this parameter?

Sorry for the confusion. :(


Cheers, Daniel
 
On 17.08.2010, at 21:23, Parijat Kalia wrote:

> Daniel, 
> 
> Thanks for that. I was browsing the link_to_function, what it states is that 
> this tag is useful for triggering javascript functions, essentially what I 
> have looks like this:
> 
> link_to_function('Click here' , 'javascript:function()');
> 
> This renders itself in HTML format as:
> 
> Click here
> 
> So I get the point you are stating, that is by giving a distinct parameter in 
> the subaction (one sec, what exactly do u mean by subaction). But this can't 
> happen in link_to_function as the href is tailored to # in this case, the 
> onclick is stated to return false, once the javascript occurs.
> 
> If you meant the link_to tag, then in that case it might work, but I believe 
> you were illustrating the link_to_function jscript tag. Do let me know.,
> 
> regards,
> 
> parijat
> 
> 
> On Mon, Aug 16, 2010 at 4:42 PM, Daniel Lohse  
> wrote:
> Give each of them a distinct parameter "subaction" like in 
> "module/action?subaction=bla" as the URL and change the "bla" with your 
> separate events. As these URLs will never be seen by the user you can safely 
> do that – even in symfony-land. ;-)
> 
> Cheers, Daniel
> 
> PS: If you're using link_to, careful to use the option array('query_string' 
> => array('subaction' => 'bla')) notation as GET parameters are not 
> permissible in the URL part of the link_to function (this is explained in the 
> API documentation).
> 
> On 17.08.2010, at 01:30, Parijat Kalia wrote:
> 
>> Hey guys, 
>> 
>> We know that the link_to_function can be used to trigger javascripts and the 
>> page posts back to itself. Correct me if I am wrong here. I have multiple 
>> link_to_function tags in my webpage. Is there a way I can detect which one 
>> was clicked once the post occurs. This is because, each of these 
>> link_to_function tags are meant to trigger separate events, that run only 
>> upon postback.
>> 
>> Regards,
>> 
>> Parijat Kalia
>> 
>> -- 
>> If you want to report a vulnerability issue on symfony, please send it to 
>> security at symfony-project.com
>>  
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, 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
> 
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

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

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


[symfony-users] Ajax Forms

2010-08-17 Thread Joshua Estes
A picture is worth a thousand words, so I attached one.

My idea is to create an Ajax form. As you can see from the image this
is a very basic form. The one I will make would be slightly more
complex. The code is all in the filter forms. What I am wanting to do
with this is each group, users will be able to add more fields to the
filter form. Right now I'm using the "groups" as embedded forms. I
want the "add another field" to do an ajax call and just render
another widget that is a dropdown/text area.

I've started off with creating my own widgetFormSchemaFormatter, but
the uri that I set for the call back is the own on the main form and
not the embedded form. Any ideas on some other ways I can go about
doing this? I assumed this would be fairly easy and straight forward,
but I keep running into issues. Anyone ever tried this before?

Thanks
f1g

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

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

2010-08-17 Thread Parijat Kalia
Daniel,

Thanks for that. I was browsing the link_to_function, what it states is that
this tag is useful for triggering javascript functions, essentially what I
have looks like this:

link_to_function('Click here' , 'javascript:function()');

This renders itself in HTML format as:

Click here

So I get the point you are stating, that is by giving a distinct parameter
in the subaction (one sec, what exactly do u mean by subaction). But this
can't happen in link_to_function as the href is tailored to # in this case,
the onclick is stated to return false, once the javascript occurs.

If you meant the link_to tag, then in that case it might work, but I believe
you were illustrating the link_to_function jscript tag. Do let me know.,

regards,

parijat


On Mon, Aug 16, 2010 at 4:42 PM, Daniel Lohse
wrote:

> Give each of them a distinct parameter "subaction" like in
> "module/action?subaction=bla" as the URL and change the "bla" with your
> separate events. As these URLs will never be seen by the user you can safely
> do that – even in symfony-land. ;-)
>
> Cheers, Daniel
>
> PS: If you're using link_to, careful to use the option array('query_string'
> => array('subaction' => 'bla')) notation as GET parameters are not
> permissible in the URL part of the link_to function (this is explained in
> the API documentation).
>
> On 17.08.2010, at 01:30, Parijat Kalia wrote:
>
> Hey guys,
>
> We know that the link_to_function can be used to trigger javascripts and
> the page posts back to itself. Correct me if I am wrong here. I have
> multiple link_to_function tags in my webpage. Is there a way I can detect
> which one was clicked once the post occurs. This is because, each of these
> link_to_function tags are meant to trigger separate events, that run only
> upon postback.
>
> Regards,
>
> Parijat Kalia
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, 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
>

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

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


[symfony-users] Overriding files from a plugin within another plugin

2010-08-17 Thread Daniel Kucharski
Hi,

 

Is it possible to create a plugin which overrides various settings / classes
from other symfony plugins (routing, schema, model classes)?

If so, does the order how plugins are loaded (in the project configuration)
matter?

 

Kind regards,

Daniel

 

 

 

 

 

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

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


Re: [symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-17 Thread Stéphane
+1 for the specific task !



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


On Tue, Aug 17, 2010 at 3:52 PM, Daniel Lohse
wrote:

> Mhm, I somehow I knew that this would have been t easy. (:
>
> But okay, so we do need to cache these relations array(bundle =>
> sha1sum.ccsgz) somewhere it gets loaded on every request and I'd guess the
> app.yml.php file is a good place. Still, using this approach does not
> necessitate – or even need for that matter – manual cache invalidation
> because we could send the far future Expires header everytime. If files in
> that bundle change, clear the files (not necessarily with a brute-force
> symfony cc) and they are rebuilt on the next page refresh. Maybe we could
> provide a apostrophe:clear-minified-resources [--js] [--css] [--all]
> [--env="dev|prod|staging"] task so as to not need the brute-force symfony cc
> or go hunting for these minified files manually?
>
> Cheers, Daniel
>
> On 17.08.2010, at 15:32, Tom Boutell wrote:
>
> > Daniel, this almost works and I got pretty excited thinking about
> > it... but there's a tragic flaw.
> >
> > On the first page access you slurp up all the CSS files, minify them,
> > md5 that and create a cache file. Fine.
> >
> > On the second page access you... can't point to the cache file without
> > first doing all of that again (everything except actually writing the
> > file) just to figure out what the filename is. (:
> >
> > Opening all of the files, slurping them in and md5'ing them on every
> > page access is overhead we do not want. So it makes more sense to have
> > a cache key.
> >
> > On Aug 16, 9:13 am, Daniel Lohse  wrote:
> >> Sorry for being a bit slow today: why would we need cache invalidation?
> If the filename of the compacted file(s) is a hash generated from the
> contents of the file then after one file changes and the scripts/stylesheets
> are re-generated the filename changes. The browser then should just request
> the file because it doesn't about that file yet (filename is not the same).
> >>
> >> Am I missing something here?
> >>
> >> Cheers, Daniel
> >>
> >> Sent from my iPad
> >>
> >> On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
> >>
> >>> You're right, we do need cache invalidation. I just came up with a
> >>> clean way to do it without tweaking app.yml settings, adding a table
> >>> or making glob() calls: just use a file in the asset-cache folder to
> >>> hold the current cache key. The OS should cache reads from that file
> >>> extremely well.
> >>
> >>> It may even be possible to avoid the filesystem hit by writing it as a
> >>> PHP file in cache/frontend/prod/config that just calls
> >>> sfConfig::set(). Then with any luck it would be autoloaded and even
> >>> cached by APC until its modification date changes just like an app.yml
> >>> setting would. But plain old file_get_contents() calls to a simple
> >>> file with an asset cache version number in it would also get cached
> >>> nicely by the operating system so it might be overkill to try to wedge
> >>> it into Symfony's cache.
> >>
> >>> On Aug 15, 11:44 am, pghoratiu  wrote:
> > It might be worthwhile to take things a step further by versioning
> > them in the URL so that they can be given an infinite cache
> expiration
> > date, although this requires a database hit or perhaps a glob call
> > when outputting the pages that contain them. The code is a big step
> > forward as-is if you are using unminimized, uncombined CSS and JS and
> > has no negative impact on your existing caching issues, but we'll
> > think about next steps.
> >>
>  
>  I think think it's important to add cache invalidation as well. My
>  suggestion is to append another key
>  to app.yml to have a cache key that can be updated manually and append
>  that key too the minified resource
>  file:
>  all:
>    a:
>  ver:1
>  css/main.css?ver=1
>  This way css and js pages can be cached indefinitely on the client
>  side without having problems when manually
>  updating the css or js files.
> >>
>  gabriel
> >>
> >>> --
> >>> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
> >>
> >>> You received this message because you are subscribed to the Google
> >>> Groups "symfony users" group.
> >>> To post to this group, send email to symfony-users@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> symfony-users+unsubscr...@googlegroups.com
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/symfony-users?hl=en
> >>
> >>
> >
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
> >
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfo

Re: [symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-17 Thread Daniel Lohse
Mhm, I somehow I knew that this would have been t easy. (:

But okay, so we do need to cache these relations array(bundle => sha1sum.ccsgz) 
somewhere it gets loaded on every request and I'd guess the app.yml.php file is 
a good place. Still, using this approach does not necessitate – or even need 
for that matter – manual cache invalidation because we could send the far 
future Expires header everytime. If files in that bundle change, clear the 
files (not necessarily with a brute-force symfony cc) and they are rebuilt on 
the next page refresh. Maybe we could provide a 
apostrophe:clear-minified-resources [--js] [--css] [--all] 
[--env="dev|prod|staging"] task so as to not need the brute-force symfony cc or 
go hunting for these minified files manually?

Cheers, Daniel

On 17.08.2010, at 15:32, Tom Boutell wrote:

> Daniel, this almost works and I got pretty excited thinking about
> it... but there's a tragic flaw.
> 
> On the first page access you slurp up all the CSS files, minify them,
> md5 that and create a cache file. Fine.
> 
> On the second page access you... can't point to the cache file without
> first doing all of that again (everything except actually writing the
> file) just to figure out what the filename is. (:
> 
> Opening all of the files, slurping them in and md5'ing them on every
> page access is overhead we do not want. So it makes more sense to have
> a cache key.
> 
> On Aug 16, 9:13 am, Daniel Lohse  wrote:
>> Sorry for being a bit slow today: why would we need cache invalidation? If 
>> the filename of the compacted file(s) is a hash generated from the contents 
>> of the file then after one file changes and the scripts/stylesheets are 
>> re-generated the filename changes. The browser then should just request the 
>> file because it doesn't about that file yet (filename is not the same).
>> 
>> Am I missing something here?
>> 
>> Cheers, Daniel
>> 
>> Sent from my iPad
>> 
>> On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
>> 
>>> You're right, we do need cache invalidation. I just came up with a
>>> clean way to do it without tweaking app.yml settings, adding a table
>>> or making glob() calls: just use a file in the asset-cache folder to
>>> hold the current cache key. The OS should cache reads from that file
>>> extremely well.
>> 
>>> It may even be possible to avoid the filesystem hit by writing it as a
>>> PHP file in cache/frontend/prod/config that just calls
>>> sfConfig::set(). Then with any luck it would be autoloaded and even
>>> cached by APC until its modification date changes just like an app.yml
>>> setting would. But plain old file_get_contents() calls to a simple
>>> file with an asset cache version number in it would also get cached
>>> nicely by the operating system so it might be overkill to try to wedge
>>> it into Symfony's cache.
>> 
>>> On Aug 15, 11:44 am, pghoratiu  wrote:
> It might be worthwhile to take things a step further by versioning
> them in the URL so that they can be given an infinite cache expiration
> date, although this requires a database hit or perhaps a glob call
> when outputting the pages that contain them. The code is a big step
> forward as-is if you are using unminimized, uncombined CSS and JS and
> has no negative impact on your existing caching issues, but we'll
> think about next steps.
>> 
 
 I think think it's important to add cache invalidation as well. My
 suggestion is to append another key
 to app.yml to have a cache key that can be updated manually and append
 that key too the minified resource
 file:
 all:
   a:
 ver:1
 css/main.css?ver=1
 This way css and js pages can be cached indefinitely on the client
 side without having problems when manually
 updating the css or js files.
>> 
 gabriel
>> 
>>> --
>>> If you want to report a vulnerability issue on symfony, please send it to 
>>> security at symfony-project.com
>> 
>>> You received this message because you are subscribed to the Google
>>> Groups "symfony users" group.
>>> To post to this group, send email to symfony-users@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> symfony-users+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/symfony-users?hl=en
>> 
>> 
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, 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 subscribe

[symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-17 Thread qp
try changing the type attribute of the foreignKey "user_id" under
RankDomain to type: integer(4)
i.e
RankDomain:
  columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer(4), notnull:true }
  relations:
sfGuardUser: { local: user_id, foreign: id }

On Aug 17, 2:12 pm, Javier Garcia  wrote:
>   Could paste the fixture?
>
> On 08/17/2010 12:50 PM, RusAlex wrote:
>
>
>
> > No im sorry i have mistake in pasting. I have a correct relations
> > RankDomain:
> >    columns:
> >      name: { type: string(255), notnull: true, unique: true }
> >      user_id: { type: integer, notnull:true }
> >    relations:
> >      sfGuardUser: { local: user_id, foreign: id }
>
> > but error still exist
>
> > On Aug 17, 11:44 am, Joep Brunsveld  wrote:
> >> It seems that you forgot the "relations" indentation.
>
> >> It must be:
> >> RankDomain:
> >>    columns:
> >>      name: { type: string(255), notnull: true, unique: true }
> >>      user_id: { type: integer, notnull:true }
> >>    relations:
> >>      sfGuardUser: { local: user_id, foreign: id }
>
> >> On Aug 17, 7:33 am, RusAlex  wrote:
>
> >>> schema.yml
> >>> RankDomain:
> >>>    columns:
> >>>      name: { type: string(255), notnull: true, unique: true }
> >>>      user_id: { type: integer, notnull:true }
> >>>      sfGuardUser: { local: user_id, foreign: id }
> >>> $php symfony doctrine:build --all --and-load
> >>> and see red Error:
> >>>    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
> >>> update a child row: a foreign key constraint fails
> >>> (`ranks`.`rank_domain`, CONSTRAINT
> >>> `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> >>> REFERENCES `sf_guard_user` (`id`))
> >>> What im doing wrong ?
>
> --
> Javi
>
> Ubuntu 8.04

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

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


Re: [symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-17 Thread Stéphane
I didn't took a look at the implementation yet.

PHP is caching filesystem infos AFAIK.

Can't we use these file informations as part of the key cache to compute md5
? So their will be no more need to invalidate, it will invalidate by itself,
or by calling (for hard-writting apps) clearstatcache() ?

Cheers,



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


On Tue, Aug 17, 2010 at 3:32 PM, Tom Boutell  wrote:

> Daniel, this almost works and I got pretty excited thinking about
> it... but there's a tragic flaw.
>
> On the first page access you slurp up all the CSS files, minify them,
> md5 that and create a cache file. Fine.
>
> On the second page access you... can't point to the cache file without
> first doing all of that again (everything except actually writing the
> file) just to figure out what the filename is. (:
>
> Opening all of the files, slurping them in and md5'ing them on every
> page access is overhead we do not want. So it makes more sense to have
> a cache key.
>
> On Aug 16, 9:13 am, Daniel Lohse  wrote:
> > Sorry for being a bit slow today: why would we need cache invalidation?
> If the filename of the compacted file(s) is a hash generated from the
> contents of the file then after one file changes and the scripts/stylesheets
> are re-generated the filename changes. The browser then should just request
> the file because it doesn't about that file yet (filename is not the same).
> >
> > Am I missing something here?
> >
> > Cheers, Daniel
> >
> > Sent from my iPad
> >
> > On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
> >
> > > You're right, we do need cache invalidation. I just came up with a
> > > clean way to do it without tweaking app.yml settings, adding a table
> > > or making glob() calls: just use a file in the asset-cache folder to
> > > hold the current cache key. The OS should cache reads from that file
> > > extremely well.
> >
> > > It may even be possible to avoid the filesystem hit by writing it as a
> > > PHP file in cache/frontend/prod/config that just calls
> > > sfConfig::set(). Then with any luck it would be autoloaded and even
> > > cached by APC until its modification date changes just like an app.yml
> > > setting would. But plain old file_get_contents() calls to a simple
> > > file with an asset cache version number in it would also get cached
> > > nicely by the operating system so it might be overkill to try to wedge
> > > it into Symfony's cache.
> >
> > > On Aug 15, 11:44 am, pghoratiu  wrote:
> > >>> It might be worthwhile to take things a step further by versioning
> > >>> them in the URL so that they can be given an infinite cache
> expiration
> > >>> date, although this requires a database hit or perhaps a glob call
> > >>> when outputting the pages that contain them. The code is a big step
> > >>> forward as-is if you are using unminimized, uncombined CSS and JS and
> > >>> has no negative impact on your existing caching issues, but we'll
> > >>> think about next steps.
> >
> > >> 
> > >> I think think it's important to add cache invalidation as well. My
> > >> suggestion is to append another key
> > >> to app.yml to have a cache key that can be updated manually and append
> > >> that key too the minified resource
> > >> file:
> > >> all:
> > >>   a:
> > >> ver:1
> > >> css/main.css?ver=1
> > >> This way css and js pages can be cached indefinitely on the client
> > >> side without having problems when manually
> > >> updating the css or js files.
> >
> > >> gabriel
> >
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
> >
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en
> >
> >
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, 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.

[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-17 Thread Tom Boutell
Daniel, this almost works and I got pretty excited thinking about
it... but there's a tragic flaw.

On the first page access you slurp up all the CSS files, minify them,
md5 that and create a cache file. Fine.

On the second page access you... can't point to the cache file without
first doing all of that again (everything except actually writing the
file) just to figure out what the filename is. (:

Opening all of the files, slurping them in and md5'ing them on every
page access is overhead we do not want. So it makes more sense to have
a cache key.

On Aug 16, 9:13 am, Daniel Lohse  wrote:
> Sorry for being a bit slow today: why would we need cache invalidation? If 
> the filename of the compacted file(s) is a hash generated from the contents 
> of the file then after one file changes and the scripts/stylesheets are 
> re-generated the filename changes. The browser then should just request the 
> file because it doesn't about that file yet (filename is not the same).
>
> Am I missing something here?
>
> Cheers, Daniel
>
> Sent from my iPad
>
> On Aug 16, 2010, at 2:59 PM, Tom Boutell  wrote:
>
> > You're right, we do need cache invalidation. I just came up with a
> > clean way to do it without tweaking app.yml settings, adding a table
> > or making glob() calls: just use a file in the asset-cache folder to
> > hold the current cache key. The OS should cache reads from that file
> > extremely well.
>
> > It may even be possible to avoid the filesystem hit by writing it as a
> > PHP file in cache/frontend/prod/config that just calls
> > sfConfig::set(). Then with any luck it would be autoloaded and even
> > cached by APC until its modification date changes just like an app.yml
> > setting would. But plain old file_get_contents() calls to a simple
> > file with an asset cache version number in it would also get cached
> > nicely by the operating system so it might be overkill to try to wedge
> > it into Symfony's cache.
>
> > On Aug 15, 11:44 am, pghoratiu  wrote:
> >>> It might be worthwhile to take things a step further by versioning
> >>> them in the URL so that they can be given an infinite cache expiration
> >>> date, although this requires a database hit or perhaps a glob call
> >>> when outputting the pages that contain them. The code is a big step
> >>> forward as-is if you are using unminimized, uncombined CSS and JS and
> >>> has no negative impact on your existing caching issues, but we'll
> >>> think about next steps.
>
> >> 
> >> I think think it's important to add cache invalidation as well. My
> >> suggestion is to append another key
> >> to app.yml to have a cache key that can be updated manually and append
> >> that key too the minified resource
> >> file:
> >> all:
> >>   a:
> >>     ver:1
> >> css/main.css?ver=1
> >> This way css and js pages can be cached indefinitely on the client
> >> side without having problems when manually
> >> updating the css or js files.
>
> >>     gabriel
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
>

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email 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: basic Action module/action does not exist

2010-08-17 Thread Massimiliano Arione
On 17 Ago, 06:43, Abraham  wrote:
> any ideas to overcome my problem?

What is your problem? It's not really clear in your message.

cheers
Massimiliano

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

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


[symfony-users] Re: IS there any manual to correct unit test system for integrating with sfGuard auth symfony?

2010-08-17 Thread Massimiliano Arione
On 17 Ago, 05:32, RusAlex  wrote:
> I've installed sfGuard plugin and now most of old tests didn't work
> well. They need to be authenticated to the frontend system. Is there
> any official decision ?

Just create your own test class, like explained in
http://www.symfony-project.org/jobeet/1_4/Propel/en/09#chapter_09_test_data
You can then easily create a login() method that does the login for
you, by submitting the login form

cheers
Massimiliano

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

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


[symfony-users] Re: I don't know but after some rebuilds of doctrine site didn't work now

2010-08-17 Thread wueb
Try to move the methods in the lib/model/doctrine/
sfGuardUserTable.class.php to lib/model/doctrine/sfDoctrineGuardPlugin/
sfGuardUserTable.class.php or Vice-Versa.

On 17 Ago, 06:51, RusAlex  wrote:
> And i see only login page of sfGuardPlugin. But when i type login and
> password, i see an error 500 | Internal Server Error |
> Doctrine_Table_Exception
> Unknown method SfGuardUserTable::retrieveByUsername
>
> What's wrong? Where i've maked a mistake ?

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: trying to make a relation with sfGuardUser and got error

2010-08-17 Thread Javier Garcia

 Could paste the fixture?


On 08/17/2010 12:50 PM, RusAlex wrote:

No im sorry i have mistake in pasting. I have a correct relations
RankDomain:
   columns:
 name: { type: string(255), notnull: true, unique: true }
 user_id: { type: integer, notnull:true }
   relations:
 sfGuardUser: { local: user_id, foreign: id }

but error still exist

On Aug 17, 11:44 am, Joep Brunsveld  wrote:

It seems that you forgot the "relations" indentation.

It must be:
RankDomain:
   columns:
 name: { type: string(255), notnull: true, unique: true }
 user_id: { type: integer, notnull:true }
   relations:
 sfGuardUser: { local: user_id, foreign: id }

On Aug 17, 7:33 am, RusAlex  wrote:




schema.yml
RankDomain:
   columns:
 name: { type: string(255), notnull: true, unique: true }
 user_id: { type: integer, notnull:true }
 sfGuardUser: { local: user_id, foreign: id }
$php symfony doctrine:build --all --and-load
and see red Error:
   SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
update a child row: a foreign key constraint fails
(`ranks`.`rank_domain`, CONSTRAINT
`rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
REFERENCES `sf_guard_user` (`id`))
What im doing wrong ?



--
Javi

Ubuntu 8.04

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

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


Re: [symfony-users] Re: How i can implement this with sfGuard plugin

2010-08-17 Thread Gustavo Adrian
In your fixtures check if you are indeed assigning a valid sfGuardUser to
the user_id field of "rank_domain" objects

On Tue, Aug 17, 2010 at 2:12 AM, RusAlex  wrote:

> Can you explain please:
> I've tried to add relation to schema.yml
>
> RankDomain:
>  columns:
>name: { type: string(255), notnull: true, unique: true }
>user_id: { type: integer, notnull:true }
>  relations:
>sfGuardUser: { local: user_id, foreign: id }
>
> But when i type command:
> php symfony doctrine:build --all --and-load
>
> I have an error:
>  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
> update a child row: a foreign key constraint fails
> (`ranks`.`rank_domain`, CONSTRAINT
> `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> REFERENCES `sf_guard_user` (`id`))
>
>
> On Aug 15, 1:28 am, Alan Bem  wrote:
> > Wouldn't it be better?
> >
> > $this->getUser()->getGuardUser()->getJobs()?
> >
> > You just need to add proper relation between sf_guard_user and job
> tables.
> >
> > 2010/8/14 Tom Ptacnik 
> >
> >
> >
> > > Maybe better would be to store the id of the user not the username.
> > > But the principle is right.
> >
> > > And this code of creating the query move to the JobTable class ..
> > > create a method with userId parametter.
> >
> > > On 12 srp, 21:16, RusAlex  wrote:
> > > > I have my own opinion:
> >
> > > > I need to add new field "user" into job table, and use edited actions
> > > > to show:
> >
> > > > class jobActions extends sfActions
> > > > {
> > > >   public function executeIndex(sfWebRequest $request)
> > > >   {
> > > > $this->jobs = Doctrine::getTable('JobeetJob')
> > > >   ->createQuery('a')
> > > >   ->where('a.user = ?' , $this->getUser()->getUsername())
> > > >   ->execute();
> > > >   }
> >
> > > > Is this a right approach for solving my task ?
> >
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it
> to
> > > security at symfony-project.com
> >
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, 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
>

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

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

2010-08-17 Thread Gustavo Adrian
You can add the order type as another parameter to the link (ASC or DESC)
too. Then, at the moment of link generation, you check for the column that
is being used for ordering. In that link you then just change the order type
to the opposite of the actual one (so, if the user is looking at a user list
ordered by username and in ascending mode, you then need to generate a link
on the username column with the DESC order type).

On Tue, Aug 17, 2010 at 1:52 AM, Eno  wrote:

> On Mon, 16 Aug 2010, Parijat Kalia wrote:
>
> > That's exactly what I am trying to explain. Currently what I am doing
> right
> > now is using a select_tag, with options that trigger corresponding
> queries
> > to alter the sort order presented in the page. Any better ideas over how
> > this may be implemented?
>
> Pretty simple really: why dont you use links to trigger actions with the
> relevant sort order? (i.e. the sort order is a parameter that gets passed
> through routing to your action so you simply trigger the same query with
> different SORT paramters). The top of each column in your table becomes a
> link with the sort parameter in the URL...
>
>
>
> --
>
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

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

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


[symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-17 Thread RusAlex
No im sorry i have mistake in pasting. I have a correct relations
RankDomain:
  columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer, notnull:true }
  relations:
sfGuardUser: { local: user_id, foreign: id }

but error still exist

On Aug 17, 11:44 am, Joep Brunsveld  wrote:
> It seems that you forgot the "relations" indentation.
>
> It must be:
> RankDomain:
>   columns:
>     name: { type: string(255), notnull: true, unique: true }
>     user_id: { type: integer, notnull:true }
>   relations:
>     sfGuardUser: { local: user_id, foreign: id }
>
> On Aug 17, 7:33 am, RusAlex  wrote:
>
>
>
> > schema.yml
> > RankDomain:
> >   columns:
> >     name: { type: string(255), notnull: true, unique: true }
> >     user_id: { type: integer, notnull:true }
> >     sfGuardUser: { local: user_id, foreign: id }
>
> > $php symfony doctrine:build --all --and-load
>
> > and see red Error:
> >   SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
> > update a child row: a foreign key constraint fails
> > (`ranks`.`rank_domain`, CONSTRAINT
> > `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> > REFERENCES `sf_guard_user` (`id`))
>
> > What im doing wrong ?

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

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


[symfony-users] Re: Different result on two servers when submitting a form that sends email automatically

2010-08-17 Thread pghoratiu
We encountered something similar with OS version 32 bit vs. 64 bit,
having the same PHP version 5.2.4.
The dev machines use 32 bit OS but staging/prod run on 64 bit and the
problem happened only on the 64 bit machines.

   gabriel

On Aug 17, 10:18 am, El Duderino  wrote:
> The problem was eventually identified to where a type cast was being
> made. The PreProduction server did not have an issue with this but the
> Live server failed when converting the object to a string with
> (string). Solved when __toString() was used instead.
>
> Before:
> $replaceVariables = array('var1' => $Practice->getDateStart(), 'var2'
> => (string)$Practice->getCompleteName());
>
> After:
> $replaceVariables = array('var1' => $Practice->getDateStart(), 'var2'
> => $Practice->getCompleteName()->__toString());
>
> Production runs PHP 5.2.4, PreProduction 5.2.6 and both worked
> correctly with (string) in test cases:
>
>  class Foo {
>     public $name;
>
>     public function __construct($name) {
>         $this->name = $name;
>     }
>
>     public function __toString() {
>         return $this->name;
>     }
>
> }
>
> $foo = new Foo('foobar');
> echo (string)$foo;
> ?>
>
> This isn't something you would expect but there was a solution
> available to deal with it. I'd be very interested to know why the
> Production server behaves in this case.
>
> Thanks

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

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


[symfony-users] created_at gets deleted on edit

2010-08-17 Thread Christopher Schnell
Hi all,

currently, I am facing a strange problem. My created_at and updated_at values 
get deleted when editing an object via its form.

Everything should be straightforward, both fields are in my schema.yml. I 
customize the corresponding Form class via $this->useFields(array(...)), so 
that created_at and updated_at are not used and displayed. But anyway if I 
update the object, both values are set to null.

I user Symfony 1.4.7-DEV (Trunk as svn External) and sfPropel15Plugin.

Did anyone experience such a problem?

Thanks and regards,
Christopher.


Christopher Schnell

MdA Business Communications AG
Unterer Rheinweg 86
4057 Basel
Schweiz

Tel: +41 61 273 44 69
Fax: +41 61 273 44 68


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

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

2010-08-17 Thread catchamonkey
Hi Christian,

The API already exists as is internally managed. It's fully RESTful.
It maintains access for users to a variety of apps et al.

Therefore I can't use OAuth, but maybe I can look at those plugins to
see how they have implemented it.

Cheers,
Chris

On Aug 17, 8:34 am, Christian Schaefer  wrote:
> hi chris,
>
> I would suggest to not reinvent the wheel and look for a solution that
> uses sfguard on the inside and oauth to the outside.
> I haven't tested them myself yet but there are some plugins in that
> area already.
>
> cheers
> /christian
>
> On Aug 16, 5:31 pm, catchamonkey  wrote:
>
>
>
> > Hi all,
>
> > What are your thoughts on implementing an existing ACL which is
> > accessed through an API into symfony 1.4?
> > I would ideally like to use sfGuard and replace the main elements of
> > signin, signout and any permission calls et al.
>
> > Do you think it would be best to start from scratch or build on top of
> > sfGuard(Doctrine)
>
> > Regards,
> > Chris (catchamonkey)

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

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

2010-08-17 Thread Gareth McCumskey
We actually implemented our own ACL system. We used symfony's builtin user
session management features (i.e. $this0>getUser()->setAuthenticated(true)
etc) but not any of sfGuards special functionality because our needs were
too complex.

We also send an authentication request to our ACL server to confirm the user
CAN login and if he can return a list of his permitted module/action
pairings.

Once the calling app has this list back from the rest request we persist it
into the users session ($this->getUser()->setAttribute('acl', $acl_array);
). Then we created a filter that on each request for a specific
module/action will compare it to the users ACL list in session and if
matches will then allow execution to continue.

In addition we implemented a post filter (within the same filter) that
searches for specific HTML comment strings in order to control what the user
is allowed to SEE on the rendered page. No point in showing a link to a
module/action that he is not allowed to perform. Our view would like this
for example:





So the post filter will see the line starting with " If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

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

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


[symfony-users] Re: How i can implement this with sfGuard plugin

2010-08-17 Thread RusAlex
Can you explain please:
I've tried to add relation to schema.yml

RankDomain:
  columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer, notnull:true }
  relations:
sfGuardUser: { local: user_id, foreign: id }

But when i type command:
php symfony doctrine:build --all --and-load

I have an error:
  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
update a child row: a foreign key constraint fails
(`ranks`.`rank_domain`, CONSTRAINT
`rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
REFERENCES `sf_guard_user` (`id`))


On Aug 15, 1:28 am, Alan Bem  wrote:
> Wouldn't it be better?
>
> $this->getUser()->getGuardUser()->getJobs()?
>
> You just need to add proper relation between sf_guard_user and job tables.
>
> 2010/8/14 Tom Ptacnik 
>
>
>
> > Maybe better would be to store the id of the user not the username.
> > But the principle is right.
>
> > And this code of creating the query move to the JobTable class ..
> > create a method with userId parametter.
>
> > On 12 srp, 21:16, RusAlex  wrote:
> > > I have my own opinion:
>
> > > I need to add new field "user" into job table, and use edited actions
> > > to show:
>
> > > class jobActions extends sfActions
> > > {
> > >   public function executeIndex(sfWebRequest $request)
> > >   {
> > >     $this->jobs = Doctrine::getTable('JobeetJob')
> > >       ->createQuery('a')
> > >       ->where('a.user = ?' , $this->getUser()->getUsername())
> > >       ->execute();
> > >   }
>
> > > Is this a right approach for solving my task ?
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

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

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


[symfony-users] IS there any manual to correct unit test system for integrating with sfGuard auth symfony?

2010-08-17 Thread RusAlex
I've installed sfGuard plugin and now most of old tests didn't work
well. They need to be authenticated to the frontend system. Is there
any official decision ?

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

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


[symfony-users] Re: trying to make a relation with sfGuardUser and got error

2010-08-17 Thread Joep Brunsveld
It seems that you forgot the "relations" indentation.

It must be:
RankDomain:
  columns:
name: { type: string(255), notnull: true, unique: true }
user_id: { type: integer, notnull:true }
  relations:
sfGuardUser: { local: user_id, foreign: id }


On Aug 17, 7:33 am, RusAlex  wrote:
> schema.yml
> RankDomain:
>   columns:
>     name: { type: string(255), notnull: true, unique: true }
>     user_id: { type: integer, notnull:true }
>     sfGuardUser: { local: user_id, foreign: id }
>
> $php symfony doctrine:build --all --and-load
>
> and see red Error:
>   SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
> update a child row: a foreign key constraint fails
> (`ranks`.`rank_domain`, CONSTRAINT
> `rank_domain_user_id_sf_guard_user_id` FOREIGN KEY (`user_id`)
> REFERENCES `sf_guard_user` (`id`))
>
> What im doing wrong ?

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

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


[symfony-users] Re: Implementing an existing ACL API in symfony

2010-08-17 Thread Christian Schaefer
hi chris,

I would suggest to not reinvent the wheel and look for a solution that
uses sfguard on the inside and oauth to the outside.
I haven't tested them myself yet but there are some plugins in that
area already.

cheers
/christian

On Aug 16, 5:31 pm, catchamonkey  wrote:
> Hi all,
>
> What are your thoughts on implementing an existing ACL which is
> accessed through an API into symfony 1.4?
> I would ideally like to use sfGuard and replace the main elements of
> signin, signout and any permission calls et al.
>
> Do you think it would be best to start from scratch or build on top of
> sfGuard(Doctrine)
>
> Regards,
> Chris (catchamonkey)

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email 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: Different result on two servers when submitting a form that sends email automatically

2010-08-17 Thread El Duderino
The problem was eventually identified to where a type cast was being
made. The PreProduction server did not have an issue with this but the
Live server failed when converting the object to a string with
(string). Solved when __toString() was used instead.

Before:
$replaceVariables = array('var1' => $Practice->getDateStart(), 'var2'
=> (string)$Practice->getCompleteName());

After:
$replaceVariables = array('var1' => $Practice->getDateStart(), 'var2'
=> $Practice->getCompleteName()->__toString());

Production runs PHP 5.2.4, PreProduction 5.2.6 and both worked
correctly with (string) in test cases:

name = $name;
}

public function __toString() {
return $this->name;
}
}

$foo = new Foo('foobar');
echo (string)$foo;
?>

This isn't something you would expect but there was a solution
available to deal with it. I'd be very interested to know why the
Production server behaves in this case.

Thanks

On 12 ago, 23:04, Alexandre Salomé  wrote:
>   Must be a strange behavior from your HTTP server installation.
>
> Try with another server, that you are sure it is configured correctly.
> Maybe a strange behavior from your mail server.
>
> Try debugging, with simple tests :
>
>     * Disable mail sending
>     * Compare the HTTP responses of each installation (diff)
>     * Try some simple tests, out of your application : HTTP Redirection,
>       HTTP Header modifications, etc.
>
> And give us feedback ;)
>
> Le 12/08/10 11:32, El Duderino a �crit :
>
>
>
>
>
> > The project I am working on is using Symfony 1.4 and the backend has a
> > number of forms that when the data is changed and the form submitted,
> > the user in question is notified by email.
>
> > On our development server all goes fine, the page redirects back to '/
> > page-you-are-on/15/edit' and the email has arrived.
>
> > On the PreProduction server though, with the company that will host
> > the site when it goes live, when you submit the form, it sends the
> > email but instead of returning to '/page-you-are-on/15/edit' with a
> > Flash confirmation message, the page goes to '/page-you-are-on' with
> > this error message:
>
> > 'The page is not available
> > It is possible that the web pagehttp://www.projectsite.com/page-you-are-on
> > is temporarily inactive or has been moved to a different address.
>
> > More information - Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error'
>
> > The site uses PHPMailer (BLSysEmail.class.php) to send the email.
>
> > It appears the PreProduction server is returning the wrong header but
> > any help on why this is happening and how to resolve it would be much
> > appreciated.
>
> > Thanks!
>
> --
> ---
> Alexandre Salom� -http://alexandre.salome.fr

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

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