[symfony-users] Re: ORDER BY insists on using sort_order

2010-02-06 Thread michael hodges
Problem not resolved after all.  The progress made is that symfony
does not insist on sorting by sort_order any longer,
but for all classes the generator ignores anything I specify for the
sort statement in the generator.yml file.

While experimenting I created a sort: bogusvvv entry in a generator
file, cleared cache, refreshed the page, and..no errors.
Using Spot-light to search I see the
generated ...GeneratorConfiguration.Class.php in the cache that the
generator created,
and it does confirm that the sort statement is being read out of the
generator.yml file:

  public function getDefaultSort()
  {
return array('bogusvvv', 'asc');
  }

The implication is that something is preventing the default sort I
specify from being used.

Does anyone have a recommendation for how I might figure how what is
overriding the default sort?

At this point in my project I have no customizations except what I've
made in the generator.ym files.
Well, that's almost a true statement, I have one virtual column that
does a table looking for a count of
items, but I can't image that this would be relevant.

Thanks in advance for any recommendations.  I'm using Symfony 1.4 with
Doctrine and mostly just
experimenting with what I'm learning from the jobeet tutorial.

 - Michael



On Feb 5, 10:15 pm, michael hodges  wrote:
> Problem resolved by creating a whole new project directory and
> starting over.
> I was able to copy all generator.yml files, partials, etc without
> making any changes
> and everything runs fine.
>
> The only thing that I can think of that created the misbehavior in the
> previous project
> was the fact that I named a column sort_order and then specified it in
> the generator
> as the field to sort on.  Subsequently, I removed it from the schema
> and thought I
> regenerated the entire app folder, the framework's generator did not
> pick up that
> one change.  Doesn't make sense, but any other explanation just gets
> weirder.
>  - Michael
>
> On Feb 5, 7:08 pm, michael hodges  wrote:> # In which 
> file did you find the "sort_order"
> > database_interface.lib.php
>
> > # Did you clear the cache
> > First I cleared the cache, but that didn't work
> > Second I renamed the app directory and recreated it from scratch using
> > just my schema and fixture
> >   Even with the classes and generator files back to their pristine
> > states the error would not go away for the one class
> > I then cleared the cache and hunted for any file with 'sort_order',
> > and found no occurrences unaccounted for.
> > Not sure what to do next, execpt to start over since there are no
> > stones left that I know to look under.
>
> > What's especially odd for that class is I can change the generator
> > entry for limit and see in the logs that the change is
> >  processed.  But there is nothing I can do in the generator.yml file
> > to change the sort.  Whatever I specify is ignored.
>
> > Thanks for your response.  Nice to see that this is an active list.
> >  - Michael
>
> > On Feb 5, 12:40 am, Tom Ptacnik  wrote:
>
> > > Did you cleared the cache folder?
>
> > > In which file ddid you find the "sort_order" (as you said you have
> > > found it in internal symfony files...)
>
> > > On 4 ún, 09:29, michael hodges  wrote:
>
> > > > Hello all,
>
> > > > I'm new to Symfony.  While I've been able to figure things out as I go
> > > > along, this one is very strange.  I had a column named 'sort_order'
> > > > and used if in the generator.yml to request a sort in the list.
> > > > Subsequently I removed it from the schema and regenerated everything,
> > > > including the backend.  No matter what I do, I can't get executeView
> > > > not to include ORDER BY sort_order in the sql statement that creates
> > > > the list.  I can influence the LIMIT statement by updating the
> > > > generator.yml file, but I cannot influence ORDER BY with the sort
> > > > statement.
>
> > > > I even used Spotlight to hunt for sort_by in the files and come up
> > > > empty, except where it is used internally to symfony.
>
> > > > Any clue as to what might be happening would be appreciated.  My next
> > > > step would be to do a clean install of everything and begin fresh,
> > > > which would probably be good practice in any case.
>
> > > > Thanks
> > > >  - Michael
>
> > > > # at Doctrine_Connection->rethrowException(object('PDOException'),
> > > > object('Doctrine_Connection_Mysql'), 'SELECT s.code AS s__code,
> > > > s.description AS s__description, s.class_of_year AS s__class_of_year,
> > > > s.created_at AS s__created_at, s.updated_at AS s__updated_at FROM
> > > > StudentClassStanding s ORDER BY sort_order asc LIMIT 300')
> > > > in SF_ROOT_DIR/symfony-1.4.1/lib/plugins/sfDoctrinePlugin/lib/vendor/
> > > > doctrine/Doctrine/Connection.php line 1025 ...
>
> > > >       1022.         } catch (Doctrine_Adapter_Exception $e) {
> > > >       1023.         } catch (PDOException $e) { }
> > > >       1024.
> > > >       1025.         $this->rethrowException($e, $th

Re: [symfony-users] Problem - Fatal error: Call to undefined function link_to()

2010-02-06 Thread Eno
On Sat, 6 Feb 2010, Rodrigo Prado wrote:

> I haved a problem.
> 
> I tried to use the function link_to():
> 
> portalcepai\apps\frontend\modules\teste\actions\actions.class.php
> 
>  class testeActions extends sfActions
> {
>   public function executeIndex(sfWebRequest $request)
>   {
> echo link_to("Create Account", "sfApply/apply");
>   }
> }
> 
> When I will test the message show:
> 
> Fatal error: Call to undefined function link_to() in C:\xampplite
> \htdocs\portalcepai\apps\frontend\modules\teste\actions
> \actions.class.php

Normally one would use link_to() in a template.



-- 


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



[symfony-users] Problem - Fatal error: Call to undefined function link_to()

2010-02-06 Thread Rodrigo Prado
Good Morning.

I haved a problem.

I tried to use the function link_to():

portalcepai\apps\frontend\modules\teste\actions\actions.class.php

http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] How to properly override Doctrine_Record::delete()?

