Re: [symfony-users] Learning Symfony2 is difficult because...

2010-12-07 Thread Fabien Potencier
On 12/7/10 1:24 AM, Flukey wrote: 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? The Doctrine controller has been

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

2010-12-07 Thread Fabien Potencier
On 12/6/10 9:06 PM, Florian wrote: 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 ? A Paginator is probably not an object you want to manage with the DIC. The DIC is good at managing "global" obj

[symfony-users] sfwidgetformpropelchoice problem

2010-12-07 Thread Helloise Smit
how do i get the value selected pls? 'catcher_id' => new sfWidgetFormPropelChoice(array('model' => 'LpmCatcher', 'add_empty' => false, )), do i use the onChange? because i get an error if add that in. i use symfony 1.4.5..i am very new to symfony based on the value that is selected i mus

[symfony-users] Trying to add a field from another model in a backend list.

2010-12-07 Thread Javier Garcia
Hi, I have created an inner join criteria to show a list of elements in the backend. This are my models: user: name: { type: varchar(255) } age: { type: integer } article: title:{ type: varchar(255) } content: { type: varchar(255) }

[symfony-users] Re: Learning Symfony2 is difficult because...

2010-12-07 Thread Florian
Hi, Short answer, from my little experience on the framework: You're true, some bundles are outdated, due to the fact things are moving fast, and the documentation is impacted too. So a lot of old slides are showing some examples that simply doesn't work! You should always follow changes on rece

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

2010-12-07 Thread Florian
Ok, it confirms what I was thinking. But one of the goals of DI is to give flexibility and externalize (or "invert") the class instanciations too. So what if the end user wants to change the Paginator class ? Should I set the class name as a DI parameter and then use it to create my class ? examp

Re: [symfony-users] 500 internal server error

2010-12-07 Thread Justen Doherty
switch to dev mode by adding _dev.php to your URL - e.g. frontend_dev.php (dev mode) frontend.php (production mode) On Tue, Dec 7, 2010 at 4:37 AM, jyoti wrote: > Hi > > I have made a symfony project on my svn server . > When I submit the form which reads user details , I get the following > er

[symfony-users] Re: Learning Symfony2 is difficult because...

