[symfony-users] 500 internal server error

2010-12-06 Thread jyoti
Hi

I have made a symfony project on my svn server .
When I submit the form which reads user details ,  I get the following
error message


page not found

Oops an error occured

The server returned a 500 internal server error
Something is broken.


This error message I get 1 out of 5 times. This is hampering the
testing of my code.

Please help me and send your replies asap.Thanx .

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

2010-12-06 Thread Flukey
I've been doing a lot of fiddling around with Symfony2 (latest PR4
release) and reading a lot of it's documentation (I've read pretty
much all of it)

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

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

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

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

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

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

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

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

Thanks muchly!

Jamie

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

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


[symfony-users] how to check if a form contains the expected value

2010-12-06 Thread Don_Busi
Hi everybody,

I'm trying to write functional test for a form in my symfony (1.4)
application.

...and I am strugling to test the values of forms. :-(

How can I test if the "response" contains the right values pre-set in
the formfields.

I tried the following, but it doesn't work:

$browser->
with('response')->begin()->
checkElement('#sf_guard_user_last_name[value="expectedValue"]', true)-
>
end();

to check the field in the response that is defined as follows:



I would expect this test to pass, but it doesn't.

Can anybody help me? What's wrong? Or where do I find a good
documentation on how to test things with CSS selectors?!

Thanx for you help,
dominik

-- 
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: Routing with sf_method question

2010-12-06 Thread Michael Smith
Not really. I am using sf1.4. I have it basically like that post and
similar to the job_create: section in the jobeet tutorial
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/05#chapter_05_collection_route_class
but without using an object route. The lead_import_upload route is
always called even from a form post. The sfDoctrineRouteCollection
routes I have work perfect and do this internally but my custom route
will not. Any other ideas?

Thanks,
Michael

On Dec 6, 11:14 am, Alex Pilon  wrote:
> http://redotheweb.com/2008/08/08/add-request-method-requirement-to-ro...
>
> Does
> that shed any light for you?
>
>
>
>
>
>
>
>
>
> On Mon, Dec 6, 2010 at 11:52, Michael Smith  wrote:
> > I have the following routing.yml:
> > lead_import_upload:
> >  url:     /lead/import.:sf_format
> >  param:   { module: lead, action: importUpload, sf_format: html }
> >  requirements: { sf_method: get }
>
> > lead_import_config:
> >  url:     /lead/import.:sf_format
> >  param:   { module: lead, action: importConfig, sf_format: html }
> >  requirements: { sf_method: post }
>
> > and an importUploadSuccess.php:
> > 
> >  
> >  
> > 
>
> > But when the form is submitted the importUpload action is called again
> > instead of the importConfig action. The form's method is post am I
> > missing something here?
>
> > Thanks,
> > Michael
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Alex Pilon
> (613) 608-1480

-- 
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] The error is not showed in the backend

2010-12-06 Thread Javier Garcia

 Hi,

I have these models:

  user:
name:  { type: varchar(255) }
age:   { type: integer }

  article:
title:{ type: varchar(255) }
content:  { type: varchar(255) }
user_id:  { type: varchar(255) }

I have this generator.yml

  list:
display: [title, age]
peer_method: getArticles

The method getArticles is this:

public static function getArticles()
{
$con = Propel::getConnection();
$sql = "select * from article LEFT JOIN user ON article.user_id 
= user.id";

$stmt = $con->prepare($sql);


$result = $stmt->execute();
$articles = self::populateObjects($stmt);

return $articles;

}

When I go to the module "article" in the backed, I expected it shows an 
error saying the method Article::getAge() doesn't exist, but it doesn't 
show anything...The browser just says "Loading...".


Any idea?

I'm the dev enviroment and i have just created a new project.

I'm using propel.

--
Javi

Ubuntu 10.04, sf 1.4

--
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: Doctrine2, Date and Oracle

2010-12-06 Thread jwage
Hi,

That is the way I was going to recommend. Setting it in your env
variables.

As for the error, it is related to using a date as an id. It is a
DateTime object and is trying to be used as the key of an array in the
UnitOfWork.

Benjamin or Roman will have to comment on this.

- Jon

On Dec 6, 1:20 am, Zuchuat Bertrand  wrote:
> Hi Jon,
>
> Another solution is ton set variables on apache (file envvars):
>
> # ORACLE
> export DYLD_LIBRARY_PATH="/opt/local/lib/oracle"
> export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
>
> export NLS_TIME_FORMAT="HH24:MI:SS"
> export NLS_DATE_FORMAT="-MM-DD HH24:MI:SS"
> export NLS_TIMESTAMP_FORMAT="-MM-DD HH24:MI:SS"
> export NLS_TIMESTAMP_TZ_FORMAT="-MM-DD HH24:MI:SS TZH:TZM"
>
> But i have the same error:
>
> Warning: Illegal offset type 
> in/www/virtualhosts/xxx/src/vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php 
> line 1865
>
> Thanks for you help
>
> Le 3 déc. 2010 à 18:59, Jonathan Wage a écrit :
>
> > I think the issue is you need to configure the oracle date format to be 
> > something that PHPs strtotime can parse. I think the documentation mentions 
> > something about this somewhere.
>
> Bertrand

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

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


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

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

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

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