2010-02-06 Thread Absalón Valdés
hi. you can use a event handler adn the catch delete execution, e.g:
class backendConfiguration extends sfApplicationConfiguration
{
  public function configure()
  {
$this->dispatcher->connect('admin.delete_object',
array($this,'xmethod'));
  }

  public function xmethod(sfEvent $event)
  {
  // do some stuff
  }
}
This should work... i think



2010/2/5 Darren884 

> Does anyone have any simple example code I can place into my objects
> model to override this function? I need to add some stuff into it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>

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



[symfony-users] Looking to hire experienced Symfony developer

2010-02-06 Thread emitind
Hi all

Not sure where to post this, or where to look specifically for Symfony
developers, so I though this might get the best response. I have a
large CMS project using Symfony, which has been in development the
last 8 months. Unfortuantly my previous symfony coder has had to
leave, and there are a few features and bugs which need addressing. I
am looking to hire an experienced Symfony developer, on a freelance
but potentially long term basis. Preferably located in the UK or W.
Europe.

If interested, please get in touch. If this would be better placed
elsewhere, please let me know.

Thank you

Owen

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



[symfony-users] Re: Question about a variable in the URL

2010-02-06 Thread Marek
Hi,

what you want is not possible with symfony, there must be separator
between literal and variable. If you don't like slash there you can
use other character, just set it in config/factories.yml:

all:
  routing:
class: sfPatternRouting
param:
  generate_shortest_url:true
  extra_parameters_as_query_string: true
  segment_separators: [/,-]

the above would add dash as separator, so you can use
url: /:variable1/:variable2/literal-:variable3.html

-- Marek

PS:  If it was possible to set segment_separators_regexp, you would be
set. However this isn't available

On 6. Feb, 11:39 h., HiDDeN  wrote:
> I'd like to generate an URL like this one:
>
> /MyCategory/MySubCategory/page2.html
>
> I have tried to do it this way:
>
> my_route:
>   url: /:variable1/:variable2/literal:variable3.html
>
> But Symfony outputs this:
>
> /MyCategory/MySubCategory/page:variable3.html
>
> How could I solve this?
>
> On 6 feb, 00:05, HiDDeN  wrote:
>
> > Adrianrz, look again my question please. The problem I have is in
> > "literal:variable3".
>
> > On Feb 5, 7:20 pm, adrianrz  wrote:
>
> > > Hi,
>
> > > the .html must be defined on setting.yml as suffix and then the route
> > > would be
>
> > > my_route:
> > >   url: /:variable1/:variable2/literal/:variable3
>
> > > and the url 
> > > showhttp://www.yoursite.com/variable1/variable2/literal/variable3.html
> > > but i hope that this variables are not so variable otherwise google
> > > will not index well these urls
>
> > > Regards
>
> > > Adrián

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



[symfony-users] Re: I18n on admin generator filters

2010-02-06 Thread Fabrizio
Resolved!
I have manually add the fields to the form filter and a where in the
query


On 6 Feb, 14:45, Fabrizio  wrote:
> Hi,
> I have created a form with I18n with the admin generator.
> By default in the filter section not appear the fields I18n.
> How do I add them in the filters?

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



[symfony-users] Re: appropriate way to insert form value before validation?

2010-02-06 Thread Richtermeister
I would just merge the account_id into the array that you pass to the
bind() method. That way it looks to the form as if the value had been
submitted. To keep validation in place, only unset the widget, not the
validator.

Daniel