2010-12-07 Thread Flukey
Hi Fabien, Thanks for the prompt response and clarifying that. On Dec 7, 9:15 am, Fabien Potencier wrote: > On 12/7/10 1:24 AM, Flukey wrote: > > > Also, from reading a presentation (http://www.slideshare.net/jwage/ > > symfony2-and-doctrine2-integration) i'm confused about actions. In > > thi

[symfony-users] Re: Learning Symfony2 is difficult because...

2010-12-07 Thread Flukey
Hi Florian, Thanks for the heads up for DoctrineUserBundle(https://github.com/ knplabs/DoctrineUserBundle). The code layout there makes a lot of sense to me. It's clean and consistent. One that thing that confuses me is the files in Document and Model directories are *exactly* the same, not sure w

Re: [symfony-users] Re: Learning Symfony2 is difficult because...

2010-12-07 Thread Daniel Lohse
They are the same because this bundle can also persist not only to SQL databases with the Doctrine 2 ORM but also to MongoDB (NoSQL) using the Doctrine 2 ODM. :) Cheers, Daniel Sent from my iPad On Dec 7, 2010, at 10:17 AM, Flukey wrote: > Hi Florian, > > Thanks for the heads up for Doctri

Re: [symfony-users] Re: Learning Symfony2 is difficult because...

2010-12-07 Thread Tim Nagel
They aren't the same - the Doctrine mapping data is different for each one, depending on what you configure with the bundle. Check out DoctrineUserBundle/Resources/config/doctrine/metadata t On Tue, Dec 7, 2010 at 21:45, Daniel Lohse wrote: > They are the same because this bundle can also per

[symfony-users] Error when trying to declare a variable as a parameter. No problem when I declare it inside the function.

2010-12-07 Thread Javier Garcia
Hi, I have this static function: public static function getOrdini($sort_order = 4) { $con = Propel::getConnection(); $sql = "select * from shop_orders LEFT JOIN shop_orders_total ON shop_orders.orders_id = shop_orders_total.orders_id AND sh

[symfony-users] Re: 500 internal server error

2010-12-07 Thread Javier Garcia
Or look at the log of the server (apache2 /var/log/apache2). On 7 Dic, 10:03, Justen Doherty wrote: > switch to dev mode by adding _dev.php to your URL - e.g. frontend_dev.php > (dev mode) frontend.php (production mode) > > > > On Tue, Dec 7, 2010 at 4:37 AM, jyoti wrote: > > Hi > > > I have mad

[symfony-users] [Symfony 2 PR4]Setter injection in controllers

2010-12-07 Thread benjamin.dulau
Hi, Where can i find an example for setter injection in Symfony 2 please ? I'm trying to do something like : use Application\HelloBundle\Service; class HelloController extends Controller { /** * @var ITestService */ private $testService; public function indexAction($name)

[symfony-users] Diffrenet route for authenticated user on same URL

2010-12-07 Thread Vikos
Hello. I need to use different action on main page for logined and non logined users. Is it possible to create a route with an authetication based requirement rule? I haven't found any plugin for this Previously tanks the answers Vikos -- If you want to report a vulnerability issue

[symfony-users] Re: 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-07 Thread saichand
Hi Alex, here is the code : public function getEclassForStudent($eclassId, $studentId) { return $this->createQuery('e') ->where('e.id = ?', $eclassId) ->leftJoin('e.EclassStudent es WITH es.student_id = ? AND es.status = ? ', array($studentId, Eclas

[symfony-users] Re: 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-07 Thread saichand
and this , public function executeEdit(sfWebRequest $request) { $this->which = 'edit'; $this->forward404Unless($eclass = Doctrine::getTable('eclass')- >find(array($request->getParameter('id'))), sprintf('Object eclass does not exist (%s).', $reque

Re: [symfony-users] Re: Exception occured exception 'Doctrine_Connection_Mysql_Exception' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are a

2010-12-07 Thread Alex Pilon
Hmm, well I do not know what might be causing this error as I have never myself received an exception like this. Have you tried placing break points through out the code to isolate where exactly the code is failing? Are you able to run getEclassForStudent from a unit test and receive an expected re

[symfony-users] Trying to create a new action in a backend module: "Action "module/show" does not exist."

2010-12-07 Thread Javier Garcia
Hi, i have created a new action called executeDetagli() in backend/modules/ ordini/actions/actions.class.php. When I try to go to "backend_dev.php/ordini/detagli" It gives me this error: 404 | Not Found | sfError404Exception Action "ordini/show" does not exist. stack trace * at () in

[symfony-users] Re: 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-07 Thread Sri
Hi Alex, Here is the code, public function getEclassForStudent($eclassId, $studentId) { return $this->createQuery('e') ->where('e.id = ?', $eclassId) ->leftJoin('e.EclassStudent es WITH es.student_id = ? AND es.status = ? ', array($studentId, Eclas

[symfony-users] Re: autoloading

2010-12-07 Thread JF Simon
This is a PHP class from intl module http://www.php.net/manual/en/numberformatter.create.php On 4 déc, 17:02, Jay Bs wrote: > Hello > > I have this same problem using symfony2 sandbox PR4. Did you manage to > resolve this? The form works perfectly if I comment out the > integerfield bit. > > Tha

[symfony-users] Re: Trying to create a new action in a backend module: "Action "module/show" does not exist."

2010-12-07 Thread Javier Garcia
I have realized that it works perfect when i add "/" at the end of the url, but why??? I don't have any problem to go to the New action just using "backend_dev.php/ordini/new". On 7 Dic, 17:50, Javier Garcia wrote: > Hi, > > i have created a new action called executeDetagli() in backend/modules/

[symfony-users] [Symfony2] Doctrine2 create column integer unsigned with Doctrin2

2010-12-07 Thread Francis Besset
Hi all, I have a problem to create a columns with Doctrine2. I use annotations to create my schema. When i write this, I have no problem : /** * @orm:Id * @orm:Column(type="integer") * @orm:GeneratedValue(strategy="IDENTITY") */ protected $id; public function set

[symfony-users] Re: Setter injection in controllers

2010-12-07 Thread Marijn
Perhaps this article will help you: http://avalanche123.com/post/1215273326/symfony2-controller-testing On Dec 7, 1:44 pm, "benjamin.dulau" wrote: > Hi, > > Where can i find an example for setter injection in Symfony 2 please ? > > I'm trying to do something like : > > use Application\HelloBundl

Re: [symfony-users] Diffrenet route for authenticated user on same URL

2010-12-07 Thread Gareth McCumskey
Take a look at security.yml documentation: http://www.symfony-project.org/reference/1_4/en/08-Security On Tue, Dec 7, 2010 at 4:22 PM, Vikos wrote: > Hello. > > I need to use different action on main page for logined and non > logined users. > > Is it possible to create a route with an authetic