[symfony-users] Re: sfDoctrineGuardPlugin - error in handling own generator.yml for sfGuardUser

2010-03-04 Thread Tom Ptacnik
Oh, but this $display array looks like this:
array(4) { [0]=>  string(8) "username" [1]=>  string(9)
"is_active" [2]=>  string(11) "groups_list" [3]=>  string(16)
"permissions_list" }

so I have to unset permissions_list by unset($display[3]);

Or better find the "permissions_list" value somehow and then unset it
by it's key.


On 4 bře, 10:14, Daniel Lohse  wrote:
> There is another way. It's one that does not involve these "hacky" things.
>
> Simply copy the sfGuardUserGeneratorConfiguration.class.php to your 
> apps/backend/modules/sfGuardUser/lib/ folder and add the following code:
>
> public function getFilterDisplay()
> {
>   $display = parent::getFilterDisplay();
>   unset($display['permissions_list']);
>
>   return $display;
>
> }
>
> Then copy the actions.class.php of the sfGuardUser module to 
> apps/backend/modules/sfGuardUser/actions/ and change the include like so:
>
> require_once 
> dirname(__FILE__).'/../lib/sfGuardUserGeneratorConfiguration.class.php';
>
> I know it's a bit involving. But: you don't lose anything by doing it this 
> way, you can upgrade the plugin, it stays extensible and this way is not 
> hacky in any way. :)
>
> Cheers, Daniel
>
> On 04.03.2010, at 09:56, Tom Ptacnik wrote:
>
>
>
> > I found a solution, not nice, but it's simple and it works for me
>
> > filter:
> >        display: [username, is_active, is_active, is_active]
>
> > It somehow overwrites the array of the original generator.yml, and the
> > is_active is showed only once.
>
> > On 4 bře, 09:52, Tom Ptacnik  wrote:
> >> Hi,
>
> >> I have problem with customizing the generator of the sfGuardUser. I
> >> want to remove the permissions_list from the filter form.
>
> >> I've copied the generator.yml file from the plugin folder to my apps/
> >> backend/modules/sfGuardUser/config/generator.yml
>
> >> If I siply remove the permissions_list from the generator filter
> >> settings nothing happen...
>
> >> original:
> >> filter:
> >>         display: [username, is_active, groups_list, permissions_list]
>
> >> my change:
> >> filter:
> >>         display: [username, is_active, groups_list]
>
> >> Do you have some solution? Thank you.
>
> >> I found that others have problem with that to and the only know
> >> solution is dirty - remove the original generator.yml from the plugin
> >> folder
>
> >> related ticket, topic:
> >>  http://trac.symfony-project.org/ticket/8139
> >>  http://forum.symfony-project.org/index.php/m/43279/
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, 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: sfDoctrineGuardPlugin - error in handling own generator.yml for sfGuardUser

2010-03-04 Thread Tom Ptacnik
I already have sfGuardUserGeneratorConfiguration.class.php in my
application, so adding this function to it is exactly what i
needed :-)
I like this solution.

Thank you very much.


On 4 bře, 10:14, Daniel Lohse  wrote:
> There is another way. It's one that does not involve these "hacky" things.
>
> Simply copy the sfGuardUserGeneratorConfiguration.class.php to your 
> apps/backend/modules/sfGuardUser/lib/ folder and add the following code:
>
> public function getFilterDisplay()
> {
>   $display = parent::getFilterDisplay();
>   unset($display['permissions_list']);
>
>   return $display;
>
> }
>
> Then copy the actions.class.php of the sfGuardUser module to 
> apps/backend/modules/sfGuardUser/actions/ and change the include like so:
>
> require_once 
> dirname(__FILE__).'/../lib/sfGuardUserGeneratorConfiguration.class.php';
>
> I know it's a bit involving. But: you don't lose anything by doing it this 
> way, you can upgrade the plugin, it stays extensible and this way is not 
> hacky in any way. :)
>
> Cheers, Daniel
>
> On 04.03.2010, at 09:56, Tom Ptacnik wrote:
>
>
>
> > I found a solution, not nice, but it's simple and it works for me
>
> > filter:
> >        display: [username, is_active, is_active, is_active]
>
> > It somehow overwrites the array of the original generator.yml, and the
> > is_active is showed only once.
>
> > On 4 bře, 09:52, Tom Ptacnik  wrote:
> >> Hi,
>
> >> I have problem with customizing the generator of the sfGuardUser. I
> >> want to remove the permissions_list from the filter form.
>
> >> I've copied the generator.yml file from the plugin folder to my apps/
> >> backend/modules/sfGuardUser/config/generator.yml
>
> >> If I siply remove the permissions_list from the generator filter
> >> settings nothing happen...
>
> >> original:
> >> filter:
> >>         display: [username, is_active, groups_list, permissions_list]
>
> >> my change:
> >> filter:
> >>         display: [username, is_active, groups_list]
>
> >> Do you have some solution? Thank you.
>
> >> I found that others have problem with that to and the only know
> >> solution is dirty - remove the original generator.yml from the plugin
> >> folder
>
> >> related ticket, topic:
> >>  http://trac.symfony-project.org/ticket/8139
> >>  http://forum.symfony-project.org/index.php/m/43279/
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

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

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


[symfony-users] Re: How to customize the save process of many-to-many relation in symfony form framework?

2010-03-04 Thread Tom Ptacnik
I'm not good at doctrine at all, but I think that i you don't know how
to write this in DQL (Doctrine Query Language) there is a way how to
write pure SQL and execute it


On 4 bře, 08:58, SymfonyNewbie  wrote:
> You are right,I'm using doctrine.
>
> Looking for information how it deals with dml like "insert .. on
> duplicate key update"..
>
> On 3月4日, 下午2时38分, Tom Ptacnik  wrote:
>
>
>
> > It depends on which ORM do you use.. Propel or Doctrine?
>
> > I think this is more about ORM than symfony...
>
> > On 3 bře, 13:07, SymfonyNewbie  wrote:
>
> > > The relation between posts and tags is n2m,
>
> > > the pure mysql solution is like this:
>
> > >     $dml = "insert into tags(name) value('$name') on duplicate key
> > > upadte count=count+1";
> > >     mysql_query($dml);
> > >     $dml = "insert into tagowner(post,tag) value($postid,$tagid)";
> > >     mysql_query($dml);
>
> > > How to do similar things in symfony?- 隐藏被引用文字 -
>
> > - 显示引用的文字 -

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

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


Re: [symfony-users] Facebook Connect & added auth_token

2010-03-04 Thread Frank Stelzer

Hi,
I wrote a complete fb application and had a similar problem. The  
problem was that the fb requests lost the session in the sf app all  
the time. The fb requests do not support cookies and so the normal  
session storage does not work.


In my case, I worked with a special session storage activated in the  
factories.yml:



class FacebookSessionStorage extends sfSessionStorage
{
  public function initialize($options = null)
  {
if(!$options)
{
  $options = array();
}

$options['session_id'] = preg_replace("/[^A-Za-z0-9-]/","",  
sfFacebook::getFacebookClient()->api_client->session_key);

$options['auto_start'] = true;

return parent::initialize($options);
  }
}


Maybe that helps in your case, too!

Frank


Am 05.03.2010 um 01:30 schrieb Don_Busi:


Hi everybody,

I'm implementing a Facebook Connect application with Symfony and the
sfFacebookConnectPlugin.