On Dec 6, 8:59 pm, Florian  wrote:
> Hi,
>
> simple question:
>
> Is it possible to inject dependency at runtime with SF2 DI container ?
>
> For example, I'm using a Zend\Paginator\Paginator who needs an adapter
> as first argument of its constructor.
> This adapter needs a Doctrine Query object as first argument of its
> constructor too.
>
> Can I inject the Query object at runtime, like this ?
>
> $this->container->getPaginatorService($query);
>
> Thanks!
> Florian.

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

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


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

2010-12-06 Thread Florian
Hi,

simple question:

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

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

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

$this->container->getPaginatorService($query);

Thanks!
Florian.

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

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


Re: [symfony-users] Prompt for Extended Permissions when registering with Facebook Connect.

2010-12-06 Thread Alex Pilon
Try this.. http://tinyurl.com/2uhq73m

Thanks!

On Mon, Dec 6, 2010 at 14:49, deadwards  wrote:

> This may be a dumb question, but I can't figure out how to prompt for
> extended permissions (ex. publish_stream, email, etc.) when a user
> connects their Facebook account.
>
> Can anyone point me in the right direction?
>
> --
> 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
>



-- 
Alex Pilon
(613) 608-1480

-- 
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] Prompt for Extended Permissions when registering with Facebook Connect.

2010-12-06 Thread deadwards
This may be a dumb question, but I can't figure out how to prompt for
extended permissions (ex. publish_stream, email, etc.) when a user
connects their Facebook account.

Can anyone point me in the right direction?

-- 
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] Exception occured exception 'Doctrine_Connection_Mysql_Exception' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are activ

2010-12-06 Thread Alex Pilon
Can you show us the code that is being called that is generating this
exception?

On Mon, Dec 6, 2010 at 13:01, saichand  wrote:

> Hi ,
>
> I am using Operating System :  centOs.
>
> And using PHP Version -  5.2.9 ,  Mysql Version - 5.
>
> Symfony Vertion - 1.4.1
>
> Facing the following Exception in my project :
>
>
> " 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception
>
> SQLSTATE[HY000]: General error: 2014 Cannot execute queries while
> other unbuffered queries are active. Consider using
> PDOStatement::fetchAll(). Alternatively, if your code is only ever
> going to run against mysql, you may enable query buffering by setting
> the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.  "
>
> " Exception occured exception 'Doctrine_Connection_Mysql_Exception'
> with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute
> queries while other unbuffered queries are active. Consider using
> PDOStatement::fetchAll(). Alternatively, if your code is only ever
> going to run against mysql, you may enable query buffering by setting
> the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.. Failing Query:
> "SELECT e.id AS e__id, e.start_date AS e__start_date, e.end_date AS
> e__end_date FROM eclass e WHERE (e.id = 1)"' in /home/wwwgoque/inet/
> lib/vendor/symfony/plugins/sfDoctrinePlugin/lib/vendor/doctrine/
> Doctrine/Connection.php:1082 "
>
>
> Is there any idea how to fix this.
> 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
>



-- 
Alex Pilon
(613) 608-1480

-- 
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] Exception occured exception 'Doctrine_Connection_Mysql_Exception' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active...

2010-12-06 Thread saichand
Hi ,

I am using Operating System :  centOs.

And using PHP Version -  5.2.9 ,  Mysql Version - 5.

Symfony Vertion - 1.4.1

Facing the following Exception in my project :


" 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception

SQLSTATE[HY000]: General error: 2014 Cannot execute queries while
other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.  "

" Exception occured exception 'Doctrine_Connection_Mysql_Exception'
with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute
queries while other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.. Failing Query:
"SELECT e.id AS e__id, e.start_date AS e__start_date, e.end_date AS
e__end_date FROM eclass e WHERE (e.id = 1)"' in /home/wwwgoque/inet/
lib/vendor/symfony/plugins/sfDoctrinePlugin/lib/vendor/doctrine/
Doctrine/Connection.php:1082 "


Is there any idea how to fix this.
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] Re: Call to undefined method myUser::method

2010-12-06 Thread Carlos
Thanks!

It was a stupid error, the methods I couldn't access are private
method because thy were previously in another class... A copy / paste
error...

Carlos