On Feb 5, 2:06 pm, kris chant  wrote:
> On Feb 5, 1:30 pm, "rooster (Russ)"  wrote:
>
> > value using the updateObject() method. Since the value never enters
>
> This is the method I'm using atm.  You're right, I was expecting too
> much from the validators.  Letting FK restraints maintain sanity
> further down the chain seems appropriate.  Thanks.

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



[symfony-users] Changing where sfDoctrineGuard login form is

2010-02-06 Thread ReynierPM

Hi:
I want to change the position of the form generated by sfDoctrineGuard 
plugin to the header of my page. Does any body knows if this is 
possible? Can I use a partial to do this?

--
Cheers and thanks in advance
ReynierPM

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



[symfony-users] Re: [sf1.4] symfony project:deploy dry-run no output

2010-02-06 Thread ev...@freshheads.com
Hi Augusto, ok indeed. Will take a look at that one too, thanks for
pointing that out!

Gr!

On 5 feb, 05:32, Augusto Flavio  wrote:
> Hi Evert.
>
> there is no relation with error_reporting with the deploy using the
> argument --dry-run. The problem that is see is in the class that
> execute the rsync command. For one time i thought it's the outbuffer
> in the class that do the deployment: sfProjectDeployTask.class.php.
> However i see that this problem is located in the class that execute
> the command rsync.
>
> The method responsable about it is the execute from the class
> sfFileSystem:http://trac.symfony-project.org/browser/branches/1.3/lib/task/sfFiles
> I not found the problem yet. Try to execute the --dry-run manually and
> after execute the deployment without the --go argument. Sametime it
> works sametime not.
>
> I will investigate in deep this problem and i hope found it.
>
> Bye
>
> Augusto Morais

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



[symfony-users] I18n on admin generator filters

2010-02-06 Thread Fabrizio
Hi,
I have created a form with I18n with the admin generator.
By default in the filter section not appear the fields I18n.
How do I add them in the filters?

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



[symfony-users] Re: Question about a variable in the URL

2010-02-06 Thread HiDDeN
I'd like to generate an URL like this one:

/MyCategory/MySubCategory/page2.html


I have tried to do it this way:

my_route:
  url: /:variable1/:variable2/literal:variable3.html


But Symfony outputs this:

/MyCategory/MySubCategory/page:variable3.html


How could I solve this?


On 6 feb, 00:05, HiDDeN  wrote:
> Adrianrz, look again my question please. The problem I have is in
> "literal:variable3".
>
> On Feb 5, 7:20 pm, adrianrz  wrote:
>
>
>
> > Hi,
>
> > the .html must be defined on setting.yml as suffix and then the route
> > would be
>
> > my_route:
> >   url: /:variable1/:variable2/literal/:variable3
>
> > and the url 
> > showhttp://www.yoursite.com/variable1/variable2/literal/variable3.html
> > but i hope that this variables are not so variable otherwise google
> > will not index well these urls
>
> > Regards
>
> > Adrián

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



[symfony-users] Re: sfRoute::serialize() must return a string or NULL

2010-02-06 Thread HiDDeN
Solved!

This is due to the segment separator. By default, the separators are
"/" and ".", so the "-" has to be added.

I just added this to "options":

segment_separators: [/,.,-]


On 5 feb, 18:24, HiDDeN  wrote:
> I'm having this error when I call this kind of route:
>
> my_route:
>   url:     /:variable1-:variable2.html
>   param:   { module: my_module, action: index }
>
> The error:
> 500 | Internal Server Error | Exception
> sfRoute::serialize() must return a string or NULL
>
> I'm using Symfony 1.4.1  (I have also tried the latest SVN version
> available today)
>
> Why?

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



Re: [symfony-users] Adding a doctrine listener from a plugin

2010-02-06 Thread Stéphane
Is this helping ?
http://www.doctrine-project.org/documentation/manual/1_1/_chapter_lang/event-listeners#connection-listeners:enabling/disabling-listeners

Cheers,


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


On Fri, Feb 5, 2010 at 10:34 PM, Avi Block  wrote:

> What's the best way to add a doctrine listener from a plugin?
> Doctrine_Manager is being reported as not being found (which i found
> strange in the first place), and, to my limited understanding, the
> method that sfDoctrinePlugin calls, configureDoctrine, only gets
> called on your main project configuration.
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>

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



[symfony-users] Re: ORDER BY insists on using sort_order

2010-02-06 Thread michael hodges
Problem resolved by creating a whole new project directory and
starting over.
I was able to copy all generator.yml files, partials, etc without
making any changes
and everything runs fine.