For some strange reason for every page that uses the Facebook PHP-
Client the page first get's delivered as requested and then it is
redirected to the same url with  "?&auth_token=fcb52bab75---some-
token--3d0c8e8" appended at the end.

This means that every requested page get's loaded twice and that forms
for some reason don't work anymore.

Does anyone have a clue what is wrong with my app?

Thanx for you help in advance,
Don.

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


You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: problems with embedRelation with a self related m:n

2010-03-04 Thread Tom Ptacnik
Maybe it's only a typo here, but in relation definition in the Person
table you have "foreign: related" and it should be "foreign:
relatedId"


Or maybe the problem is that if you have M:N relation, you have schema
like this:

Table1
...
 relation:
  local: id1
  foreign: id2
  ...

Table2
...
 relation:
   local: id2
   foreign: id1

Table12
..

But you have only Table1 and the relation definition has always
local:id1 and never comes to the object where local is id2 - even if
it's a related object... maybe this can couse trables

In this case the Nest relations can be the solution.


I don't know, maybe my reflection is bad, or maybe nobody will
uderstand me :-)


On 3 bře, 20:56, axel at  wrote:
> I have a list of persons, and an m:n relation that relates one person
> with several other persons:
>
> Person:
>   columns:
>     id
>       type: integer(4)
>       primary: true
>     name: string(255)
>   relations:
>     # m:n Person2Person
>   Person:
>       class: Person
>       refClass: Person2Person
>       local: id
>       foreign: related
>       foreignAlias: contactPerson
>
> # m:n
> Person2Person:
>   columns:
>     id:
>       type: integer(4)
>       primary: true
>     relatedId:
>       type: integer(4)
>       primary: true
>   relations:
>     Person:
>       class: Person
>       local: relatedId
>       foreign: id
>     Person2:
>       class: Person
>       local: id
>       foreign: id
>
> in the PersonFrom class i use
> $this->embedRelation('RelatedPersons', "myRelatedPersonForm");
>
> everything works fine:
> symfony embedds 1 to n related person forms into the main person form
> also updates work fine
>
> the problem ist following:
> each time saving the form symfony commits a query like:
>
> update person2person set id = 100 where (id=200 and relatedId=100)
>
> (200 is the id of the main form and 100 the "relatedId")
>
> and of course this destroys the realation.
>
> any idea whats wrong and why this happens?

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

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

2010-03-04 Thread Tarjei Huse
Hi,
On 03/04/2010 09:16 AM, Alexandru-Emil Lupu wrote:
> HI!
> Well is a Unit after all.

The reason I asked was because tasks like actions connect to a lot of
different symfony services (templating , the dispatcher , the mailer
etc). What I ended up doing was the following:

getParameters();
$this->msgs[]= $params[0];
  }
}

$plan = 6;
$t = new lime_test($plan);


$formatter = new sfFormatter(80);
$dispatcher = new sfEventDispatcher;
$logger = new ofSimpleLogger;
$dispatcher->connect('command.log', array($logger, "log"));

$task = new events_runTask($dispatcher, $formatter);
$task->setConfiguration($configuration);

I also created a method doTestRun in my task that called execute() on
the Task, but you could also try doing this by calling
$task->run($arguments, $options);

Regards,
Tarjei

> Alecs
>
> On Thu, Mar 4, 2010 at 10:07 AM, Tarjei Huse  > wrote:
>
> Hi,
>
> I might have missed something, but does symfony have a way to write
> tests for tasks?
>
> I got a task I would like to have test coverage for and the best way
> seems to be do some kind of functional testing on it.
>
> Kind regards,
> Tarjei
>
> --
> Regards / Med vennlig hilsen
> Tarjei Huse
> Mobil: 920 63 413
>
> --
> If you want to report a vulnerability issue on symfony, please
> send it to security at symfony-project.com
> 
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to
> symfony-users@googlegroups.com 
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> 
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>
>
>
>
> -- 
> Have a nice day!
>
> Alecs
> Certified ScrumMaster
>
> There are no cannibals alive! I have ate the last one yesterday ...  
> 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)0722 621 280
>
> -- 
> If you want to report a vulnerability issue on symfony, please send it
> to security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en


-- 
Regards / Med vennlig hilsen
Tarjei Huse
Mobil: 920 63 413

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

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

2010-03-04 Thread Frank Stelzer

Hi,
You may have a look at sfPHPUnit2Plugin:
http://www.symfony-project.org/plugins/sfPHPUnit2Plugin

It's written for sf 1.4.X.

Frank

Am 20.02.2010 um 20:50 schrieb Stéphane:


Hi list,

Does someone use this plugin with symfony 1.4.2 ?

Thanks,



Salut,

Est-ce que quelqu'un utilise ce plugin avec symfony 1.4.2 ?

Merci,

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

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


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

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

2010-03-04 Thread Gareth McCumskey
In your view in the header cell:

 

In your action:

$this->data = TablePeer::getData($parameters, $request->getParameter('sort'));

In your model for class TablePeer:

public static function getData($parameters, $sort_by)
{
  $c = new Criteria();
  //Set all criteria that needs setting
  $c->addAscendingOrderByColumn(self::$sort_by);
  $results = self::doSelect($c);

  return $results;
}


see? Easy! :)
On Thu, Mar 4, 2010 at 5:46 PM, ziclo  wrote:
> Does anyone has a tutorial about that ? The backend is usefull but a
> good tutorial would be appreciate in order to be able to do that kind
> of common functionnalities.
>
> Tnak you
>
> On 18 fév, 11:16, ziclo  wrote:
>> Hello,
>>
>> That what i'm going to do. Thank you
>>
>> On 18 fév, 09:12, Gareth McCumskey  wrote:
>>
>> > Why not just implement it yourself? You don't need to have everything
>> > pre-written for it. Simply make the column heading a link pointing to
>> > an action that re-runs the query with the correct ORDER BY sql in
>> > it
>>
>> > On Sat, Feb 13, 2010 at 3:55 PM, ziclo  wrote:
>> > > Hi,
>>
>> > > I would like to be able to sort (order by ASC ou DESC) by clicking on
>> > > a colon title (th). The same way as the backend of the jobeet
>> > > tutorial.
>> > > I don't want it on the backend but on the frontend.
>>
>> > > With doctrine i can use the pager without difficulties but i do not
>> > > know how to sort a list (result of a query) by a simple click on the
>> > > title of a colonn.
>>
>> > > Does a tutorial exists about that ?
>>
>> > > Thank you.
>>
>> > > Ziclo
>>
>> > > --
>> > > You received this message because you are subscribed to the Google 
>> > > Groups "symfony users" group.
>> > > To post to this group, send email to symfony-us...@googlegroups.com.
>> > > To unsubscribe from this group, send email to 
>> > > symfony-users+unsubscr...@googlegroups.com.
>> > > For more options, visit this group 
>> > > athttp://groups.google.com/group/symfony-users?hl=en.
>>
>> > --
>> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
>> > twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



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

2010-03-04 Thread godbout
Hi Florian!

Thx for the help.
Yah, you're right, I meant 'generate-migrations-diff'. Was a bit tired
from the day probably :-p
Yah, also I got the flow. Actually I think I've found why it didn't
work, there's an error in the yml file (found when I've tried to build
the classes anyway).

But it still very blur on the generate-migrations-db and generate-
migrations-models. Is there any comparison made between the db and the
yml? Or it is just taking db, or the model, and produce a pile of file
that just helps you to re-create the db?

Guill