On 6 dic, 18:12, Alex Pilon  wrote:
> That should be working.. when you enable sfGuard you change the base class
> of the myUser class to gain access to $this->getUser()->getGuardUser().
>
> Can you check the class type of $this->getUser() ?  [
> get_class($this->getUser()) ]
>
>
>
>
>
>
>
>
>
> On Mon, Dec 6, 2010 at 11:56, Gareth McCumskey  wrote:
> > As far as I am aware $this->getUser() does not access your own class that
> > overrides sfBasicSecurityUser but is in fact an instance of
> > sfBasicSecurityUser. I stand to be corrected however.
>
> > On Mon, Dec 6, 2010 at 3:59 PM, Carlos  wrote:
>
> >> Hi,
>
> >> I added some methods to myUser class, and suddenly I can't access to
> >> them from the action.
> >> $this->getUser()->method returns a "Call to undefined method" error
> >> message. I really think it was working before... Maybe I modified any
> >> yml file?
>
> >> My myUser class and one of this methods:
>
> >> class myUser extends sfBasicSecurityUser
> >> {
> >>  const INFO_MESSAGE    = 'infoMessages';
> >>  const WARNING_MESSAGE = 'warnMessages';
> >>  const ERROR_MESSAGE   = 'errorMessages';
>
> >>  /**
> >>  * Adds messages to user flash
> >>  *
> >>  * @param string $msg
> >>  * @param string $level
> >>  */
> >>  public function addMessage($msg, $level = myUser::INFO_MESSAGE)
> >>  {
> >>    // Gets the existing array, returns an empty array otherwise.
> >>    $flashContent = $this->getFlash($level, array());
>
> >>    // If messages doesn't exists, it's loaded into flash.
> >>    if(!in_array($msg, $flashContent))
> >>    {
> >>      $flashContent[] = $msg;
> >>      $this->setFlash($level, $flashContent);
> >>    }
> >>  }
> >> ...
> >> }
>
> >> Thanks,
>
> >> Carlos
>
> >> --
> >> If you want to report a vulnerability issue on symfony, please send it to
> >> security at symfony-project.com
>
> >> You received this message because you are subscribed to the Google
> >> Groups "symfony users" group.
> >> To post to this group, send email to symfony-users@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> symfony-users+unsubscr...@googlegroups.com >>  legroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > 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 > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Alex Pilon
> (613) 608-1480

-- 
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] Exception occured exception 'Doctrine_Connection_Mysql_Exception' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active...

2010-12-06 Thread saichand
Hi ,

I am working on Operating System :  centOs.

And using PHP Version -  5.2.9 ,  Mysql Version - 5.

Symfony Vertion - 1.4.1

Facing the following Exception :


" 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception

SQLSTATE[HY000]: General error: 2014 Cannot execute queries while
other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.  "

" Exception occured exception 'Doctrine_Connection_Mysql_Exception'
with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute
queries while other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.. Failing Query:
"SELECT e.id AS e__id, e.start_date AS e__start_date, e.end_date AS
e__end_date FROM eclass e WHERE (e.id = 1)"' in /home/wwwgoque/inet/
lib/vendor/symfony/plugins/sfDoctrinePlugin/lib/vendor/doctrine/
Doctrine/Connection.php:1082 "


Is there any idea how to fix this.
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] Re: Trying to use my own method to show a list in the backend: undefined offset notice

2010-12-06 Thread Javier Garcia
Workaround: instead of "select customers_name, value, date_purchased,
orders_status from shop_orders LEFT JOIN ...", "select * LEFT
JOIN ..."