The only thing that I can think of that created the misbehavior in the
previous project
was the fact that I named a column sort_order and then specified it in
the generator
as the field to sort on.  Subsequently, I removed it from the schema
and thought I
regenerated the entire app folder, the framework's generator did not
pick up that
one change.  Doesn't make sense, but any other explanation just gets
weirder.
 - Michael

On Feb 5, 7:08 pm, michael hodges  wrote:
> # In which file did you find the "sort_order"
> database_interface.lib.php
>
> # Did you clear the cache
> First I cleared the cache, but that didn't work
> Second I renamed the app directory and recreated it from scratch using
> just my schema and fixture
>   Even with the classes and generator files back to their pristine
> states the error would not go away for the one class
> I then cleared the cache and hunted for any file with 'sort_order',
> and found no occurrences unaccounted for.
> Not sure what to do next, execpt to start over since there are no
> stones left that I know to look under.
>
> What's especially odd for that class is I can change the generator
> entry for limit and see in the logs that the change is
>  processed.  But there is nothing I can do in the generator.yml file
> to change the sort.  Whatever I specify is ignored.
>
> Thanks for your response.  Nice to see that this is an active list.
>  - Michael
>
> On Feb 5, 12:40 am, Tom Ptacnik  wrote:
>
> > Did you cleared the cache folder?
>
> > In which file ddid you find the "sort_order" (as you said you have
> > found it in internal symfony files...)
>
> > On 4 ún, 09:29, michael hodges  wrote:
>
> > > Hello all,
>
> > > I'm new to Symfony.  While I've been able to figure things out as I go
> > > along, this one is very strange.  I had a column named 'sort_order'
> > > and used if in the generator.yml to request a sort in the list.
> > > Subsequently I removed it from the schema and regenerated everything,
> > > including the backend.  No matter what I do, I can't get executeView
> > > not to include ORDER BY sort_order in the sql statement that creates
> > > the list.  I can influence the LIMIT statement by updating the
> > > generator.yml file, but I cannot influence ORDER BY with the sort
> > > statement.
>
> > > I even used Spotlight to hunt for sort_by in the files and come up
> > > empty, except where it is used internally to symfony.
>
> > > Any clue as to what might be happening would be appreciated.  My next
> > > step would be to do a clean install of everything and begin fresh,
> > > which would probably be good practice in any case.
>
> > > Thanks
> > >  - Michael
>
> > > # at Doctrine_Connection->rethrowException(object('PDOException'),
> > > object('Doctrine_Connection_Mysql'), 'SELECT s.code AS s__code,
> > > s.description AS s__description, s.class_of_year AS s__class_of_year,
> > > s.created_at AS s__created_at, s.updated_at AS s__updated_at FROM
> > > StudentClassStanding s ORDER BY sort_order asc LIMIT 300')
> > > in SF_ROOT_DIR/symfony-1.4.1/lib/plugins/sfDoctrinePlugin/lib/vendor/
> > > doctrine/Doctrine/Connection.php line 1025 ...
>
> > >       1022.         } catch (Doctrine_Adapter_Exception $e) {
> > >       1023.         } catch (PDOException $e) { }
> > >       1024.
> > >       1025.         $this->rethrowException($e, $this, $query);
> > >       1026.     }
> > >       1027.
> > >       1028.     /**
>
> > > # at sfExecutionFilter->executeView('student_class_standing', 'index',
> > > 'Success', array('configuration' =>
> > > object('student_class_standingGeneratorConfiguration'), 'helper' =>
> > > object('student_class_standingGeneratorHelper'), 'filters' =>
> > > object('StudentClassStandingFormFilter'), 'pager' =>
> > > object('sfDoctrinePager'), 'sort' => array('sort_order', 'asc')))
> > > in SF_ROOT_DIR/symfony-1.4.1/lib/filter/sfExecutionFilter.class.php
> > > line 116 ...
> > >        113.         return;
> > >        114.     }
> > >        115.
> > >        116.     $this->executeView($actionInstance->getModuleName(),
> > > $actionInstance->getActionName(), $viewName, 
> > > $actionInstance->getVarHolder()->getAll());
>
> > >        117.   }
> > >        118.
> > >        119.   /**
>
> > > generator:
> > >   class: sfDoctrineGenerator
> > >   param:
> > >     model_class:           StudentClassStanding
> > >     theme:                 admin
> > >     non_verbose_templates: true
> > >     with_show:             false
> > >     singular:              ~
> > >     plural:                ~
> > >     route_prefix:          student_class_standing
> > >     with_doctrine_route:   true
> > >     actions_base_class:    sfActions
>
> > >     config:
> > >       actions: ~
> > >       fields:  ~
> > >       list:
> > >         max_per_page:      300
> > >