On Mar 5, 4:39 am, Florian  wrote:
> hi,
>
> you surely wanted to say 'generate-migrations-diff' in your third
> try ?
>
> The "doctrine:generate-migrations-diff" task calculates the difference
> between your model classes and the yml schema.
>
> So when you want to modify your model, do this in *this exact order* :
>
>  - make sure your model is up to date before modifying your schema by
> calling: "php symfony doctrine:build --all-classes --sql"
>  - modify your schema.yml with whatever you want
>  - run "php symfony doctrine:generate-migrations-diff"
>  - look at your lib/migration/doctrine folder if everything gone fine
>
> If you build your model before calling "doctrine:generate-migrations-
> diff", doctrine won't know what has changed and will do nothing.
>
> Hope it helps!
>
> Florian
>
> On 4 mar, 14:38, godbout  wrote:
>
>
>
> > Hi guys.
>
> > I want to use the symfony tasks for the doctrine migration but I can't
> > find any consistent piece of information.
>
> > I read this:
> > -http://www.doctrine-project.org/documentation/manual/1_2/en/migrations
> > and this:
> > -http://www.symfony-project.org/reference/1_4/en/16-Tasks#chapter_16_s...
> > and I've watched these slides:
> > -http://www.slideshare.net/weaverryan/the-art-of-doctrine-migrations
> > and those ones:
> > -http://www.slideshare.net/denderello/symfony-live-2010-using-doctrine...
>
> > Sometimes it says that the generate-migrations-db will make a
> > comparison between the db and the schema.yml and generate the classes,
> > sometimes it says that it will just take the db and make the classes.
> > I don't see the point of the second information, but this is what
> > happens for me. Whatever is in the schema.yml is not taken in
> > consideration, and I end up with migration classes that just create
> > the same db that I have and not the updates from my yml files.
>
> > Same thing for generate-migrations-models. My models are the same than
> > the db, but not than the yml files. But whatever, the migration
> > classes just a copy of the model and doesn't pay attention to the yml
> > files.
>
> > I've tried the last one: generate-migrations-models. According to some
> > of the links it actually does the difference between the yml files and
> > the model (well, on some other links it's the definition of the
> > generate-migrations-models function, so I don't get it...). I can't
> > really see the model because it lamentably failed with a ToPrfx...
> > something class not found.
>
> > Anybody to lighten me up on that?
>
> > Cheers in advance,
> > Guill

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

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


[symfony-users] Re: Having horrible time with forms.

2010-03-04 Thread Darren884
I apologize if I get frustrated guys, I have been extensively looking
through them today and think I may have found the solution.

On Mar 4, 3:17 pm, Eno  wrote:
> On Thu, 4 Mar 2010, Darren884 wrote:
> > These forms will simply not work. They keep resetting my record id to
> > 0.
>
> It would help if you provided the source of the page when doing an update
> so we can see what the form looks like. "Form go boom-boom" is not an
> error message and without sufficient precise data, we can't really help
> much.
>
> You could also help yourself by reading up on using forms - they are not
> very difficult to understand but they *do* you to do *some* work if you
> want to do something more than what the generators give you by default -
> usually that means overriding a method in your form class somewhere.
>
> --

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

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

2010-03-04 Thread Don_Busi
Hi everybody,

I'm implementing a Facebook Connect application with Symfony and the
sfFacebookConnectPlugin.

For some strange reason for every page that uses the Facebook PHP-
Client the page first get's delivered as requested and then it is
redirected to the same url with  "?&auth_token=fcb52bab75---some-
token--3d0c8e8" appended at the end.

This means that every requested page get's loaded twice and that forms
for some reason don't work anymore.

Does anyone have a clue what is wrong with my app?

Thanx for you help in advance,
Don.

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

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

2010-03-04 Thread Eno
On Thu, 4 Mar 2010, Darren884 wrote:

> Hi guys, I have used generate:module to generate a CRUD module,
> however it does not have getForm() in it like my admin generated
> section. How would I accomodate this?
>
> I am getting my form like:
> $this->form = new CustomerForm($customer);

Correct if you editing an existing record.

For database insertions (i.e. "new" action) you would do something like

$this->form = new CustomerForm();

(i.e. no customer object is passed in because you're making a new one).

> But how can I do it like I am in my other by calling getForm()? I need
> to use the getForm method and pass options to my form.

You dont need a getForm() method to use forms :-) If you look at what 
getForm() does you will get the general idea.



-- 


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

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


Re: [symfony-users] Re: Having horrible time with forms.

2010-03-04 Thread Eno
On Thu, 4 Mar 2010, Darren884 wrote:

> These forms will simply not work. They keep resetting my record id to
> 0.

It would help if you provided the source of the page when doing an update 
so we can see what the form looks like. "Form go boom-boom" is not an 
error message and without sufficient precise data, we can't really help 
much.

You could also help yourself by reading up on using forms - they are not 
very difficult to understand but they *do* you to do *some* work if you 
want to do something more than what the generators give you by default - 
usually that means overriding a method in your form class somewhere.



-- 


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

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


[symfony-users] I18N for a Symfony plugin

2010-03-04 Thread Tom Boutell
I've been working on internationalization for apostrophePlugin. I've
succeeded in adding __() calls as needed for a large portion of it,
but it turns out that extracting all of the candidate strings for
translation to a reasonable XLIFF file is not trivial. The
extract:i18n task only looks at applications, it seems to have no
capability to look in a plugin.

Any experiences out there with more complete tools for this?

Thanks!

-- 
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

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

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

2010-03-04 Thread Darren884
These forms will simply not work. They keep resetting my record id to
0.

On Mar 4, 2:38 pm, Darren884  wrote:
> I am doing that and it is still giving me the error.
>
> On Mar 4, 12:00 pm, Richtermeister  wrote:
>
> > Hey Darren,
>
> > when you use a form to update a record, make sure you pass the record
> > into the form at creation time,
> > for example:
>
> > $customer = CustomerPeer::retrieveByPk(123123);
> > $this -> form = new CustomerForm($customer);
>
> > this way the form knows that even if the email is already in the
> > system, if it's owned by this customer, it's not a duplicate.
> > Hope this helps.
>
> > Daniel
>
> > On Mar 4, 10:19 am, Darren884  wrote:
>
> > > Heres the deal, I created an admin generated form in my backend, and I
> > > am able to edit my customers easily. However when I try to make a form
> > > on the main site for them to update their date I simply cannot do it.
> > > The form system makes it so when I try to use the previous form class
> > > its impossible to save their data because I have a unique email
> > > validator and whenever they try to save it they can't. What should I
> > > do? Should I just do validation the old fashioned way? Why is Symfony
> > > like this? Why can't I make it as easy as just letting someone update
> > > their information? Please someone help I am stuck on this.

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

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


[symfony-users] Re: Having horrible time with forms.

2010-03-04 Thread Darren884
I am doing that and it is still giving me the error.

On Mar 4, 12:00 pm, Richtermeister  wrote:
> Hey Darren,
>
> when you use a form to update a record, make sure you pass the record
> into the form at creation time,
> for example:
>
> $customer = CustomerPeer::retrieveByPk(123123);
> $this -> form = new CustomerForm($customer);
>
> this way the form knows that even if the email is already in the
> system, if it's owned by this customer, it's not a duplicate.
> Hope this helps.
>
> Daniel
>
> On Mar 4, 10:19 am, Darren884  wrote:
>
> > Heres the deal, I created an admin generated form in my backend, and I
> > am able to edit my customers easily. However when I try to make a form
> > on the main site for them to update their date I simply cannot do it.
> > The form system makes it so when I try to use the previous form class
> > its impossible to save their data because I have a unique email
> > validator and whenever they try to save it they can't. What should I
> > do? Should I just do validation the old fashioned way? Why is Symfony
> > like this? Why can't I make it as easy as just letting someone update
> > their information? Please someone help I am stuck on this.

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

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


[symfony-users] Re: sfJqueryReloaded Plugin in Symfony 1.4

2010-03-04 Thread Antoine S.
Hi,

1. By default only Partial and Cache Helpers are include
You load what you need ..

2. It s not really about accessing helper from a form, but
I think that the JQueryHelper is to generate html and js code.
So anything about final rendering should be in your template,
especially for javascript.
Then if you write WidgetForm you might have some js in the render(),
and it s fine.



On Mar 5, 2:12 am, ScherlOMatic  wrote:
> Hello!
>
> Thanks for your reply, but none of your solutions worked for me. By
> the way the sfLoader is deprecated and was removed since symfony
> version 1.4.
>
> I found the sfContext::getInstance()->getConfiguration()-
>
> >loadHelpers() method which works perfectly.
>
> Two questions remaing:
> 1) How does it come that standard_helpers in settings.yml are not
> beeing correctly loaded in forms or actions?
> 2) What's the problem with accessing helpers in the form method?
>
> Thx
>
> On 4 Mrz., 03:05, "Antoine S."  wrote:
>
> > it should be :
> > use_helper('IDontKnowTheName');
>
> > or in settings.yml :
> >     standard_helpers:       [Partial, Cache, I18N, IDontKnowTheName]
>
> > to be able to access from a template.
>
> > You should not access from a form.
> > (If you have too .. you could use sfLoader::loadHelpers() to load the
> > helper)
>
> > On Mar 4, 1:11 pm, ScherlOMatic  wrote:
>
> > > Hello!
>
> > > Unfortunately I'm having a minor problem with this plugin.
>
> > > I installed it with the "plugin:install" command, did "publish-assets"
> > > and everything went fine. It has been enabled in my
> > > ProjectConfiguration and the web dir has also been created
> > > successfully.
>
> > > Now I'm calling one of the helper functions within one of my form
> > > classes which gives me an error.
> > > "Fatal error: Call to undefined function jq_link_to_remote() in ..."
>
> > > I also tried to ask Google for this error code, but without success.
>
> > > Hope somebody could give me a hint, where to enable/load the
> > > jqueryreloaded functions.
>
> > > Thx and good night Stefan

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

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