On 6 Dic, 18:39, Javier Garcia  wrote:
> Hi,
>
> i'm trying to use my own method to show a list in the backend:
>
> class ShopOrderPeer extends BaseShopOrderPeer {
>
>     public static function getOrdini()
>     {
>         $con = Propel::getConnection();
>         $sql = "select customers_name, value, date_purchased,
> orders_status from shop_orders LEFT JOIN shop_orders_total  ON
> shop_orders.orders_id = shop_orders_total.orders_id";
>         $stmt = $con->prepare($sql);
>
>         $result = $stmt->execute();
>         $ordini = self::populateObjects($stmt);
>
>         return $ordini;
>
>     }
>
> }
>
> And this is my generator.yml
>
> generator:
>   class: sfPropelGenerator
>   param:
>     model_class:           ShopOrder
>     theme:                 admin
>     non_verbose_templates: true
>     with_show:             false
>     singular:              ShopOrder
>     plural:                ShopOrders
>     route_prefix:          shop_order
>     with_propel_route:     1
>     actions_base_class:    sfActions
>
>     config:
>       actions: ~
>       fields:  ~
>       list:
>         display: [customers_name, date_purchased, orders_status ]
>         peer_method:  getOrdini
>       filter:  ~
>       form:    ~
>       edit:    ~
>       new:     ~
>
> When i load the page of the list, the list is showed but I get this
> erro messages
>
> Notice: Undefined offset: 4 in /home/javier/Aptana_Studio_Workspace/
> dev_repo/lib/model/om/BaseShopOrder.php on line 1864
> Call Stack
> #       Time    Memory  Function        Location
> 1       0.0017  324556  {main}( )       ../backend_dev.php:0
> 2       0.0891  4457868         sfContext->dispatch( )       
> ../backend_dev.php:13
> 3       0.0891  4457912         sfFrontWebController->dispatch( )    ../
> sfContext.class.php:170
> 4       0.0892  4464168         sfController->forward( )     ../
> sfFrontWebController.class.php:48
> 5       0.1181  5054656         sfFilterChain->execute( )    ../
> sfController.class.php:229
> 6       0.1188  5061248         sfRenderingFilter->execute( )        ../
> sfFilterChain.class.php:53
> 7       0.1188  5061248         sfFilterChain->execute( )    ../
> sfRenderingFilter.class.php:33
> 8       0.1191  5070452         sfBasicSecurityFilter->execute( )    ../
> sfFilterChain.class.php:53
> 9       0.1192  5070496         sfFilterChain->execute( )    ../
> sfBasicSecurityFilter.class.php:72
> 10      0.1196  5082256         sfExecutionFilter->execute( )        ../
> sfFilterChain.class.php:53
> 11      0.2778  11817440        sfExecutionFilter->handleView( )     ../
> sfExecutionFilter.class.php:47
> 12      0.2778  11817440        sfExecutionFilter->executeView( )    ../
> sfExecutionFilter.class.php:116
> 13      0.2815  11859256        sfPHPView->render( )         ../
> sfExecutionFilter.class.php:155
> 14      0.2815  11859632        sfPHPView->renderFile( )     
> ../sfPHPView.class.php:
> 179
> 15      0.2855  11973804        require('/home/javier/Aptana_Studio_Workspace/
> dev_repo/cache/backend/dev/modules/autoOrdini/templates/
> indexSuccess.php')      ../sfPHPView.class.php:75
> 16      3.0826  115065148       include_partial( )      ../indexSuccess.php:19
> 17      3.0826  115065148       get_partial( )  ../PartialHelper.php:180
> 18      3.0831  115068964       sfPartialView->render( )     
> ../PartialHelper.php:
> 218
> 19      3.0832  115070248       sfPHPView->renderFile( )     ../
> sfPartialView.class.php:110
> 20      3.0866  115161828       require( 
> '/home/javier/Aptana_Studio_Workspace/
> dev_repo_cashgold/cache/backend/dev/modules/autoOrdini/templates/
> _list.php' )    ../sfPHPView.class.php:75
> 21      3.6215  115636256       sfPropelPager->getResults( )         
> ../_list.php:28
> 22      3.6215  115636668       call_user_func ( )      
> ../sfPropelPager.class.php:
> 117
> 23      3.6216  115636696       ShopOrderPeer::getOrdini( )     ../
> sfPropelPager.class.php:0
> 24      3.6227  115676928       BaseShopOrderPeer::populateObjects( )   ../
> ShopOrderPeer.php:31
> 25      3.6229  115684084       BaseShopOrder->hydrate( )
>
> And then:
>
> Notice: Undefined offset: 5
> Notice: Undefined offset: 6
> 
>
> This is the file BaseShopOrder.php
>
> try {
>
>             $this->orders_id = ($row[$startcol + 0] !== null) ? (int)
> $row[$startcol + 0] : null;
>             $this->sfgu_id = ($row[$startcol + 1] !== null) ? (int)
> $row[$startcol + 1] : null;
>             $this->utenti_email = ($row[$startcol + 2] !== null) ?
> (string) $row[$startcol + 2] : null;
>             $this->utenti_telefono = ($row[$startcol + 3] !== null) ?
> (string) $row[$startcol + 3] : null;
>             $this->customers_name = ($row[$startcol + 4] !== null) ?
> (string) $row[$startcol + 4] : null;            // line 1864
>             $this->customers_company = ($ro

[symfony-users] Trying to use my own method to show a list in the backend: undefined offset notice

2010-12-06 Thread Javier Garcia
Hi,

i'm trying to use my own method to show a list in the backend:

class ShopOrderPeer extends BaseShopOrderPeer {


public static function getOrdini()
{
$con = Propel::getConnection();
$sql = "select customers_name, value, date_purchased,
orders_status from shop_orders LEFT JOIN shop_orders_total  ON
shop_orders.orders_id = shop_orders_total.orders_id";
$stmt = $con->prepare($sql);

$result = $stmt->execute();
$ordini = self::populateObjects($stmt);


return $ordini;

}


}

And this is my generator.yml

generator:
  class: sfPropelGenerator
  param:
model_class:   ShopOrder
theme: admin
non_verbose_templates: true
with_show: false
singular:  ShopOrder
plural:ShopOrders
route_prefix:  shop_order
with_propel_route: 1
actions_base_class:sfActions

config:
  actions: ~
  fields:  ~
  list:
display: [customers_name, date_purchased, orders_status ]
peer_method:  getOrdini
  filter:  ~
  form:~
  edit:~
  new: ~


When i load the page of the list, the list is showed but I get this
erro messages

Notice: Undefined offset: 4 in /home/javier/Aptana_Studio_Workspace/
dev_repo/lib/model/om/BaseShopOrder.php on line 1864
Call Stack
#   TimeMemory  FunctionLocation
1   0.0017  324556  {main}( )   ../backend_dev.php:0
2   0.0891  4457868 sfContext->dispatch( )  ../backend_dev.php:13
3   0.0891  4457912 sfFrontWebController->dispatch( )   ../
sfContext.class.php:170
4   0.0892  4464168 sfController->forward( )../
sfFrontWebController.class.php:48
5   0.1181  5054656 sfFilterChain->execute( )   ../
sfController.class.php:229
6   0.1188  5061248 sfRenderingFilter->execute( )   ../
sfFilterChain.class.php:53
7   0.1188  5061248 sfFilterChain->execute( )   ../
sfRenderingFilter.class.php:33
8   0.1191  5070452 sfBasicSecurityFilter->execute( )   ../
sfFilterChain.class.php:53
9   0.1192  5070496 sfFilterChain->execute( )   ../
sfBasicSecurityFilter.class.php:72
10  0.1196  5082256 sfExecutionFilter->execute( )   ../
sfFilterChain.class.php:53
11  0.2778  11817440sfExecutionFilter->handleView( )../
sfExecutionFilter.class.php:47
12  0.2778  11817440sfExecutionFilter->executeView( )   ../
sfExecutionFilter.class.php:116
13  0.2815  11859256sfPHPView->render( )../
sfExecutionFilter.class.php:155
14  0.2815  11859632sfPHPView->renderFile( )
../sfPHPView.class.php:
179
15  0.2855  11973804require('/home/javier/Aptana_Studio_Workspace/
dev_repo/cache/backend/dev/modules/autoOrdini/templates/
indexSuccess.php')  ../sfPHPView.class.php:75
16  3.0826  115065148   include_partial( )  ../indexSuccess.php:19
17  3.0826  115065148   get_partial( )  ../PartialHelper.php:180
18  3.0831  115068964   sfPartialView->render( )
../PartialHelper.php:
218
19  3.0832  115070248   sfPHPView->renderFile( )../
sfPartialView.class.php:110
20  3.0866  115161828   require( '/home/javier/Aptana_Studio_Workspace/
dev_repo_cashgold/cache/backend/dev/modules/autoOrdini/templates/
_list.php' )../sfPHPView.class.php:75
21  3.6215  115636256   sfPropelPager->getResults( )../_list.php:28
22  3.6215  115636668   call_user_func ( )  
../sfPropelPager.class.php:
117
23  3.6216  115636696   ShopOrderPeer::getOrdini( ) ../
sfPropelPager.class.php:0
24  3.6227  115676928   BaseShopOrderPeer::populateObjects( )   ../
ShopOrderPeer.php:31
25  3.6229  115684084   BaseShopOrder->hydrate( )

And then:

Notice: Undefined offset: 5
Notice: Undefined offset: 6


This is the file BaseShopOrder.php


try {

$this->orders_id = ($row[$startcol + 0] !== null) ? (int)
$row[$startcol + 0] : null;
$this->sfgu_id = ($row[$startcol + 1] !== null) ? (int)
$row[$startcol + 1] : null;
$this->utenti_email = ($row[$startcol + 2] !== null) ?
(string) $row[$startcol + 2] : null;
$this->utenti_telefono = ($row[$startcol + 3] !== null) ?
(string) $row[$startcol + 3] : null;
$this->customers_name = ($row[$startcol + 4] !== null) ?
(string) $row[$startcol + 4] : null;// line 1864
$this->customers_company = ($row[$startcol + 5] !==
null) ? (string) $row[$startcol + 5] : null;
$this->customers_street_address = ($row[$startcol + 6] !==
null) ? (string) $row[$startcol + 6] : null;
$this->customers_suburb = ($row[$startcol + 7] !== null) ?
(string) $row[$startcol + 7] : null;
$this->customers_city = ($row[$startcol + 8] !== null) ?
(string) $row[$startcol + 8] : null;
$this->

Re: [symfony-users] Routing with sf_method question

2010-12-06 Thread Alex Pilon
http://redotheweb.com/2008/08/08/add-request-method-requirement-to-routing-in-symfony-11/

Does
that shed any light for you?

On Mon, Dec 6, 2010 at 11:52, Michael Smith  wrote:

> I have the following routing.yml:
> lead_import_upload:
>  url: /lead/import.:sf_format
>  param:   { module: lead, action: importUpload, sf_format: html }
>  requirements: { sf_method: get }
>
> lead_import_config:
>  url: /lead/import.:sf_format
>  param:   { module: lead, action: importConfig, sf_format: html }
>  requirements: { sf_method: post }
>
> and an importUploadSuccess.php:
> 
>  
>  
> 
>
> But when the form is submitted the importUpload action is called again
> instead of the importConfig action. The form's method is post am I
> missing something here?
>
> Thanks,
> Michael
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Alex Pilon
(613) 608-1480

-- 
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] Call to undefined method myUser::method

2010-12-06 Thread Alex Pilon
That should be working.. when you enable sfGuard you change the base class
of the myUser class to gain access to $this->getUser()->getGuardUser().

Can you check the class type of $this->getUser() ?  [
get_class($this->getUser()) ]

On Mon, Dec 6, 2010 at 11:56, Gareth McCumskey  wrote:

> As far as I am aware $this->getUser() does not access your own class that
> overrides sfBasicSecurityUser but is in fact an instance of
> sfBasicSecurityUser. I stand to be corrected however.
>
> On Mon, Dec 6, 2010 at 3:59 PM, Carlos  wrote:
>
>> Hi,
>>
>> I added some methods to myUser class, and suddenly I can't access to
>> them from the action.
>> $this->getUser()->method returns a "Call to undefined method" error
>> message. I really think it was working before... Maybe I modified any
>> yml file?
>>
>> My myUser class and one of this methods:
>>
>> class myUser extends sfBasicSecurityUser
>> {
>>  const INFO_MESSAGE= 'infoMessages';
>>  const WARNING_MESSAGE = 'warnMessages';
>>  const ERROR_MESSAGE   = 'errorMessages';
>>
>>  /**
>>  * Adds messages to user flash
>>  *
>>  * @param string $msg
>>  * @param string $level
>>  */
>>  public function addMessage($msg, $level = myUser::INFO_MESSAGE)
>>  {
>>// Gets the existing array, returns an empty array otherwise.
>>$flashContent = $this->getFlash($level, array());
>>
>>// If messages doesn't exists, it's loaded into flash.
>>if(!in_array($msg, $flashContent))
>>{
>>  $flashContent[] = $msg;
>>  $this->setFlash($level, $flashContent);
>>}
>>  }
>> ...
>> }
>>
>> Thanks,
>>
>> Carlos
>>
>> --
>> 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
>



-- 
Alex Pilon
(613) 608-1480

-- 
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] Call to undefined method myUser::method

2010-12-06 Thread Gareth McCumskey
As far as I am aware $this->getUser() does not access your own class that
overrides sfBasicSecurityUser but is in fact an instance of
sfBasicSecurityUser. I stand to be corrected however.

On Mon, Dec 6, 2010 at 3:59 PM, Carlos  wrote:

> Hi,
>
> I added some methods to myUser class, and suddenly I can't access to
> them from the action.
> $this->getUser()->method returns a "Call to undefined method" error
> message. I really think it was working before... Maybe I modified any
> yml file?
>
> My myUser class and one of this methods:
>
> class myUser extends sfBasicSecurityUser
> {
>  const INFO_MESSAGE= 'infoMessages';
>  const WARNING_MESSAGE = 'warnMessages';
>  const ERROR_MESSAGE   = 'errorMessages';
>
>  /**
>  * Adds messages to user flash
>  *
>  * @param string $msg
>  * @param string $level
>  */
>  public function addMessage($msg, $level = myUser::INFO_MESSAGE)
>  {
>// Gets the existing array, returns an empty array otherwise.
>$flashContent = $this->getFlash($level, array());
>
>// If messages doesn't exists, it's loaded into flash.
>if(!in_array($msg, $flashContent))
>{
>  $flashContent[] = $msg;
>  $this->setFlash($level, $flashContent);
>}
>  }
> ...
> }
>
> Thanks,
>
> Carlos
>
> --
> 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] Routing with sf_method question

2010-12-06 Thread Michael Smith
I have the following routing.yml:
lead_import_upload:
  url: /lead/import.:sf_format
  param:   { module: lead, action: importUpload, sf_format: html }
  requirements: { sf_method: get }

lead_import_config:
  url: /lead/import.:sf_format
  param:   { module: lead, action: importConfig, sf_format: html }
  requirements: { sf_method: post }

and an importUploadSuccess.php:

  
  


But when the form is submitted the importUpload action is called again
instead of the importConfig action. The form's method is post am I
missing something here?

Thanks,
Michael

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

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


[symfony-users] Re: [Symfony2] Structuring your project (Bundles and entities)

2010-12-06 Thread Arjen
Thanks for the advice.

On 4 dec, 13:39, Nicolas Hurman  wrote:
> Hi,
>
> Your structure makes sense. The point with Sf2 is that there isn't one
> structure you have to follow - just do what you think is best. About the
> Doctrine entities, you could store them in a separate bundle, or in you
> "main" one - basically any of your three bundles. I would personnaly create
> another bundle to store application-level Entities, but really the choice is
> up to you. A third option would be to be to put all your controllers,
> entities in one bundle.
>
> Just make sure you are coherent in your choices - choose one structure and
> try to stick to it.
>
>
>
>
>
>
>
> On Thu, Dec 2, 2010 at 11:26 AM, Arjen  wrote:
> > Hi,
>
> > I'm trying to get to know the SF2 framework, and have some questions
> > about structuring your project. Suppose I'm creating some kind of
> > website where I sell books, consisting of a frontend, backend and
> > possibly an API to query new additions to  the store or get
> > information about authors.
>
> > I would create the following bundles:
>
> >  * Application\BookStore\FrontendBundle
> >  * Application\BookStore\BackendBundle
> >  * Application\BookStore\ApiBundle
>
> > Does this make sense?
>
> > Now, in which bundle should I store the Doctrine entity classes?
> > Should I create another bundle (ModelBundle) containing the entity
> > classes, but without controllers? It makes no sense to me to put the
> > entity classes in one of the bundles above, because they don't really
> > belong to any of these bundles.
>
> > I read through the documentation, but could not find an answer there.
>
> > Any help would be great, 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 > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

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

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


[symfony-users] Call to undefined method myUser::method

2010-12-06 Thread Carlos
Hi,

I added some methods to myUser class, and suddenly I can't access to
them from the action.
$this->getUser()->method returns a "Call to undefined method" error
message. I really think it was working before... Maybe I modified any
yml file?

My myUser class and one of this methods:

class myUser extends sfBasicSecurityUser
{
  const INFO_MESSAGE= 'infoMessages';
  const WARNING_MESSAGE = 'warnMessages';
  const ERROR_MESSAGE   = 'errorMessages';

  /**
  * Adds messages to user flash
  *
  * @param string $msg
  * @param string $level
  */
  public function addMessage($msg, $level = myUser::INFO_MESSAGE)
  {
// Gets the existing array, returns an empty array otherwise.
$flashContent = $this->getFlash($level, array());

// If messages doesn't exists, it's loaded into flash.
if(!in_array($msg, $flashContent))
{
  $flashContent[] = $msg;
  $this->setFlash($level, $flashContent);
}
  }
...
}

Thanks,

Carlos

-- 
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] Question about accessing a child class from a parent class

2010-12-06 Thread Diego Bello
On Mon, Dec 6, 2010 at 9:16 AM, Javier Garcia  wrote:

> Hi,
>
> i have this schema:
>
>  shop_products:
>_attributes: { phpName: ShopProduct }
>products_id: { phpName: Id, type: INTEGER, size: '11', primaryKey:
> true, autoIncrement: true, required: true }
>products_quantity: { phpName: Quantity, type: INTEGER, size: '4',
> required: true }
>products_model: { phpName: Model, type: VARCHAR, size: '12',
> required: false }
>products_image: { phpName: Image, type: VARCHAR, size: '64',
> required: false }
>products_price: { phpName: Price, type: DECIMAL, size: '15',
> scale: '4', required: false, defaultValue: '0.' }
>products_date_added: { phpName: DateAdded, type: TIMESTAMP,
> required: true }
>products_last_modified: { phpName: LastModified, type: TIMESTAMP,
> required: false }
>products_date_available: { phpName: DateAvailable, type:
> TIMESTAMP, required: false }
>products_weight: { phpName: Weight, type: DECIMAL, size: '5',
> scale: '2', required: true }
>products_carati: { phpName: Carati, type: FLOAT, required: false,
> defaultValue: '1' }
>products_status: { phpName: Status, type: TINYINT, size: '1',
> required: true }
>manufacturers_id: { phpName: ManufacturerId, type: INTEGER, size:
> '11', required: false, foreignTable: shop_manufacturers,
> foreignReference: manufacturers_id, onDelete: SETNULL }
>products_ordered: { phpName: Ordered, type: INTEGER, size: '11',
> required: true, defaultValue: '0' }
>
>
>  shop_categories:
>_attributes: { phpName: ShopCategory }
>categories_id: { phpName: Id, type: INTEGER, size: '11',
> primaryKey: true, autoIncrement: true, required: true }
>categories_image: { phpName: Image, type: VARCHAR, size: '64',
> required: false }
>parent_id: { phpName: ParentId, type: INTEGER, size: '11',
> required: true, defaultValue: '0', foreignTable: shop_categories,
> foreignReference: categories_id, onDelete: CASCADE, onUpdate:
> CASCADE }
>sort_order: { phpName: SortOrder, type: INTEGER, size: '3',
> required: false }
>date_added: { phpName: DateAdded, type: TIMESTAMP, required:
> false }
>last_modified: { phpName: LastModified, type: TIMESTAMP, required:
> false }
>
>
I'm not sure if the foreign table name is the correct. You are refering to
the same table instead of shop_categories_description.
Again, I haven't worked in symfony's database models in a while :p


>  shop_categories_description:
>_attributes: { phpName: ShopCategoryDescription }
>categories_id: { phpName: CategoryId, type: INTEGER, size: '11',
> primaryKey: true, required: true, defaultValue: '0', foreignTable:
> shop_categories, foreignReference: categories_id, onDelete: CASCADE,
> onUpdate: CASCADE }
>language_id: { phpName: LanguageId, type: INTEGER, size: '11',
> primaryKey: true, required: true, defaultValue: '1', foreignTable:
> culture, foreignReference: id, onDelete: CASCADE, onUpdate: CASCADE }
>categories_name: { phpName: Name, type: VARCHAR, size: '32',
> required: true }
>
>
If one shop_category has only one description then you should have all that
in one table.



> Then, I have created an admin module from the ShopProducts model, but
> when i try to go to it it says:
>
> Class "ShopCategory" must implement a "__toString" method to be
> rendered in a "sfWidgetFormPropelChoice" widget
>
> As you can see, the model where the names of the categories are, is
> ShopCategoriesDescription. So, how could i get the name of the
> categories from the ShopCategory model class?
>
> Javier
>
> sf 1.4/propel
>

Look in the documentation how to create a toString function for
shop_category. In there you should point to something like this:

# Note that "$this" is the current shop_category

$this->getShop_categories_description->getCategories_name();

I'm not sure about the syntax. It could not use "_" but use the uppercase of
the first letter of a word.

Regards,
-- 
Diego Bello Carreño

-- 
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: Propel 1.5 select method problem

2010-12-06 Thread Massimiliano Arione
On 6 Dic, 13:19, gurkanoluc  wrote:
> I'm trying to use Symfony 1.4.8 wih sfPropel15Plugin. When i try to
> use methods like findPk it works very well. But when i try to use
> select function, it's not working. My Schema is 
> :http://paste.pocoo.org/show/301282/,
> My query code is :http://paste.pocoo.org/show/301283/. It generates
> error like this :http://paste.pocoo.org/show/301284/.

Try using phpName of field, e.g. "Name" instead of "name".

cheers
Massimiilano

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

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


Re: [symfony-users] symfony hangs up

2010-12-06 Thread Gareth McCumskey
Did you clear cache?

symfony cc

On Thu, Dec 2, 2010 at 12:03 PM, dianacastillo wrote:

> I have symfony installed in windows and it works fine when I go here
> http://localhost:8080//frontend_dev.php/
> I generated the data model but when I try to run
> http://localhost:8080//frontend_dev.php/
> it times out and I have to restart php and apache.
>
> I dont have an accelerator installed, could it be because of this?
> Which accelerator should I install on windows and how is it
> installed?
>
> 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
>



-- 
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] Propel 1.5 select method problem

2010-12-06 Thread gurkanoluc
Hello,

I asked question in irc, but can not get answer.

I'm trying to use Symfony 1.4.8 wih sfPropel15Plugin. When i try to
use methods like findPk it works very well. But when i try to use
select function, it's not working. My Schema is : 
http://paste.pocoo.org/show/301282/,
My query code is : http://paste.pocoo.org/show/301283/. It generates
error like this : http://paste.pocoo.org/show/301284/.

Is there any idea how to fix this.

Thanks for your answers.

-- 
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] Question about accessing a child class from a parent class

2010-12-06 Thread Javier Garcia
Hi,

i have this schema:

  shop_products:
_attributes: { phpName: ShopProduct }
products_id: { phpName: Id, type: INTEGER, size: '11', primaryKey:
true, autoIncrement: true, required: true }
products_quantity: { phpName: Quantity, type: INTEGER, size: '4',
required: true }
products_model: { phpName: Model, type: VARCHAR, size: '12',
required: false }
products_image: { phpName: Image, type: VARCHAR, size: '64',
required: false }
products_price: { phpName: Price, type: DECIMAL, size: '15',
scale: '4', required: false, defaultValue: '0.' }
products_date_added: { phpName: DateAdded, type: TIMESTAMP,
required: true }
products_last_modified: { phpName: LastModified, type: TIMESTAMP,
required: false }
products_date_available: { phpName: DateAvailable, type:
TIMESTAMP, required: false }
products_weight: { phpName: Weight, type: DECIMAL, size: '5',
scale: '2', required: true }
products_carati: { phpName: Carati, type: FLOAT, required: false,
defaultValue: '1' }
products_status: { phpName: Status, type: TINYINT, size: '1',
required: true }
manufacturers_id: { phpName: ManufacturerId, type: INTEGER, size:
'11', required: false, foreignTable: shop_manufacturers,
foreignReference: manufacturers_id, onDelete: SETNULL }
products_ordered: { phpName: Ordered, type: INTEGER, size: '11',
required: true, defaultValue: '0' }


  shop_categories:
_attributes: { phpName: ShopCategory }
categories_id: { phpName: Id, type: INTEGER, size: '11',
primaryKey: true, autoIncrement: true, required: true }
categories_image: { phpName: Image, type: VARCHAR, size: '64',
required: false }
parent_id: { phpName: ParentId, type: INTEGER, size: '11',
required: true, defaultValue: '0', foreignTable: shop_categories,
foreignReference: categories_id, onDelete: CASCADE, onUpdate:
CASCADE }
sort_order: { phpName: SortOrder, type: INTEGER, size: '3',
required: false }
date_added: { phpName: DateAdded, type: TIMESTAMP, required:
false }
last_modified: { phpName: LastModified, type: TIMESTAMP, required:
false }



  shop_categories_description:
_attributes: { phpName: ShopCategoryDescription }
categories_id: { phpName: CategoryId, type: INTEGER, size: '11',
primaryKey: true, required: true, defaultValue: '0', foreignTable:
shop_categories, foreignReference: categories_id, onDelete: CASCADE,
onUpdate: CASCADE }
language_id: { phpName: LanguageId, type: INTEGER, size: '11',
primaryKey: true, required: true, defaultValue: '1', foreignTable:
culture, foreignReference: id, onDelete: CASCADE, onUpdate: CASCADE }
categories_name: { phpName: Name, type: VARCHAR, size: '32',
required: true }

Then, I have created an admin module from the ShopProducts model, but
when i try to go to it it says:

Class "ShopCategory" must implement a "__toString" method to be
rendered in a "sfWidgetFormPropelChoice" widget

As you can see, the model where the names of the categories are, is
ShopCategoriesDescription. So, how could i get the name of the
categories from the ShopCategory model class?

Javier

sf 1.4/propel

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