Re: R: [symfony-users] Re: Relationships and i18n
Hello, I met the same problem with symfony 1.4 I think there's a symfony bug. However i hacked the class sfDoctrineRecordI18Filter : add of one line : $culture = substr($culture, 0, 2); It works. I'll be interested of knowing if this will help. Link : http://www.developpez.net/forums/d1008846/php/bibliotheques-frameworks/symfony/orm/i18n-culture/ Christophe (captainiglo) public function filterGet(Doctrine_Record $record, $name) { $culture = sfDoctrineRecord::getDefaultCulture(); //* ajout CT pour ne récupérer que la langue $culture = substr($culture, 0, 2); if (isset($record['Translation'][$culture])) { return $record['Translation'][$culture][$name]; } else { $defaultCulture = sfConfig::get('sf_default_culture'); return $record['Translation'][$defaultCulture][$name]; } } On Feb 18, 6:49 pm, Paolo Niccolò Giubelli wrote: > Thank you for your answer, I already did it, but it still doesn't work :( > > -Messaggio originale- > Da: symfony-users@googlegroups.com [mailto:symfony-users@googlegroups.com] > Per conto di Roman Gnatyuk > Inviato: venerdì 18 febbraio 2011 15.28 > A: Symfony users > Oggetto: [symfony-users] Re: Relationships and i18n > > Try in your form class embedd I18n forms: > > ... > $this->embedI18n(array('ru', 'uk')); > ... > And check that "i18n: true" is set in settings.yml of your backend application > > On 17 фев, 19:43, Paolo Niccolò Giubelli > wrote: > > > > > Hi! > > > I have the following schema: > > > Category: > > > actAs: > > > Timestampable: ~ > > > I18n: > > > fields: [name] > > > columns: > > > name: > > > type: string(255) > > > relations: > > > Category: > > > class: Category > > > local: parent_id > > > foreign: child_id > > > refClass: CategoryReference > > > foreignAlias: Parent > > > Products: > > > type: many > > > class: Product > > > local: id > > > foreign: category_id > > > CategoryReference: > > > columns: > > > parent_id: > > > type: integer > > > primary: true > > > child_id: > > > type: integer > > > primary: true > > > As you can see, Category has a relation with itself, so to create a > > category tree. > > > Everything works fine until I try to edit a category using > > admin-generated forms, as it says: > > > SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.name' in > > 'field list' > > > It tries to retrieve “name” field from “category” table instead of > > “category_translation”… why? :-| Is this a bug? > > > I spent a lot of time trying to find a solution, but I didn’t succeeded. > > > I used this schema in other projects, without i18n, and it works flawlessy. > > > I’m using symfony 1.4.9 (this happens also on 1.4.8). > > > Thank you 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 > athttp://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] query error
$value = Doctrine_Core::getTable('Activation') ->createQuery('a') ->where('a.temp = ?',$string) ->execute(); $value = new FriendlynationActivation(); $mail = $value->getEmail(); $query = Doctrine_Core::getTable('User') ->createQuery('a') ->where('a.email = ?',$email); $user = $query->execute(); $user->set('password',$newpassword); $user->save(); I am getting error No description for object of class "Activation" , when i am trying to retrive email from database and also please suggest me how the update query works in symfony -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Symfony Oracle connection problem
Hi I had the same problem. You probably don't have oci8 extension installed. Remember that there are two php.ini's /etc/php5/apache/php.ini - this one stands for apache configuration /etc/php5/cli/php.ini - this one is you should check if there is extension=oci8.so Try to fire phpinfo() from cli. Second thing is that you have to have syntax of schema.yml like Gabriele wrote, : all: doctrine: class: sfDoctrineDatabase param: dsn: oracle://:@:/ Regards Madeyt On 18 Lut, 05:11, Altansuh A wrote: > HI. > I'm using Doctrine 1.2, Symfony 1.4.8, Oracle 10g > > Database.yml > all: > doctrine: > class: sfDoctrineDatabase > param: > dsn: 'oracle:host=myhost;dbname=mydb' > username: test > password: test > run command Doctrine:build --all > > Notice: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed > 'OCI_COMMIT_ON_SUCCESS' in > > myproject\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor > \doctrine\Doctrine\Connection.php on line 484 > > help me. > RG A.Altansukh -- 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] [Symfony2] - MenuBundle
I'm getting the error: [ERROR 1845] Element '{http://www.symfony-project.org/schema/dic/services}container': No matching global declaration available for the validation root. (in /var/www/symfony-sandbox/src/Sensio/MsmBundle/Resources/config/menu.xml - line 4, column 0)Here's my menu.xml file copied from twig-integration.markdown http://www.symfony-project.org/schema/dic/services"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd";> Sensio\MsmBundle\Menu\MainMenu Here's my config.yml framework: charset: UTF-8 error_handler: null csrf_protection: enabled: true secret: xx router:{ resource: "%kernel.root_dir%/config/routing.yml" } validation:{ enabled: true, annotations: true } templating:{ engines: ['twig', 'php'] } #assets_version: SomeVersionScheme session: default_locale: en lifetime: 3600 auto_start: true main.menu: ~ menu.twig: ~ Any help would be appreciated. -- 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: chekbox creating or not a line into a link table
finally i prefer the method with the checkbox. $this->setWidget('lien', new sfWidgetFormInputCheckbox(array(), $array_sup)); $this->validatorSchema['lien'] = new sfValidatorCallback(array( 'callback' => array($this, 'MonValidator') )); ... function MonValidator($validator, $value, $arguments) { echo "MonValidator value=".$value; if ($value == "on") { i receive "on" when the checkbox is checked all is ok but the problem is that there is no call to the callback when the checkbox is unchecked how to do this ? thanks On 18 fév, 12:16, l3ia-etu wrote: > well, i've added the relation into one of the table linked, like we > can find into sfGuardUser with sfGroup (the link table is > sfGuardUserGroup) > > CommandeOperationTechnique: > columns: > commande_id: { type: integer , notnull: true} > ot_id: { type: integer , notnull: true} > quantite: { type: integer , notnull: true} > fichier: { type: string(255), notnull: true } > nom_original_fichier: { type: string(255), notnull: true } > relations: > Commande: { local: commande_id, onDelete: CASCADE } > OperationTechnique: { local: ot_id } > supplements: > class: OperationTechniqueSupplement > local: cot_id > foreign: ots_id > refClass: CommandeOperationTechniqueSupplement > foreignAlias: CommandeOperationTechniques > > the function public function savesupplementsList($con = null) > is added, with some others things > > i logged that i'm really go through > $this->object->link('supplements', array_values($link)); > > but no line is created in CommandeOperationTechniqueSupplement > > is there another thing to do ? > > thanks > > On 17 fév, 18:40, l3ia-etu wrote: > > > > > > > > > Hello everyone, > > > I have a link table: > > CommandeOperationTechniqueSupplement: > > columns: > > cot_id: { type: integer , notnull: true} > > ots_id: { type: integer , notnull: true} > > relations: > > CommandeOperationTechnique: { local: cot_id, onDelete: CASCADE } > > OperationTechniqueSupplement: { local: ots_id } > > > and i would like to create a form with a checkbox, to create or not > > the line beetwen the 2 others tables: > > > so i thought that it was a good idea to use sfValidatorCallback: > > when the validator action will be there, i could create or not the > > line > > > $this->validatorSchema['lien'] = new > > sfValidatorCallback(array( > > 'callback' => array($this, 'MonValidator') > > )); > > > function MonValidator($validator, $value) > > { > > die( "MonValidator=".$value); > > } > > > but i never go into MonValidator (the die would stop everything) > > > is there a better way, or why does this doesn't works ? > > > thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] [Symfony2] Regular expressions in routing patterns or how to make a “default” route
Hi, guys! In my application I would like all unresolved URIs to be passed to the default action of some controller. In other words I want to substitute standard NotFoundHttpException with something else, always having an instance of the my controller and manipulating with it. This is what I have in the very end of my routing.yml file: myroute: pattern: /.* defaults: { _controller: MyBundle:DefaultRoute} Unfortunately Symfony2 does not do what I expect and throws NotFoundHttpException saying that it could not find the route. I tried various combination of symbols to achieve the goal, but none of them worked. Does anyone know how to match all URIs of the entire application or a subdirectory regardless the separators (/ symbols)? -- 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: doctrine dbal connection
Hello, I do experience the the same problem, after following the tutorials and configurations as provided in: http://docs.symfony-reloaded.org/master/guides/doctrine The dbal connection itself seems to work. When I manually create a a table in the database and then place the following code in a controller: $conn = $this->get('database_connection'); $users = $conn->fetchAll('SELECT * FROM test'); everything works as expected and $users contains the results from the query. Any hint on where the problem could be would be really appreciated. Thanks, Daniel -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
R: [symfony-users] Re: Relationships and i18n
Thank you for your answer, I already did it, but it still doesn't work :( -Messaggio originale- Da: symfony-users@googlegroups.com [mailto:symfony-users@googlegroups.com] Per conto di Roman Gnatyuk Inviato: venerdì 18 febbraio 2011 15.28 A: Symfony users Oggetto: [symfony-users] Re: Relationships and i18n Try in your form class embedd I18n forms: ... $this->embedI18n(array('ru', 'uk')); ... And check that "i18n: true" is set in settings.yml of your backend application On 17 фев, 19:43, Paolo Niccolò Giubelli wrote: > Hi! > > I have the following schema: > > Category: > > actAs: > > Timestampable: ~ > > I18n: > > fields: [name] > > columns: > > name: > > type: string(255) > > relations: > > Category: > > class: Category > > local: parent_id > > foreign: child_id > > refClass: CategoryReference > > foreignAlias: Parent > > Products: > > type: many > > class: Product > > local: id > > foreign: category_id > > CategoryReference: > > columns: > > parent_id: > > type: integer > > primary: true > > child_id: > > type: integer > > primary: true > > As you can see, Category has a relation with itself, so to create a > category tree. > > Everything works fine until I try to edit a category using > admin-generated forms, as it says: > > SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.name' in > 'field list' > > It tries to retrieve “name” field from “category” table instead of > “category_translation”… why? :-| Is this a bug? > > I spent a lot of time trying to find a solution, but I didn’t succeeded. > > I used this schema in other projects, without i18n, and it works flawlessy. > > I’m using symfony 1.4.9 (this happens also on 1.4.8). > > Thank you 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 -- 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 install sfCaptcha plugin into netbeans
Hello, Can you please explain to me how to install sfCaptcha plugin into netbeans? I tried to do this but i did't succeed. -- 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] R: i18n and nested sets
I also tried to add the query: $this->widgetSchema['parent_id'] = new sfWidgetFormDoctrineChoice(array( 'model' => 'Page', 'order_by' => array('scope, LFT', ''), 'query' => Doctrine::getTable('Page')-> createQuery('p')->leftJoin('p.Translation ct') )); But as it happened in other attempts, i get this: Unknown relation alias Translation L Da: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@gmail.com] Inviato: venerdì 18 febbraio 2011 17.41 A: symfony-users@googlegroups.com Oggetto: i18n and nested sets After 48h of brainstorming I’m still unable of doing a simple internationalized category nested set with Doctrine and Symfony. Please, help me! ;-) This is my simple schema: Page: actAs: Timestampable: NestedSet: hasManyRoots: true rootColumnName: scope I18N: fields: [title, nav_title, description] columns: title: type: string nav_title: type: string description: type: string I built everything with doctrine:build –all and created admin generated CRUD. I changed the configure() method as this: class PageForm extends BasePageForm { public function configure() { $this->embedI18n(array('en', 'it')); unset($this["created_at"]); unset($this["updated_at"]); $this->widgetSchema['parent_id'] = new sfWidgetFormDoctrineChoice(array( 'model' => 'Page', 'order_by' => array('scope, LFT', '') )); $this->validatorSchema['parent_id'] = new sfValidatorDoctrineChoice(array( 'required' => false, 'model' => 'Page' )); } } I can create a new entry but when I try do edit it I get this: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'p.title' in 'field list'. Failing Query: "SELECT p.id AS p__id, p.title AS p__title, p.nav_title AS p__nav_title, p.description AS p__description, p.created_at AS p__created_at, p.updated_at AS p__updated_at, p.scope AS p__scope, p.lft AS p__lft, p.rgt AS p__rgt, p.level AS p__level FROM page p ORDER BY p.scope, LFT " I made every possible attempt… the problem persists! It only occurs because of the “parent” widget…. Any help?? Thank you in advance!!! Paolo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] i18n and nested sets
After 48h of brainstorming I’m still unable of doing a simple internationalized category nested set with Doctrine and Symfony. Please, help me! ;-) This is my simple schema: Page: actAs: Timestampable: NestedSet: hasManyRoots: true rootColumnName: scope I18N: fields: [title, nav_title, description] columns: title: type: string nav_title: type: string description: type: string I built everything with doctrine:build –all and created admin generated CRUD. I changed the configure() method as this: class PageForm extends BasePageForm { public function configure() { $this->embedI18n(array('en', 'it')); unset($this["created_at"]); unset($this["updated_at"]); $this->widgetSchema['parent_id'] = new sfWidgetFormDoctrineChoice(array( 'model' => 'Page', 'order_by' => array('scope, LFT', '') )); $this->validatorSchema['parent_id'] = new sfValidatorDoctrineChoice(array( 'required' => false, 'model' => 'Page' )); } } I can create a new entry but when I try do edit it I get this: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'p.title' in 'field list'. Failing Query: "SELECT p.id AS p__id, p.title AS p__title, p.nav_title AS p__nav_title, p.description AS p__description, p.created_at AS p__created_at, p.updated_at AS p__updated_at, p.scope AS p__scope, p.lft AS p__lft, p.rgt AS p__rgt, p.level AS p__level FROM page p ORDER BY p.scope, LFT " I made every possible attempt… the problem persists! It only occurs because of the “parent” widget…. Any help?? Thank you in advance!!! Paolo -- 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: Relationships and i18n
Try in your form class embedd I18n forms: ... $this->embedI18n(array('ru', 'uk')); ... And check that "i18n: true" is set in settings.yml of your backend application On 17 фев, 19:43, Paolo Niccolò Giubelli wrote: > Hi! > > I have the following schema: > > Category: > > actAs: > > Timestampable: ~ > > I18n: > > fields: [name] > > columns: > > name: > > type: string(255) > > relations: > > Category: > > class: Category > > local: parent_id > > foreign: child_id > > refClass: CategoryReference > > foreignAlias: Parent > > Products: > > type: many > > class: Product > > local: id > > foreign: category_id > > CategoryReference: > > columns: > > parent_id: > > type: integer > > primary: true > > child_id: > > type: integer > > primary: true > > As you can see, Category has a relation with itself, so to create a category > tree. > > Everything works fine until I try to edit a category using admin-generated > forms, as it says: > > SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.name' in 'field > list' > > It tries to retrieve “name” field from “category” table instead of > “category_translation”… why? :-| Is this a bug? > > I spent a lot of time trying to find a solution, but I didn’t succeeded. > > I used this schema in other projects, without i18n, and it works flawlessy. > > I’m using symfony 1.4.9 (this happens also on 1.4.8). > > Thank you 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] How to use array in routing requirements?
in app.yml all: .array test: [ 1, 2, 3 ] in routing.yml route_name: url: /uri/variable/:variable param: { module: main, action: action } requirements: #want to use here something like %app_test%, but it not works variable: (?:1|2|3) sf_method: [get] so, how to use array from config in routing requirements? -- 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: doctrine:generate:Entities update not possible ?
Are accessing the console in the app folder? Here are the commands. php app/console doctrine:ensure-production-settings php app/console doctrine:generate:entities php app/console doctrine:generate:proxies php app/console doctrine:generate:repositories HelloBundle php app/console doctrine:schema:create php app/console doctrine:schema:update -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Symfony Oracle connection problem
Hello Altansuh: Just bumped on the same problem... For me it worked with this syntax (strip all "<>" brackets off) : all: doctrine: class: sfDoctrineDatabase param: dsn: oracle://:@:/ HTH, Gabriele -- 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] No EntityToIDTransformer in PR6 ?
It was removed because its implementation was buggy/bad. You can copy the old implementation into your project and use it this way. A new version of it will come soon. Bernhard -- 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] [Symfony2] DateField type error
Hi Lideln, The @Date constraint checks for date strings with format "-MM-DD". What you want is @AssertType("\DateTime"). Maybe we have a naming issue here. Bernhard -- 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] [Symfony2] User authentication
If you extended your controller class from Symfony\Bundle\FrameworkBundle\Controller\Controller, you should be able to access the container as an instance variable, like $this->container. regards Stefan Paschke On Feb 18, 2011, at 8:29 AM, Sébastien Roch wrote: > Hi, > I don't have much experience with authentication yet, but I know you can > get the service container injected into your class like this (in > config.yml): > > api.user.controller: >class: Application\ApiBundle\Controller\UserController >arguments: >- @request >- @service_container > > The "service_container" service is defined by the framework. > Hope it brings you a step forward. > > I look forward to see your sandbox as example for auth :-) > Sébastien > > On 2/16/11 5:42 PM, Ed wrote: >> Hello again, >> >> I'm currently trying to evaluate Symfony 2 and I'm working on a little >> sandbox site to get my head around things, but I'm a bit worried by >> the documentation, I can't seem to find much in the way of tutorials >> and the symfony-reloaded docs tend to assume too much prior knowledge. >> Is this something which is likely to be improved upon once it's ready >> for public consumption (end of March isn't it?). >> >> For example, I have a user class I generate completely via doctrine >> I'm trying to hook it into the login system. >> >> I made it implement AccountInterface, it already has the salt, >> username and password fields and I hacked a function to return the >> roles etc for now. Have the security settings setup to use that class >> and so forth. >> >> The next step just says about using.. >> >> $user = $container->get('security.context')->getUser(); >> >> .. It doesn't say where, so I assumed I could do this within one of my >> bundle controllers but I can't for the life of me figure out how to >> get the container object or the security.context using what I have. >> Any ideas? >> >> It would be great if the Sensio HelloBundle (or some other tutorial >> bundle) had authentication and forms (for creating and editing >> objects) already included for picking apart. I can hopefully put my >> little sandbox one online for others to pick apart, but I need to get >> unstuck myself first! >> >> 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 -- 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] [Symfony2] User authentication
Hi, I don't have much experience with authentication yet, but I know you can get the service container injected into your class like this (in config.yml): api.user.controller: class: Application\ApiBundle\Controller\UserController arguments: - @request - @service_container The "service_container" service is defined by the framework. Hope it brings you a step forward. I look forward to see your sandbox as example for auth :-) Sébastien On 2/16/11 5:42 PM, Ed wrote: > Hello again, > > I'm currently trying to evaluate Symfony 2 and I'm working on a little > sandbox site to get my head around things, but I'm a bit worried by > the documentation, I can't seem to find much in the way of tutorials > and the symfony-reloaded docs tend to assume too much prior knowledge. > Is this something which is likely to be improved upon once it's ready > for public consumption (end of March isn't it?). > > For example, I have a user class I generate completely via doctrine > I'm trying to hook it into the login system. > > I made it implement AccountInterface, it already has the salt, > username and password fields and I hacked a function to return the > roles etc for now. Have the security settings setup to use that class > and so forth. > > The next step just says about using.. > > $user = $container->get('security.context')->getUser(); > > .. It doesn't say where, so I assumed I could do this within one of my > bundle controllers but I can't for the life of me figure out how to > get the container object or the security.context using what I have. > Any ideas? > > It would be great if the Sensio HelloBundle (or some other tutorial > bundle) had authentication and forms (for creating and editing > objects) already included for picking apart. I can hopefully put my > little sandbox one online for others to pick apart, but I need to get > unstuck myself first! > > 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
Re: [symfony-users] latest sandbox broken?
I see that sandbox still has a bad filename for SqliteProfilerStorage: https://github.com/symfony/symfony-sandbox/blob/master/vendor/symfony/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php It should be called SqliteProfilerStorage. Just rename it on your localhost and it should work. It's ok on fabpot fork master: https://github.com/fabpot/symfony/blob/master/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php -- Aurelijus On Fri, Feb 18, 2011 at 11:32 AM, apm wrote: > I have working sandbox at rev * 9751685 > No my code, just hello bundle. > > After update to HEAD (22cd0d6) i have error in hello_bundle: > > > Fatal error: Class > 'Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage' not found in > /./app/cache/dev/appDevDebugProjectContainer.php on line 231 > > Is it my fault? > cache cleared. > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: latest sandbox broken?
I had the same problem and was able to fix it in my local checkout of the sandbox. You need to go to link 231 in the stated file. There you will see the class \Symfony\Component\HttpKernel\Profiler \SqliteProfilerStorage called. However that class does indeed not exist. It's supposed to be \Symfony\Component\HttpKernel\Profiler \SQLiteProfilerStorage. After I made that change the sandbox seems to be working just fine. I hope this helps you as well. ~Nadja On 18 Feb., 10:32, apm wrote: > I have working sandbox at rev * 9751685 > No my code, just hello bundle. > > After update to HEAD (22cd0d6) i have error in hello_bundle: > > Fatal error: Class > 'Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage' not found > in /./app/cache/dev/appDevDebugProjectContainer.php on line 231 > > Is it my fault? > cache cleared. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Symfony Oracle connection problem
HI. I'm using Doctrine 1.2, Symfony 1.4.8, Oracle 10g Database.yml all: doctrine: class: sfDoctrineDatabase param: dsn: 'oracle:host=myhost;dbname=mydb' username: test password: test run command Doctrine:build --all Notice: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS' in myproject\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor \doctrine\Doctrine\Connection.php on line 484 help me. RG A.Altansukh -- 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] [Symfony2] Generating repositories
Hi, I am trying to generate the repositories : php app/console doctrine:generate:repositories MainBundle But what I get is : > SKIP no custom repository for Ratethestar\MainBundle\Entity\Entry > SKIP no custom repository for Ratethestar\MainBundle\Entity\Member > SKIP no custom repository for Ratethestar\MainBundle\Entity\Review I looked into the code, and the ClassMetadataInfo- >customRepositoryClassName attribute is empty. What do I have to change for that attribute to be filled properly ? I tried to manually change my Entity class : namespace Ratethestar\MainBundle\Entity; use Symfony\Component\Security\Core\User\AccountInterface; /** * Ratethestar\MainBundle\Entity\Member * @Entity(repositoryClass="Ratethestar\MainBundle\Repository\Member") * @orm:Entity(repositoryClass="Ratethestar\MainBundle\Repository \Member") */ class Member implements AccountInterface Here is my config.yml : doctrine.orm: mappings: MainBundle: { type: yml } entity_managers: default: connection: default mappings: MainBundle: { type: annotation } (when using type: yml, it did not change anything). Then I got the error : [Doctrine\ORM\Mapping\MappingException] No identifier/primary key specified for Entity 'Ratethestar\MainBundle \Entity\Member' I do not feel like modifying my Entities by hand each time I generate them. Is there a way to fill all the info required by generate:repositories when generating my entities and then use the type: yml for the generate:repositories ? Thank you very much ! -- 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 use array in routing requirements?
in app.yml all: .array test: [ 1, 2, 3 ] in routing.yml route_name: url: /uri/variable/:variable param: { module: main, action: action } requirements: #want to use here %app_test%, but it not works variable: (?:1|2|3) sf_method: [get] so, how to use array from config in routing requirements? -- 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] Relationships and i18n
Hi! I have the following schema: Category: actAs: Timestampable: ~ I18n: fields: [name] columns: name: type: string(255) relations: Category: class: Category local: parent_id foreign: child_id refClass: CategoryReference foreignAlias: Parent Products: type: many class: Product local: id foreign: category_id CategoryReference: columns: parent_id: type: integer primary: true child_id: type: integer primary: true As you can see, Category has a relation with itself, so to create a category tree. Everything works fine until I try to edit a category using admin-generated forms, as it says: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.name' in 'field list' It tries to retrieve “name” field from “category” table instead of “category_translation”… why? :-| Is this a bug? I spent a lot of time trying to find a solution, but I didn’t succeeded. I used this schema in other projects, without i18n, and it works flawlessy. I’m using symfony 1.4.9 (this happens also on 1.4.8). Thank you 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] No EntityToIDTransformer in PR6 ?
I would like to know why EntityToIDTransformer (here in the documentation : http://docs.symfony-reloaded.org/master/guides/doctrine/orm/form.html ) is not available in PR6. What I would like to do is an HiddenField with an EntityToIDTransformer. But since EntityToIDTransformer doesn't exist anymore I'm wondering if I have to develop an EntityToIDTransformer class or if there is a new way to do what I want. -- 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] [Symfony2] DateField type error
Hi there, I added a DateField to my form. $this->add(new DateField('dateBirth', array('years' => range(date('Y') - 100, date('Y') - 17; 1) If I do not specify the type (which is DateTime by default), I get this error when submitting : Expected argument of type string, object given (DateValidator.php line 29) My Domain Object : /** * @validation:Date() * @var date $dateBirth */ private $dateBirth; (ok, a workaround would be to not use validation, but that is lame ^^) 2) If I create my field with option type = 'string', I get this error : Fatal error: Call to a member function format() on a non-object in Doctrine\DBAL\Types\DateType.php on line 44 I'm totally lost with this DateField thing... (see my other post about the 'data' parameter with the default value). Please, any help somewhere ? Point me to some tutorial or documentation, and I will study it. But looking at the code, I humbly think it is a bug of the framework. What do you think ? Kind regards, -- 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 - access everything from Entity class
Thank you Christophe, I tried to generate the repositories before but it complained about "nothing to do", therefore I worked on something else. I will try what you told me tonight. Thank you ! On 17 fév, 15:22, Christophe COEVOET wrote: > Le 16/02/2011 23:00, Lideln a crit :> Hi ! > > > I am experimenting the PR6, but I could not find how to access things > > from Entity just as you would do from Controller ($this- > >> get('database_connection') or $this- > >> get('doctrine.orm.entity_manager') and so on). > > It would be nice to place all "static" database queries inside the > > Entities. > > The right place for the queries is the EntityRepository, not the entity > itself. Look at the Doctrine2 doc about custom > repositories:http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-wit...> > And also, I am willing to use my Member Entity as the Domain Object > > for the register page. > > Same here. Use your custom repository by implementing > Symfony\Component\Security\Core\User\UserProviderInterface and use the > Doctrine entity Provider as described > here:http://docs.symfony-reloaded.org/master/guides/security/users.html#do... > > Regards > > -- > Christophe | Stof -- 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: chekbox creating or not a line into a link table
well, i've added the relation into one of the table linked, like we can find into sfGuardUser with sfGroup (the link table is sfGuardUserGroup) CommandeOperationTechnique: columns: commande_id: { type: integer , notnull: true} ot_id: { type: integer , notnull: true} quantite: { type: integer , notnull: true} fichier: { type: string(255), notnull: true } nom_original_fichier: { type: string(255), notnull: true } relations: Commande: { local: commande_id, onDelete: CASCADE } OperationTechnique: { local: ot_id } supplements: class: OperationTechniqueSupplement local: cot_id foreign: ots_id refClass: CommandeOperationTechniqueSupplement foreignAlias: CommandeOperationTechniques the function public function savesupplementsList($con = null) is added, with some others things i logged that i'm really go through $this->object->link('supplements', array_values($link)); but no line is created in CommandeOperationTechniqueSupplement is there another thing to do ? thanks On 17 fév, 18:40, l3ia-etu wrote: > Hello everyone, > > I have a link table: > CommandeOperationTechniqueSupplement: > columns: > cot_id: { type: integer , notnull: true} > ots_id: { type: integer , notnull: true} > relations: > CommandeOperationTechnique: { local: cot_id, onDelete: CASCADE } > OperationTechniqueSupplement: { local: ots_id } > > and i would like to create a form with a checkbox, to create or not > the line beetwen the 2 others tables: > > so i thought that it was a good idea to use sfValidatorCallback: > when the validator action will be there, i could create or not the > line > > $this->validatorSchema['lien'] = new > sfValidatorCallback(array( > 'callback' => array($this, 'MonValidator') > )); > > function MonValidator($validator, $value) > { > die( "MonValidator=".$value); > } > > but i never go into MonValidator (the die would stop everything) > > is there a better way, or why does this doesn't works ? > > thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] doctrine:generate:Entities update not possible ?
Hello, I wondered why it was not possible to update a file. dcm.yml example, in which we modify the schema for any reason, and we can not use the command update for the entity that has existed with Doctrine2? $ php doctrine orm:generate-entities --update-entities $ php doctrine orm:generate-entities --regenerate-entities Is she will be implemented later? Because every time I am forced to remove my entity before regenerating. Thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] latest sandbox broken?
I have working sandbox at rev * 9751685 No my code, just hello bundle. After update to HEAD (22cd0d6) i have error in hello_bundle: Fatal error: Class 'Symfony\Component\HttpKernel\Profiler\SqliteProfilerStorage' not found in /./app/cache/dev/appDevDebugProjectContainer.php on line 231 Is it my fault? cache cleared. -- 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] subscribe
-- 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