[symfony-users] Re: symfony and doctrine migrations - who to believe?

2010-03-04 Thread Florian

hi,

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

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

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

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

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

Hope it helps!

Florian

On 4 mar, 14:38, godbout  wrote:
> Hi guys.
>
> I want to use the symfony tasks for the doctrine migration but I can't
> find any consistent piece of information.
>
> I read this:
> -http://www.doctrine-project.org/documentation/manual/1_2/en/migrations
> and this:
> -http://www.symfony-project.org/reference/1_4/en/16-Tasks#chapter_16_s...
> and I've watched these slides:
> -http://www.slideshare.net/weaverryan/the-art-of-doctrine-migrations
> and those ones:
> -http://www.slideshare.net/denderello/symfony-live-2010-using-doctrine...
>
> Sometimes it says that the generate-migrations-db will make a
> comparison between the db and the schema.yml and generate the classes,
> sometimes it says that it will just take the db and make the classes.
> I don't see the point of the second information, but this is what
> happens for me. Whatever is in the schema.yml is not taken in
> consideration, and I end up with migration classes that just create
> the same db that I have and not the updates from my yml files.
>
> Same thing for generate-migrations-models. My models are the same than
> the db, but not than the yml files. But whatever, the migration
> classes just a copy of the model and doesn't pay attention to the yml
> files.
>
> I've tried the last one: generate-migrations-models. According to some
> of the links it actually does the difference between the yml files and
> the model (well, on some other links it's the definition of the
> generate-migrations-models function, so I don't get it...). I can't
> really see the model because it lamentably failed with a ToPrfx...
> something class not found.
>
> Anybody to lighten me up on that?
>
> Cheers in advance,
> Guill

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

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


[symfony-users] Re: Adding a validator to a Doctrine Form

2010-03-04 Thread HiDDeN
Thanks!

On 4 mar, 18:22, Gábor Fási  wrote:
>   $this->validatorSchema['email'] = new sfValidatorAnd(array(
>     $this->validatorSchema['email'],
>     new sfValidatorEmail(),
>   ));
>
>
>
> On Thu, Mar 4, 2010 at 17:56, HiDDeN  wrote:
> > I defined validators to my Doctrine model, so it generated automatic
> > validators (such as maxlength, required, etc).
>
> > Now I would like to add a validator directly in my form, but without
> > losing the ones defined by Doctrine, is this possible? How could I
> > achieve it?
>
> > 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


[symfony-users] Re: getForm() in a regular module?

2010-03-04 Thread Richtermeister
Hey Darren,

just look at what the getForm method is doing internally and mimic the
behavior in your code.

Daniel


On Mar 4, 9:06 am, Darren884  wrote:
> Hi guys, I have used generate:module to generate a CRUD module,
> however it does not have getForm() in it like my admin generated
> section. How would I accomodate this?
>
> I am getting my form like:
> $this->form = new CustomerForm($customer);
>
> But how can I do it like I am in my other by calling getForm()? I need
> to use the getForm method and pass options to my form.

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

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

2010-03-04 Thread Richtermeister
Hey Darren,

when you use a form to update a record, make sure you pass the record
into the form at creation time,
for example:

$customer = CustomerPeer::retrieveByPk(123123);
$this -> form = new CustomerForm($customer);

this way the form knows that even if the email is already in the
system, if it's owned by this customer, it's not a duplicate.
Hope this helps.

Daniel



On Mar 4, 10:19 am, Darren884  wrote:
> Heres the deal, I created an admin generated form in my backend, and I
> am able to edit my customers easily. However when I try to make a form
> on the main site for them to update their date I simply cannot do it.
> The form system makes it so when I try to use the previous form class
> its impossible to save their data because I have a unique email
> validator and whenever they try to save it they can't. What should I
> do? Should I just do validation the old fashioned way? Why is Symfony
> like this? Why can't I make it as easy as just letting someone update
> their information? Please someone help I am stuck on this.

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

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


Re: [symfony-users] You must pass a valid path to a directory containing Doctrine models

2010-03-04 Thread Eno
On Thu, 4 Mar 2010, Bill P. wrote:

> I am trying to setup a new project using NetBeans and this tutorial: 
> http://wiki.netbeans.org/NB68symfony 
> 
> It is using propel, but I am setup with Doctrine. 
> Everything seems to be setup correctly, but when I am trying to insert-sql, I 
> get this error; 
> 
> You must pass a valid path to a directory containing Doctrine models 
> 
> and no table are created. 
> 
> What am I missing? 

Use the source Luke.

Looking at the source for that task, I see it looks for models_path in 
your config:

  protected function execute($arguments = array(), $options = array())
  {
$this->logSection('doctrine', 'created tables successfully');

$databaseManager = new sfDatabaseManager($this->configuration);
$config = $this->getCliConfig();

Doctrine_Core::loadModels($config['models_path'], 
Doctrine_Core::MODEL_LOADING_CONSERVATIVE);

Doctrine_Core::createTablesFromArray(Doctrine_Core::getLoadedModels());
  }


Im guessing loadModels never gets a valid path. Furthermore the array of 
config values comes through getCliConfig() which in turn pulls it from the 
plugin config:

  public function getCliConfig()
  {
return 
$this->configuration->getPluginConfiguration('sfDoctrinePlugin')->getCliConfig();
  }


So this probably should be in coming from your sfProjectConfiguration 
class. Do you have the Doctrine plugin enabled and Propel disabled in your 
project config?



-- 


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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] You must pass a valid path to a directory containing Doctrine models

2010-03-04 Thread Bill P.
(not sure if i posted this correctly last time)

Hello, 

I am trying to setup a new project using NetBeans and this tutorial: 
http://wiki.netbeans.org/NB68symfony 

It is using propel, but I am setup with Doctrine. 
Everything seems to be setup correctly, but when I am trying to insert-sql, I 
get this error; 

You must pass a valid path to a directory containing Doctrine models 


and no table are created. 

What am I missing? 
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: ideas for development architecture in symfony

2010-03-04 Thread Joshua
Thanks but Apostrophe still doesn't do it for me.

I'm looking for specific code implementation suggestions from
developers.

On Mar 4, 1:50 am, Alexandru-Emil Lupu  wrote:
> Apostrophe is symfony based 
>
>
>
> On Thu, Mar 4, 2010 at 7:11 AM, Joshua  wrote:
> > Thanks daniel. There are a lot of CMS' that use similar approaches,
> > but specifically looking for a symfony one.
>
> > On Mar 3, 4:53 pm, Daniel Lohse  wrote:
> > > This sounds a lot like Apostrophe's architecture! Seehttp://
> >www.apostrophenow.com/
>
> > > Daniel
>
> > > On 03.03.2010, at 21:13, Joshua wrote:
>
> > > > I'm working on the following architecture for a site running symfony.
> > > > Seeking ideas and input for the best way this might be implemented on
> > > > a symfony platform.
>
> > > > Blocks
> > > >    * Right now I am using the name block for lack of available
> > > > nomenclature. You could also refer to these as modules, widgets,
> > > > content areas, etc.
> > > >    * A block can be any independent entity assigned to "pages" in the
> > > > frontend. If you go to education.com (as an example, not the site I'm
> > > > developing), "Science Fair Ideas and Help" would be a block, "Featured
> > > > Topics" would be a block, a chunk of html or ads can be made blocks.
> > > >    * Blocks would be developed separately of other blocks. There
> > > > would be some sort of class of all the available blocks which pull in
> > > > the necessary db data, construct and return its individual html
> > > > segment.
> > > >    * In the admin, blocks would be given properties such as order,
> > > > active/visible, etc.
>
> > > > Zones
> > > >    * Each page would also be assigned zones (left side, middle,
> > > > footer, whatever). These would basically determine the page layout.
> > > >    * Blocks would then be assigned to a zone on the page.
> > > >    * When a page loads it pulls its assigned zones and blocks then
> > > > places them where necessary.
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it
> > to security at symfony-project.com
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-users@googlegroups.com
> > > > To unsubscribe from this group, 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
>
> --
> Have a nice day!
>
> Alecs
> Certified ScrumMaster
>
> There are no cannibals alive! I have ate the last one yesterday ...
> 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)0722 621 280

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

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

2010-03-04 Thread Alexx
Hi,

Sorry for my english.

I try test email sending, but when I call action ($browser->post('/
genre/save')) it call in prod environment (in production environment
mailer settings is incorrect), not in test. How can I change
environment?

My factories.yml:
test:
  mailer:
param:
  delivery_strategy: none

dev:
  mailer:
param:
  delivery_strategy: none

all:
  mailer:
class: sfMailer
param:
  logging:   %SF_LOGGING_ENABLED%
  charset:   %SF_CHARSET%
  delivery_strategy: realtime
  transport:
class: Swift_SmtpTransport
param:
  host:   localhost
  port:   25
  encryption: ~
  username:   ~
  password:   ~


Tnx

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

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

2010-03-04 Thread feykintosh
Hi all,
I'm having a problem with routing.

route.yml settings:
Send:
  url: /exp/send/:token
  param:   { module: exp, action: Send }


And my action.php file:

public function executeSend(sfWebRequest $request){

var_dump($request->getParameter('token')); //don't work.
}

Null is returned as..

The value of  :token how can I get?

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

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

2010-03-04 Thread Susan Ditmore
If you just want to sort the results on the immediate page, you can use this
with the jquery plugin:

http://tablesorter.com/docs/

If you want to be able to sort across multiple pages, tell me what you're
using for pagination and I can give you a few ideas (but it will be more
difficult).

On Thu, Mar 4, 2010 at 10:46 AM, ziclo  wrote:

> Does anyone has a tutorial about that ? The backend is usefull but a
> good tutorial would be appreciate in order to be able to do that kind
> of common functionnalities.
>
> Tnak you
>
> On 18 fév, 11:16, ziclo  wrote:
> > Hello,
> >
> > That what i'm going to do. Thank you
> >
> > On 18 fév, 09:12, Gareth McCumskey  wrote:
> >
> > > Why not just implement it yourself? You don't need to have everything
> > > pre-written for it. Simply make the column heading a link pointing to
> > > an action that re-runs the query with the correct ORDER BY sql in
> > > it
> >
> > > On Sat, Feb 13, 2010 at 3:55 PM, ziclo  wrote:
> > > > Hi,
> >
> > > > I would like to be able to sort (order by ASC ou DESC) by clicking on
> > > > a colon title (th). The same way as the backend of the jobeet
> > > > tutorial.
> > > > I don't want it on the backend but on the frontend.
> >
> > > > With doctrine i can use the pager without difficulties but i do not
> > > > know how to sort a list (result of a query) by a simple click on the
> > > > title of a colonn.
> >
> > > > Does a tutorial exists about that ?
> >
> > > > Thank you.
> >
> > > > Ziclo
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> > > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> > > > For more options, visit this group athttp://
> groups.google.com/group/symfony-users?hl=en.
> >
> > > --
> > > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > > twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
"To categorize is human; to distribute, divine."

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

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

2010-03-04 Thread ribeiro.pau...@googlemail.com
Hi Daniel,

try using this .htaccess modified version. I've added two new rules.


Options +FollowSymLinks +ExecCGI
DirectoryIndex index.php


  RewriteEngine On

  # uncomment the following line, if you are having trouble
  # getting no_script_name to work
  RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^phpMyAdmin phpMyAdmin/index.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^phpMyAdmin/(.+)$ phpMyAdmin/$1 [L]

  # we skip all files with .something
  #RewriteCond %{REQUEST_URI} \..+$
  #RewriteCond %{REQUEST_URI} !\.html$
  #RewriteRule .* - [L]

  # we check if the .html version is here (caching)
  RewriteRule ^$ index.html [QSA]
  RewriteRule ^([^.]+)$ $1.html [QSA]

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f

  # no, so we redirect to our front web controller
  RewriteRule ^(.*)$ index.php [QSA,L]



Regards,
Paulo

On 2 mar, 05:30, Richtermeister  wrote:
> Hi all,
>
> I know this question is a rookie problem, but I seem to be stuck on
> it..
>
> I've just launched a symfony app on a server, and all works great,
> except that some web-apps that share the webroot are now tricky to
> access.. For example I have phpMyAdmin sitting in the webroot, and I
> used to be able to access it via mysite.com/phpMyAdmin. This url is
> now caught by the front-controller and triggers a 404. Only a direct
> request to phpMyAdmin/index.php gets me access to the app.
>
> My .htaccess file looks as follows:
>
> Options +FollowSymLinks +ExecCGI
> DirectoryIndex index.php
>
> 
>   RewriteEngine On
>
>   # uncomment the following line, if you are having trouble
>   # getting no_script_name to work
>   RewriteBase /
>
>   # we skip all files with .something
>   #RewriteCond %{REQUEST_URI} \..+$
>   #RewriteCond %{REQUEST_URI} !\.html$
>   #RewriteRule .* - [L]
>
>   # we check if the .html version is here (caching)
>   RewriteRule ^$ index.html [QSA]
>   RewriteRule ^([^.]+)$ $1.html [QSA]
>
>   RewriteCond %{REQUEST_FILENAME} !-d
>   RewriteCond %{REQUEST_FILENAME} !-f
>
>   # no, so we redirect to our front web controller
>   RewriteRule ^(.*)$ index.php [QSA,L]
> 
>
> I was under the impression that the !-d flag should fix my problem,
> but it somehow doesn't.
> Thanks for any help!
>
> 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


[symfony-users] Multiple Databases with the same Model

2010-03-04 Thread Rotlaus
For a new application we are looking for a php web framework that
supports multiple databases with the same schema/model. Every customer
of us will become his own webserver with his own database. On top of
this we want to develop a central administration app that works on all
customer databases, which are all have the same schema/model. Does
Symfony 1.4 or 2 support such a thing? Or should i better ask if
Doctrine or Propel support something like that? If not, would it be
easy to add this to the current functionality?

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

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

2010-03-04 Thread maelo_fredas
Hello everyone:

I'm developing an app with symfony-1.2.12, Doctrine and PostgreSQL.
Deployed it according the steps defined in Jobeet. The files were
successfully transferred after deploy task (done in the same pc), but
some AJAX queries don't work in deployment. Checked with Firebug and
the .js  files (where the function exist) are loaded. I need help to
fix this issue.

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


[symfony-users] Possible bug found in sfWidgetFormChoice

2010-03-04 Thread Meijuh
When I use:
$this->widgetSchema[1] = new sfWidgetFormChoice(array('default' =>
'b', 'choices' => array('a' => 'a', 'b' => 'b')));

The option with value b will not get the selected attribute.

But when I use:

$this->widgetSchema[(1).'foo'] = new
sfWidgetFormChoice(array('default' => 'b', 'choices' => array('a' =>
'a', 'b' => 'b')));

The option with value b will get the selected attribute.

Am I doing something wrong, or is this  symfony bug?

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

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


[symfony-users] Re: problems with embedRelation with a self related m:n

2010-03-04 Thread romain godefroy
hi,

Have you tried to defined the relation with
type: many
I don't know if it could change anything for you but it should be
test ?

On 3 mar, 20:56, axel at  wrote:
> I have a list of persons, and an m:n relation that relates one person
> with several other persons:
>
> Person:
>   columns:
>     id
>       type: integer(4)
>       primary: true
>     name: string(255)
>   relations:
>     # m:n Person2Person
>   Person:
>       class: Person
>       refClass: Person2Person
>       local: id
>       foreign: related
>       foreignAlias: contactPerson
>
> # m:n
> Person2Person:
>   columns:
>     id:
>       type: integer(4)
>       primary: true
>     relatedId:
>       type: integer(4)
>       primary: true
>   relations:
>     Person:
>       class: Person
>       local: relatedId
>       foreign: id
>     Person2:
>       class: Person
>       local: id
>       foreign: id
>
> in the PersonFrom class i use
> $this->embedRelation('RelatedPersons', "myRelatedPersonForm");
>
> everything works fine:
> symfony embedds 1 to n related person forms into the main person form
> also updates work fine
>
> the problem ist following:
> each time saving the form symfony commits a query like:
>
> update person2person set id = 100 where (id=200 and relatedId=100)
>
> (200 is the id of the main form and 100 the "relatedId")
>
> and of course this destroys the realation.
>
> any idea whats wrong and why this happens?

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

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

2010-03-04 Thread DEVNET
Merci de me guider par rapport à la documentation de base pour débuter
dans symfony.

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

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


[symfony-users] How to create a child module with admin generator ?

2010-03-04 Thread Herzult
Hello,
I am trying to create a kind of child module with admin generator.
I wanted to know if you have solutions.

Take for example the following model :

Article:
  columns:
title: { type: string(45) }
headline: { type: string(500) }

ArticlePage:
  columns:
title: { type: string(45), notnull: true }
content: { type: clob }
page_id: { type: integer, notnull: true }
  relations:
Article:
  local: page_id
  foreign: id
  alias: Article
  foreignAlias: Pages
  onDelete: cascade

First, I want to create an admin module to manage Articles. So far no
problem.
Then I want to create another admin module to manage ArticlePage
related to one Article (and not all Articles).
How? Is this possible with the admin generator?

Thank you in advance for your reply.

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

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


[symfony-users] symfony Forms in Action

2010-03-04 Thread danceric
Hi,
I've seen a link to the 'symfony Forms in Action' in the symfony blog,
I'm wondering why it's not linked on the 'Documentation' page, it's a
helpful resource.

http://www.symfony-project.org/forms/

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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 does form widgets take default into account?

2010-03-04 Thread Susan Ditmore
Hey Aadaam,

I tried doing this:

$this->setDefault('startdate', date('Y-m-d'));

and it works for me.

Can you try it and see?

Thanks,

Susan

On Sun, Feb 28, 2010 at 7:16 PM, Aadaam  wrote:

> Hi all,
>
> I now this is a silly question, but I simply can't set a date widget
> to a default value, nor I am able to understand how it is supposed to
> work.
>
> What I tried:
>
> class SomeForm extends DoctrineForm {
>  public function configure(){
>  $this->widgetSchema['startdate'] = new sfWidgetFormDate(
>array(
>'format' => '%year% - %month% - %day%',
>'default' => array(
>'year'=> date('Y',$time),
>'month' => date('m', $time),
>'day' => date('j', $time)
>),
>));
>
> $this->setDefault('startdate', array(
>'year'=> date('Y',$time),
>'month' => date('m', $time),
>'day' => date('j', $time)
>)); // also tried with date('Y-m-j')
> }
> }
> None of these works. I looked at the forums, looked at the sourcecode
> of symfony 1.1,1.2 and 1.4.
>
> I'm using 1.2 currently, but I couldn't find a clue on how does this
> widget take default into account at all.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, 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 categorize is human; to distribute, divine."

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

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

2010-03-04 Thread Darren884
Heres the deal, I created an admin generated form in my backend, and I
am able to edit my customers easily. However when I try to make a form
on the main site for them to update their date I simply cannot do it.
The form system makes it so when I try to use the previous form class
its impossible to save their data because I have a unique email
validator and whenever they try to save it they can't. What should I
do? Should I just do validation the old fashioned way? Why is Symfony
like this? Why can't I make it as easy as just letting someone update
their information? Please someone help I am stuck on this.

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

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


[symfony-users] Re: getForm() in a regular module?

2010-03-04 Thread Darren884
I just generated an admin to use.

On Mar 4, 9:06 am, Darren884  wrote:
> Hi guys, I have used generate:module to generate a CRUD module,
> however it does not have getForm() in it like my admin generated
> section. How would I accomodate this?
>
> I am getting my form like:
> $this->form = new CustomerForm($customer);
>
> But how can I do it like I am in my other by calling getForm()? I need
> to use the getForm method and pass options to my form.

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

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

2010-03-04 Thread Gábor Fási
  $this->validatorSchema['email'] = new sfValidatorAnd(array(
$this->validatorSchema['email'],
new sfValidatorEmail(),
  ));



On Thu, Mar 4, 2010 at 17:56, HiDDeN  wrote:
> I defined validators to my Doctrine model, so it generated automatic
> validators (such as maxlength, required, etc).
>
> Now I would like to add a validator directly in my form, but without
> losing the ones defined by Doctrine, is this possible? How could I
> achieve it?
>
>
> 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


[symfony-users] getForm() in a regular module?

2010-03-04 Thread Darren884
Hi guys, I have used generate:module to generate a CRUD module,
however it does not have getForm() in it like my admin generated
section. How would I accomodate this?

I am getting my form like:
$this->form = new CustomerForm($customer);

But how can I do it like I am in my other by calling getForm()? I need
to use the getForm method and pass options to my form.

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

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

2010-03-04 Thread HiDDeN
I defined validators to my Doctrine model, so it generated automatic
validators (such as maxlength, required, etc).

Now I would like to add a validator directly in my form, but without
losing the ones defined by Doctrine, is this possible? How could I
achieve it?


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] Valid path to a directory containing Doctrine models

2010-03-04 Thread Bill P.
Hello,

I am trying to setup a new project using NetBeans and this tutorial:
http://wiki.netbeans.org/NB68symfony

It is using propel, but I am setup with Doctrine.
Everything seems to be setup correctly, but when I am trying to insert-sql, I 
get this error;

You must pass a valid path to a directory containing Doctrine models

and no table are created.

What am I missing?

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] Many to many doctrine in forms / embeded forms.

2010-03-04 Thread Samuel Morhaim
I am having some issues finding a good example on how to display the many to
many fields in a form, actually on an embeded form. Can somebody point me in
the right direction?

Thank you.

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

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


[symfony-users] Re: Symfony frontend sort by th

2010-03-04 Thread ziclo
Does anyone has a tutorial about that ? The backend is usefull but a
good tutorial would be appreciate in order to be able to do that kind
of common functionnalities.

Tnak you

On 18 fév, 11:16, ziclo  wrote:
> Hello,
>
> That what i'm going to do. Thank you
>
> On 18 fév, 09:12, Gareth McCumskey  wrote:
>
> > Why not just implement it yourself? You don't need to have everything
> > pre-written for it. Simply make the column heading a link pointing to
> > an action that re-runs the query with the correct ORDER BY sql in
> > it
>
> > On Sat, Feb 13, 2010 at 3:55 PM, ziclo  wrote:
> > > Hi,
>
> > > I would like to be able to sort (order by ASC ou DESC) by clicking on
> > > a colon title (th). The same way as the backend of the jobeet
> > > tutorial.
> > > I don't want it on the backend but on the frontend.
>
> > > With doctrine i can use the pager without difficulties but i do not
> > > know how to sort a list (result of a query) by a simple click on the
> > > title of a colonn.
>
> > > Does a tutorial exists about that ?
>
> > > Thank you.
>
> > > Ziclo
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "symfony users" group.
> > > To post to this group, send email to symfony-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > symfony-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/symfony-users?hl=en.
>
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc

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

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


[symfony-users] Diferents DB users for diferents applications

2010-03-04 Thread Germana Oliveira
Hi!!

I want to know if i can have a different users in my data base depending the
application the user access..
i meant, i have a 'public' app and 'intranet' app, so if a user access the
app i want he connect with a specific user of the data base so i can define
restrictions.

How can i do that in symfony?

PD: im talking about data base connections Not user.


Thanks
-- 
Germana Oliveira

germanaoliveirab arroba gmail punto com
http://626f67.wordpress.com
http://slcarabobo.wordpress.com

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

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


[symfony-users] Propel double join

2010-03-04 Thread HAUSa
In Propel I have a double JOIN: the Zipcode table is joined in a query
on the User table.

Now I have two functions which both join the Zipcode table:
* addSortCriteria()
* addFilterCriteria()

When a user sorts on a record from the Zipcode table
(addSortCriteria), the Zipcode table is joined, as well as a user
filters on a record from the Zipcode table (addFilterCriteria).

The problem is, when a user sorts ánd filters on a record from the
Zipcode table, the table is joined twice. And that gives an SQL error,
ofcourse.
I cannot change this situation. Maybe the both functions do not
require the Zipcode join (both use User table columns), or just one of
them uses it, or both. If none of them uses it, the table shouldn't be
joined.

Is there some sort of method to check if a table is already joined?

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

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


[symfony-users] symfony and doctrine migrations - who to believe?

2010-03-04 Thread godbout
Hi guys.

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

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

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

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

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

Anybody to lighten me up on that?

Cheers in advance,
Guill

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

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


[symfony-users] Re: sfJqueryReloaded Plugin in Symfony 1.4

2010-03-04 Thread ScherlOMatic
Hello!

Thanks for your reply, but none of your solutions worked for me. By
the way the sfLoader is deprecated and was removed since symfony
version 1.4.

I found the sfContext::getInstance()->getConfiguration()-
>loadHelpers() method which works perfectly.

Two questions remaing:
1) How does it come that standard_helpers in settings.yml are not
beeing correctly loaded in forms or actions?
2) What's the problem with accessing helpers in the form method?


Thx


On 4 Mrz., 03:05, "Antoine S."  wrote:
> it should be :
> use_helper('IDontKnowTheName');
>
> or in settings.yml :
>     standard_helpers:       [Partial, Cache, I18N, IDontKnowTheName]
>
> to be able to access from a template.
>
> You should not access from a form.
> (If you have too .. you could use sfLoader::loadHelpers() to load the
> helper)
>
> On Mar 4, 1:11 pm, ScherlOMatic  wrote:
>
> > Hello!
>
> > Unfortunately I'm having a minor problem with this plugin.
>
> > I installed it with the "plugin:install" command, did "publish-assets"
> > and everything went fine. It has been enabled in my
> > ProjectConfiguration and the web dir has also been created
> > successfully.
>
> > Now I'm calling one of the helper functions within one of my form
> > classes which gives me an error.
> > "Fatal error: Call to undefined function jq_link_to_remote() in ..."
>
> > I also tried to ask Google for this error code, but without success.
>
> > Hope somebody could give me a hint, where to enable/load the
> > jqueryreloaded functions.
>
> > Thx and good night Stefan

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

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

2010-03-04 Thread Gareth McCumskey
Forms framework was introduced in symfony 1.1 and the older forms
helpers and validators were deprecated in 1.2 I believe. You can set
the sfCompat10 plugin to be used for > 1.1 and things should still
work but really is better to migrate over to the forms framework. We
are currently reworking our older 1.0 forms into Forms framework so we
can eventually upgrade to 1.4.

1.2 is not maintained anymore except for critical security bugs.

On Thu, Mar 4, 2010 at 12:32 AM, Parijat Kalia  wrote:
> Why do you recommend using the form framework over the simple old validation
> styles. Which version of symfony introduced this change? And is 1.2.9
> maintained any longer?
>
> Thanks
>
> Parijat
>
> On Wed, Mar 3, 2010 at 2:02 PM, Gábor Fási  wrote:
>>
>> They got replaced by the form framework. I believe you can still use
>> them with the sfCompat10Plugin, but you'd better use the form fw.
>>
>> On Wed, Mar 3, 2010 at 23:00, Parijat Kalia 
>> wrote:
>> > Hey guys,
>> >
>> > whatever happened to the good old validateXXX() methods and the
>> > validate.yaml files symfony had. I have a validateXXX() for a couple of
>> > my
>> > actions but they don't run. Not only that, when I run modules, the only
>> > thing that get's generated when a generate:module function is called is
>> > actions and templates folder. Am I missing something here?
>> >
>> > Parijat
>> >
>> > --
>> > If you want to report a vulnerability issue on symfony, please send it
>> > to
>> > security at symfony-project.com
>> >
>> > You received this message because you are subscribed to the Google
>> > Groups "symfony users" group.
>> > To post to this group, send email to symfony-users@googlegroups.com
>> > To unsubscribe from this group, 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
>



-- 
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: Integration with third party script

2010-03-04 Thread halfer
Note: x-posted to the forum here:

http://forum.symfony-project.org/index.php/m/94760/

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

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

2010-03-04 Thread mbernasocchi
sorry to bothe abain, but the pastebin expired... now it's all here:
http://pastebin.com/quQfBXTy


and here:

getContext()->getUser();

$request = $this->getContext()->getRequest();
$model = tools::getModelNameFromModule($request-
>getParameter('module'));
var_dump($request->getParameter('id'));
var_dump($model);

if ($model != null)
{
  if (
$obj = Doctrine::getTable($model)->find($request-
>getParameter('id'))
AND $obj
AND $user->getGuardUser() == $obj->getAuthor()
) {
$user->addCredential('owner');
  }
  else {
  $user->removeCredential('owner');
  }
}

// Execute next filter
$filterChain->execute();
//remove the owner credential
$user->removeCredential('owner');
}
}
?>


On Mar 4, 12:54 am, mbernasocchi  wrote:
> hi all,
> I've set up a filter to give and take away a dynamic owner credential
> (so that only the author of the object can edit it). my problem is
> that as soon as I activate the filter and try to perform an action
> that needs the owner credential, symfony reports " _csrf_token [CSRF
> attack detected.] "
>
> the relevant code can be found here:http://pastebin.com/7tUuTuMKh
>
> thanks in advance
>
> MArco

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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: sfDoctrineGuardPlugin - error in handling own generator.yml for sfGuardUser

2010-03-04 Thread Daniel Lohse
There is another way. It's one that does not involve these "hacky" things.

Simply copy the sfGuardUserGeneratorConfiguration.class.php to your 
apps/backend/modules/sfGuardUser/lib/ folder and add the following code:

public function getFilterDisplay()
{
  $display = parent::getFilterDisplay();
  unset($display['permissions_list']);
  
  return $display;
}

Then copy the actions.class.php of the sfGuardUser module to 
apps/backend/modules/sfGuardUser/actions/ and change the include like so:

require_once 
dirname(__FILE__).'/../lib/sfGuardUserGeneratorConfiguration.class.php';

I know it's a bit involving. But: you don't lose anything by doing it this way, 
you can upgrade the plugin, it stays extensible and this way is not hacky in 
any way. :)


Cheers, Daniel

On 04.03.2010, at 09:56, Tom Ptacnik wrote:

> I found a solution, not nice, but it's simple and it works for me
> 
> filter:
>display: [username, is_active, is_active, is_active]
> 
> 
> It somehow overwrites the array of the original generator.yml, and the
> is_active is showed only once.
> 
> 
> 
> On 4 bře, 09:52, Tom Ptacnik  wrote:
>> Hi,
>> 
>> I have problem with customizing the generator of the sfGuardUser. I
>> want to remove the permissions_list from the filter form.
>> 
>> I've copied the generator.yml file from the plugin folder to my apps/
>> backend/modules/sfGuardUser/config/generator.yml
>> 
>> If I siply remove the permissions_list from the generator filter
>> settings nothing happen...
>> 
>> original:
>> filter:
>> display: [username, is_active, groups_list, permissions_list]
>> 
>> my change:
>> filter:
>> display: [username, is_active, groups_list]
>> 
>> Do you have some solution? Thank you.
>> 
>> I found that others have problem with that to and the only know
>> solution is dirty - remove the original generator.yml from the plugin
>> folder
>> 
>> related ticket, topic:
>>  http://trac.symfony-project.org/ticket/8139
>>  http://forum.symfony-project.org/index.php/m/43279/
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, 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: sfDoctrineGuardPlugin - error in handling own generator.yml for sfGuardUser

2010-03-04 Thread Tom Ptacnik
I found a solution, not nice, but it's simple and it works for me

filter:
display: [username, is_active, is_active, is_active]


It somehow overwrites the array of the original generator.yml, and the
is_active is showed only once.



On 4 bře, 09:52, Tom Ptacnik  wrote:
> Hi,
>
> I have problem with customizing the generator of the sfGuardUser. I
> want to remove the permissions_list from the filter form.
>
> I've copied the generator.yml file from the plugin folder to my apps/
> backend/modules/sfGuardUser/config/generator.yml
>
> If I siply remove the permissions_list from the generator filter
> settings nothing happen...
>
> original:
> filter:
>         display: [username, is_active, groups_list, permissions_list]
>
> my change:
> filter:
>         display: [username, is_active, groups_list]
>
> Do you have some solution? Thank you.
>
> I found that others have problem with that to and the only know
> solution is dirty - remove the original generator.yml from the plugin
> folder
>
> related ticket, topic:
>  http://trac.symfony-project.org/ticket/8139
>  http://forum.symfony-project.org/index.php/m/43279/

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

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, 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] sfDoctrineGuardPlugin - error in handling own generator.yml for sfGuardUser

2010-03-04 Thread Tom Ptacnik
Hi,

I have problem with customizing the generator of the sfGuardUser. I
want to remove the permissions_list from the filter form.

I've copied the generator.yml file from the plugin folder to my apps/
backend/modules/sfGuardUser/config/generator.yml

If I siply remove the permissions_list from the generator filter
settings nothing happen...

original:
filter:
display: [username, is_active, groups_list, permissions_list]

my change:
filter:
display: [username, is_active, groups_list]


Do you have some solution? Thank you.

I found that others have problem with that to and the only know
solution is dirty - remove the original generator.yml from the plugin
folder

related ticket, topic:
  http://trac.symfony-project.org/ticket/8139
  http://forum.symfony-project.org/index.php/m/43279/

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

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

2010-03-04 Thread Alexandru-Emil Lupu
HI!
Well is a Unit after all.
Alecs

On Thu, Mar 4, 2010 at 10:07 AM, Tarjei Huse  wrote:

> Hi,
>
> I might have missed something, but does symfony have a way to write
> tests for tasks?
>
> I got a task I would like to have test coverage for and the best way
> seems to be do some kind of functional testing on it.
>
> Kind regards,
> Tarjei
>
> --
> Regards / Med vennlig hilsen
> Tarjei Huse
> Mobil: 920 63 413
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Have a nice day!

Alecs
Certified ScrumMaster

There are no cannibals alive! I have ate the last one yesterday ...
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)0722 621 280

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

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

2010-03-04 Thread Tarjei Huse
Hi,

I might have missed something, but does symfony have a way to write
tests for tasks?

I got a task I would like to have test coverage for and the best way
seems to be do some kind of functional testing on it.

Kind regards,
Tarjei

-- 
Regards / Med vennlig hilsen
Tarjei Huse
Mobil: 920 63 413

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

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