[symfony-users] mergeForm does not support doctrine query cache ?
Hii Can anybody have face this issue ? I am using a form with 2 or 3 mergerd form in it. I am using sfWidgetFormDoctrineChoice widgets for populate my choice box with database. I am using doctrine query cache for reducing no of queries, it is working with my outer form but not working with merged other form. $this->mergeForm(new OtherForm()); Can anybody help me ? Thanks -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
RE: [symfony-users] URL Trouble
You can write mod rewrite rules in your .htaccess file and indicate it is permanently moved: I have for one of my projects: RewriteRule ^dealers.php http://www.thesite.com/nl/dealers [R=301,L] -Original Message- From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On Behalf Of versanu dragos Sent: donderdag 4 februari 2010 23:17 To: symfony users Cc: vers...@gmail.com Subject: [symfony-users] URL Trouble Hello, I have a site made with symfony 1.1 and i whant to change it with another site made with 1.2. my proplem is that i whant to change some URL... For example i have a url thath looks like this on my old site: http://www.sejur-extern.ro/Egipt/Sharm-El-Sheikh On my new site it will be: http://www.sejur-extern.ro/turism-extern/Egipt/Sharm-El-Sheikh.html How can i get the old url if google sends someone on it...and change it in my new one? Thank you! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] need help: Unknown method SfGuardUser::addGroupByName
I've installed sfGuardDoctrine plugin and followed the directions. I've generated the models and had everything. Then I made a change to my schema and now it does not work. When I register a new user I get: "Unknown method SfGuardUser::addGroupByName" I think the problem is in my schema, listed below: ...regular tables... sfGuardUserProfile: columns: sf_guard_user_id: integer(4) first_name: string(255) middle_name: string(255) last_name: string(255) email_address: string(255) relations: User: class: sfGuardUser local: user_id foreign: id type: one foreignType: one foreignAlias: Profile and of course, the sfGuardDoctrine tables. What is could be causing the error? Thanks! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: [sf1.4] symfony project:deploy dry-run no output
Hi Evert. there is no relation with error_reporting with the deploy using the argument --dry-run. The problem that is see is in the class that execute the rsync command. For one time i thought it's the outbuffer in the class that do the deployment: sfProjectDeployTask.class.php. However i see that this problem is located in the class that execute the command rsync. The method responsable about it is the execute from the class sfFileSystem: http://trac.symfony-project.org/browser/branches/1.3/lib/task/sfFilesystem.class.php?rev=19056. I not found the problem yet. Try to execute the --dry-run manually and after execute the deployment without the --go argument. Sametime it works sametime not. I will investigate in deep this problem and i hope found it. Bye Augusto Morais -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfOutputEscaperObjectDecorator with isset() ?
make sense since ObjectDecorator does not implement Iterator or ArrayAccess. maybe property_exists can do On Feb 4, 5:09 pm, Mark Smith wrote: > That returns a fatal exception: "Call to undefined method > sfOutputEscaperObjectDecorator::offsetExists()" > > The only static methods I can see on that class are: > > markClassAsSafe($class) > markClassesAsSafe(array $classes) > isClassMarkedAsSafe($class) > unescape($value) > escape($escapingMethod, $value) > > A quick search through the library code reveals that this method > exists on an IteratorDecorator and an ArrayDecorator, but not an > ObjectDecorator... > > On Feb 4, 4:44 am, ken wrote: > > > > > sfOutputEscaperObjectDecorator::offsetExists > > > On Feb 4, 12:38 am, Mark Smith > > wrote: > > > > Hi, > > > > In my template I only want to print properties that exist. > > > > In pure PHP I would use isset: > > > > echo isset($object->property) ? $object->property : ""; > > > > However when the object is an sfOutputEscaperObjectDecorator, isset > > > always returns false, even when the property is there. > > > > As a workaround I am currently using: > > > > echo !is_null($object->property) ? $object->property : ""; > > > > However this triggers an undefined property notice. Not good practise. > > > > What is the best way to check the presence of a property on an > > > sfOutputEscaperObjectDecorator? > > > > I am using symfony 1.2 > > > > Thanks for any help. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Best Way to Redirect Old URLs
Hi Symfony Users, I'm in the process of converting a simple website to Symfony and need to make sure old URLs redirect (at least temporarily) to new URLs. For example, we have an old URL: /contactus.php, that will become /contactus.html in Symfony. I'd like to automatically redirect requests to contactus.php to contactus.html. I'm wondering what everyone thinks is the best way to do this. As I see it I could: 1) Write some Apache mod_rewrite rules and place them in the server conf, or an .htaccess 2) Create a Symfony action that uses redirect() to redirect to the correct place 3) Create a custom route that would take the new URL as a parameter, so all redirects could be stored in routing.yml. Anyone have any thoughts or a better way to do this? Brandon -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: [sf1.4] symfony project:deploy dry-run no output
Well it suppose to have no relation to any error_reporting setting as it just should display a list of what's gonna be synced with deployment... My question matches this one, except this option does not work for me http://www.thatsquality.com/articles/symfony-1-3-project-deploy-output-improved http://trac.symfony-project.org/changeset/19056 But thanks for the suggestion I'm gonna take look at that one! On 4 feb, 15:44, Juri Prokofiev wrote: > You could try to put this error reporting to E_ALL for php-cli, it might > help to show error message: > > error_reporting = E_ALL > > On Fri, Feb 5, 2010 at 12:38 AM, Evert Harmeling | fh > wrote: > > > > > Guys, > > > I've noticed, as more have, that the new (sf1.4) "symfony project:deploy > > production" (in --dry-run) doesn't return any ouput as of what it's gonna > > sync... > > I've seen some workaround options as to give "-t" as an argument but that > > doesn't change a thing nor it throws an error? > > > What's the status of this option, is there a patch around is it scheduled > > for a fix? Or does it already work, but what's the syntax then? [image: > > Glimlach Emoticon] > > > Thanks! > > > Evert Harmeling > > > __ Information from ESET NOD32 Antivirus, version of virus > > signature database 4835 (20100204) __ > > > The message was checked by ESET NOD32 Antivirus. > > >http://www.eset.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-us...@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. > > > > Emoticon1.gif > < 1 KWeergevenDownloaden -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: CSRF attach with admin generator
Are you by any chance using sfAdminThemejRollerPlugin? I recently noticed a bug in the auto-generated templates for that jRoller admin generator plugin. If you look in _list_batch_actions.php (in your cache, under the module's templates folder), for the standard Symfony admin generator, it creates the CSRF hidden field for the batch actions form like this: isCSRFProtected()): ?> However, in the jRoller admin generator, it does this: isCSRFProtected()): ?> The only difference is that jRoller creates an "sfForm" whereas the Symfony admin generator creates a "BaseForm". If you override the auto-generated template (copy it from the cache into your module's templates folder) and change "sfForm" to "BaseForm" it gets rid of that CSRF error. I don't know why, but it works -david On Feb 4, 5:52 am, HAUSa wrote: > For some reason, I _always_ get a CSRF attack error message when I use > the admin generator and want to execute a batch action. I can't fix it > as well, I don't know where that error is coming from. > Is there anyone who ran into the same problem or can help me? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] URL Trouble
Hello, I have a site made with symfony 1.1 and i whant to change it with another site made with 1.2. my proplem is that i whant to change some URL... For example i have a url thath looks like this on my old site: http://www.sejur-extern.ro/Egipt/Sharm-El-Sheikh On my new site it will be: http://www.sejur-extern.ro/turism-extern/Egipt/Sharm-El-Sheikh.html How can i get the old url if google sends someone on it...and change it in my new one? Thank you! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Symfony 1.2 and propel trouble
Hello, I have a little trouble... I made a web aplication using symfony 1.1 and propel with mysql. I have a database with romanian characters. This is the old good site: http://www.sejur-extern.ro/Egipt/Sharm-El-Sheikh I started from scrach an aplication with symfony 1.2 with the same database, and the romanian characters are some strage symbols. This is the new version but with the same database: http://sejurnew.sejur-extern.ro/turism-extern/Egipt/Sharm-El-Sheikh.html Can you tell me how to solve this problem please??? Thanks! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Cache a component
On Thu, 4 Feb 2010, HAUSa wrote: > Right now I execute a specific component twice in my layout.php: one > time on top of the document and one time in the footer. > > For the result of the component is an SQL query required. But that > query is being executed twice as well! > > Is it possible to cache the result of a component, which will result > in the query not being executed the second time? Why not use functional caching? -- -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Does the Doctrine package concept work?
AFAIK it works on sf1.4 so I suppose it works on sf1.3 too Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Feb 4, 2010 at 4:14 PM, a...@speedypin.com wrote: > > http://www.doctrine-project.org/documentation/manual/1_0/hu/yaml-schema-files#features-examples:packages > > Does this work? I tried about a year ago and couldnt get it to work, > but now I see it again and could really use this feature. > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Does the Doctrine package concept work?
not in sf1.2, maybe with sf1.3 and upper but not sure. On Thu, Feb 4, 2010 at 4:14 PM, a...@speedypin.com wrote: > > http://www.doctrine-project.org/documentation/manual/1_0/hu/yaml-schema-files#features-examples:packages > > Does this work? I tried about a year ago and couldnt get it to work, > but now I see it again and could really use this feature. > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- Thomas Rabaix http://rabaix.net -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] How to create an totally customized admin
Hi Yang, you said the you need two modules based on the same model class. One for display a graph a other to "i have not idea". But ok. I, in your person, would create just one module and not two. Then i would create 2 actions, one to shows the graph and other to anything. Yes, you need rewrite the templates generated from the symfony. Check it on cache. It will help you. bye. Augusto Morais -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfSimpleForumPlugin: for Symfony 1.3 & 1.4 (and Doctrine)
I've been wondering the same thing you have, and I haven't found any evidence of an effort to convert this to Doctrine. I've been planning to do this for a project I'm working on, and naturally I was planning to feed it back into the community once I'd done so. I'm about ready to start work on it. This development occurs as a "free" time (6-8 hours a week) project for me, so I may be a little slow in completing the job. I'm relatively new to Symfony and how to go about checking code into the public repository, so I'd be thrilled if you want to take on that effort. I was intending to do the development first, then worry about that aspect later, but it couldn't hurt to get that started sooner. One more thing. I was planning on adding two small features around email notification: an email sent to an administrator upon a new post, and a user option to be notified upon new posts on a thread. (These were part of the PHPBB system I'm migrating away from, and I'd miss them if I lost them.) That gets a little tricky since it introduces a dependency upon some sort of mailer. I was planning to use Zend, since I'm already set up with that as part of my use of sfDoctrineApplyPlugin. Post to this thread or get in touch directly if you want to discuss this further! On Jan 26, 5:06 pm, pbh wrote: > I was looking to use the sfSimpleForumPlugin, but this project has > been abandoned by the author and there is no version for Doctrine. > > My first question is: > > 1) Has anyone done this? (converted the sfSimpleForumPlugin to > Doctrine) > > 2) If there is not a copy of this plugin (sfSimpleForumPlugin) for > Doctrine out there, then I would like to convert it to Doctrine with > the help of all the volunteers that would like to use/have this plugin > to use on the latest symfony version with Doctrine. > > Let me know so we can start a public repository and start working on > this for the benefit of the Symfony community. > > Thank you all -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] database input
I like to add multiple input to an databse column such as category_id includes ids as {1,2,3,4} . Like using a database as an array of ids. I can put them like a string and split it when necessary. But I wonder if it has a better way in symfony. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] ORDER BY insists on using sort_order
Hello all, I'm new to Symfony. While I've been able to figure things out as I go along, this one is very strange. I had a column named 'sort_order' and used if in the generator.yml to request a sort in the list. Subsequently I removed it from the schema and regenerated everything, including the backend. No matter what I do, I can't get executeView not to include ORDER BY sort_order in the sql statement that creates the list. I can influence the LIMIT statement by updating the generator.yml file, but I cannot influence ORDER BY with the sort statement. I even used Spotlight to hunt for sort_by in the files and come up empty, except where it is used internally to symfony. Any clue as to what might be happening would be appreciated. My next step would be to do a clean install of everything and begin fresh, which would probably be good practice in any case. Thanks - Michael # at Doctrine_Connection->rethrowException(object('PDOException'), object('Doctrine_Connection_Mysql'), 'SELECT s.code AS s__code, s.description AS s__description, s.class_of_year AS s__class_of_year, s.created_at AS s__created_at, s.updated_at AS s__updated_at FROM StudentClassStanding s ORDER BY sort_order asc LIMIT 300') in SF_ROOT_DIR/symfony-1.4.1/lib/plugins/sfDoctrinePlugin/lib/vendor/ doctrine/Doctrine/Connection.php line 1025 ... 1022. } catch (Doctrine_Adapter_Exception $e) { 1023. } catch (PDOException $e) { } 1024. 1025. $this->rethrowException($e, $this, $query); 1026. } 1027. 1028. /** # at sfExecutionFilter->executeView('student_class_standing', 'index', 'Success', array('configuration' => object('student_class_standingGeneratorConfiguration'), 'helper' => object('student_class_standingGeneratorHelper'), 'filters' => object('StudentClassStandingFormFilter'), 'pager' => object('sfDoctrinePager'), 'sort' => array('sort_order', 'asc'))) in SF_ROOT_DIR/symfony-1.4.1/lib/filter/sfExecutionFilter.class.php line 116 ... 113. return; 114. } 115. 116. $this->executeView($actionInstance->getModuleName(), $actionInstance->getActionName(), $viewName, $actionInstance- >getVarHolder()->getAll()); 117. } 118. 119. /** generator: class: sfDoctrineGenerator param: model_class: StudentClassStanding theme: admin non_verbose_templates: true with_show: false singular: ~ plural:~ route_prefix: student_class_standing with_doctrine_route: true actions_base_class:sfActions config: actions: ~ fields: ~ list: max_per_page: 300 sort: class_of_year filter: ~ form:~ edit:~ new: ~ -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Solved - White Screen of Death / Blank Screen of Death
I recently had a WSOD issue on a site that was originally working fine. I'm not sure why but it required that I add the PEAR and Symfony install directories to the open_basedir in my vhost config file. Like this: php_admin_value open_basedir "/var/www/vhosts/mysite.com/httpdocs:/usr/ share/pear:/usr/share/pear/symfony:/tmp" Credit goes to http://code-launch.com/?p=56 for pointing me in the right direction. I hope this helps someone else solve one of Symfony's most annoying issues. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Cache a component
If it is the SQL hit which gives you a problem, you could aslo store the result in an instance attribute of your component / model. like this: getResult() { if(!$this->result) { $this->result = ; } return $this->result; On 4 fév, 15:36, HAUSa wrote: > Right now I execute a specific component twice in my layout.php: one > time on top of the document and one time in the footer. > > For the result of the component is an SQL query required. But that > query is being executed twice as well! > > Is it possible to cache the result of a component, which will result > in the query not being executed the second time? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] How to create an totally customized admin
Hello everyone, I dived into the forum but I didn't find any similar topic, so I would like to pose my questions here. 1: in my admin, I need [U]two modules[/U] based on [U]the same model class[/U]. Because each module displays different things. How can I do this in the proper way? Should I generate two times with different module name? like: $ php symfony propel:generate-admin backend JobeetJob --module=jobOne $ php symfony propel:generate-admin backend JobeetJob --module=jobTwo 2: In one of my module, I won't display the HTML table, but display graph, so for doing this, I should override all the concerned generated methods and templates, is that correct? Thanks for your advices. Regards, JoJo -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] problems with sfDataGridPlugin
Hello there, I have a problem with sfDataGridPlugin, I need to show a list of data in a table using this plugin but I found this message error then I try to render it: Fatal error: Call to undefined function jq_link_to_remote() in C:\wamp \www\scjc\plugins\sfDatagridPlugin\lib\sfDatagridFormatter.class.php on line 559 PD: I am using Doctrine and sfDatagridDoctrine, and I am using the jQuery helper from the sfJqueryReloadedPlugin. Any idea? Thanks! -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Help please! json_encode problem in symfony
Hi ScaNNeR, Cool, thanks for your help. Regards, JoJo 2010/2/2 ScaNNeR > For JSON exchange I doing special module 'json' named. > Addition I create "config" folder for "json" module and create > "view.yml" whithout template. > My actions sample: > >public function executeNewChart(sfWebRequest $request) { >$retData = array(); > /* > only ajax request > */ >if ($request->isXmlHttpRequest()) { > /* any manipulation data */ >$this->getUser()->setAttribute('statYear', $request- > >getParameter('statChartType', 'p3') ); >$retData['statYear'] = $this->getUser()->getAttribute > ('year', date('Y', time() ) ); >$retData['statView'] = $this->getUser()->getAttribute > ('statView', 'toCommon'); >$retData['statTypeService'] = $this->getUser()- > >getAttribute('statTypeService', 'hosting'); >$retData['statChartType'] = $request->getParameter > ('statChartType'); //$newReport->createStatData($this->getUser()- > >getAttribute('statTypeService')); >$newReport = new statHarvester( $this->getUser()- > >getAttribute('statTypeService'), $request->getParameter('year')); >$retData['newReport'] = ''; > /* create JSON*/ >$retData = json_encode( $retData ); > /* Prepare JSON data */ >$this->renderText( $retData ); >} >// without template and RETURN >return sfView::NONE; >} > > You remember, if use "dev" env - Symfony send add information, can > destroy JSON data - use "PROD" dev for testing and debug. > > Sorry for my english, but I think what my understand. > > > On 1 фев, 12:57, Dong YANG wrote: > > Hi Eno and Dejan, > > > > Thanks for your replies, I found why I got always empty when > calling > > json_encode in this method, in fact, the object returnd by > > $this->getRoute()->getObject() contains only protected and privated > members, > > and json_encode treats only public members, so as result I got always > '{}'. > > > > Help this can help others. > > > > Regards, > > > > JoJo > > > > 2010/1/29 Dejan Spasic > > > > > If you use Doctrine try > > > > > json_encode($this->test->toArray()); > > > > > On 28 Jan., 23:39, Eno wrote: > > > > On Thu, 28 Jan 2010, Dong YANG wrote: > > > > > Hi everyone, > > > > > > > I passed many hours for this strange thing, in fact I got a > problem > > > when > > > > > using json_encode in symfony. > > > > > > > In my front-end module, method executeIndex() as below: > > > > > > > public function executeIndex(sfWebRequest $request) > > > > > { > > > > > $this->test = $this->getRoute()->getObject(); > > > > > // Call json_encode, but return '{}' > > > > > $json = json_encode($this->test); > > > > > > > // this simple test works > > > > > $test = new stdClass(); > > > > > $test->id = new stdClass(); > > > > > var_dump(json_encode($test)); > > > > > } > > > > > > What happens if you do this? > > > > > > $test = $this->getRoute()->getObject(); > > > > $json = json_encode($test); > > > > $this->test = $test; > > > > > > -- > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "symfony users" group. > > > To post to this group, send email to symfony-us...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > symfony-users+unsubscr...@googlegroups.com > > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/symfony-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Does the Doctrine package concept work?
http://www.doctrine-project.org/documentation/manual/1_0/hu/yaml-schema-files#features-examples:packages Does this work? I tried about a year ago and couldnt get it to work, but now I see it again and could really use this feature. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!
On 4 Fev, 14:52, Tom Ptacnik wrote: > 1 st problem > try to do: > > protected function doUpdateObject($values) > { > print_r($values['id_empresa']); > > parent::doUpdateObject($values); > } > Thanks i will try. > 2 nd > I don't understand what are you trying to do. And what does mean "they > are both foreign keys from same fields"? > > Probably you want to do something like: > > > Created by > getCreatedBy()->getUsername() ?> td> > Updated by > getUpdatedBy()->getUsername() ?> td> > I already try this and get always an error (Fatal error: Call to a member function getUsername() on a non-object) When i say that of foreign keys is because created_by and updated_by are related with id from table Users. Empresas: id created_by updated_by Users id username When i make $info_empresa->getUsers()->getUsername() how will symfony knows what related ID will get? The created or updated? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!
On 4 Fev, 14:52, Tom Ptacnik wrote: > 1 st problem > try to do: > > protected function doUpdateObject($values) > { > print_r($values['id_empresa']); > > parent::doUpdateObject($values); > } > Thanks i will try. > 2 nd > I don't understand what are you trying to do. And what does mean "they > are both foreign keys from same fields"? > > Probably you want to do something like: > > > Created by > getCreatedBy()->getUsername() ?> td> > Updated by > getUpdatedBy()->getUsername() ?> td> > I already try this and get always an error (Fatal error: Call to a member function getUsername() on a non-object) When i say that of foreign keys is because created_by and updated_by are related with id from table Users. Empresas: id created_by updated_by Users id username When i make $info_empresa->getUsers()->getUsername() how will symfony knows what related ID will get? The created or updated? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Cache a component
As far as I know; every include_* function is just an echo wrapper of a get_* function. So you could store the result of get_component() in a var and echo it twice. Or enable template caching for the component if that is an option. On Feb 4, 3:36 pm, HAUSa wrote: > Right now I execute a specific component twice in my layout.php: one > time on top of the document and one time in the footer. > > For the result of the component is an SQL query required. But that > query is being executed twice as well! > > Is it possible to cache the result of a component, which will result > in the query not being executed the second time? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfWidgetFormChoice and Foreign keys problems!
1 st problem try to do: protected function doUpdateObject($values) { print_r($values['id_empresa']); parent::doUpdateObject($values); } 2 nd I don't understand what are you trying to do. And what does mean "they are both foreign keys from same fields"? Probably you want to do something like: Created by getCreatedBy()->getUsername() ?> Updated by getUpdatedBy()->getUsername() ?> ? On 2 ún, 18:48, wueb wrote: > Hello Tom, > > $empresas had a array with values and descriptions to put on the > select. > > But right now my major problem is the 2nd. Any idea? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] [sf1.4] symfony project:deploy dry-run no output
You could try to put this error reporting to E_ALL for php-cli, it might help to show error message: error_reporting = E_ALL On Fri, Feb 5, 2010 at 12:38 AM, Evert Harmeling | fh wrote: > Guys, > > I've noticed, as more have, that the new (sf1.4) "symfony project:deploy > production" (in --dry-run) doesn't return any ouput as of what it's gonna > sync... > I've seen some workaround options as to give "-t" as an argument but that > doesn't change a thing nor it throws an error? > > What's the status of this option, is there a patch around is it scheduled > for a fix? Or does it already work, but what's the syntax then? [image: > Glimlach Emoticon] > > Thanks! > > Evert Harmeling > > > __ Information from ESET NOD32 Antivirus, version of virus > signature database 4835 (20100204) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.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-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. <>
[symfony-users] [sf1.4] symfony project:deploy dry-run no output
Guys, I've noticed, as more have, that the new (sf1.4) "symfony project:deploy production" (in --dry-run) doesn't return any ouput as of what it's gonna sync... I've seen some workaround options as to give "-t" as an argument but that doesn't change a thing nor it throws an error? What's the status of this option, is there a patch around is it scheduled for a fix? Or does it already work, but what's the syntax then? Thanks! Evert Harmeling __ Information from ESET NOD32 Antivirus, version of virus signature database 4835 (20100204) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.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-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. <>
[symfony-users] Cache a component
Right now I execute a specific component twice in my layout.php: one time on top of the document and one time in the footer. For the result of the component is an SQL query required. But that query is being executed twice as well! Is it possible to cache the result of a component, which will result in the query not being executed the second time? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] How to upload a database to the production server with symfony ?
You dont need symfony. If you use MySQL: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html On Wed, Feb 3, 2010 at 12:30 PM, Javier Garcia wrote: > Hi, > > just that. > > Javi > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] protection of a field
hi everyone, i've protected a form, setting readonly: if ( ! sfContext::getInstance()->getUser()->hasCredential('x')) { $this->widgetSchema['']- >setAttribute('readonly','readonly'); $this->validatorSchema['x'] = new sfValidatorPass(); } but i can modify the field with firebug ... while in the doc i read: sfValidatorPass: sfValidatorPass is an identity validator. It simply returns the value unmodified. how to protect against that ? is removing the validator is a solution ? if yes, how to remove the validator ? thanks -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Date Input Widgets in Symfony 1.2 ... 1.4
Yes On 3 Feb, 16:43, Carlos Henrique wrote: > Someone implemented "Input Widgets" in Symfony 1.2 ... 1.4? > > Thanks -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Images source problem
Try wrapping your image url in a `public_path()` call. On Wed, Feb 3, 2010 at 17:05, wueb wrote: > Hi, i'm getting a problem on the images source. > > > Here: http://localhost/frontend_dev.php/settings - My image works > fine. > > Here: http://localhost/frontend_dev.php/settings/edit - My image > doesn't work fine. > > > > The problem is that he looks to the action like a folter and the > source should be > > instead of > > > The source from the image is coming from: > > > The getAvatar() method have the folowing code: > public function getAvatar(){ > > return sfConfig::get('app_upload_avatars').$get_users->getFirst()- >>getAvatar(); > ... > } > > Any help please? > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to symfony-us...@googlegroups.com. > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Images source problem
Hello, The most important thing in this story is : where are you pictures stored relative to your DocumentRoot? For apache, if you call: src="users/avatars/image.jpg" from the url: http://localhost/frontend_dev.php/settings It will search your picture in /settings/users/avatars/ image.jpg where DocumentRoot is (surely) your symfony_web_dir (aka: /var/www/ symfony/web ) So if you want call your pics from all URL (like http://localhost/frontend_dev.php/settings OR http://localhost/frontend_dev.php/settings/edit ) You HAVE TO call them with /users/avatars/image.jpg The first / is very important because it tells Apache to start form your DocumentRoot, which is always the same ( ie: http://localhost ) Hope I helped! On 4 fév, 10:21, wueb wrote: > Nobody knows? :S -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: CSRF attach with admin generator
It is disabled, I test via the dev environment. I also tried to clear the cache several times On 4 feb, 12:56, Tyler wrote: > check cache for your app, is it enabled? > > On 4 фев, 13:52, HAUSa > wrote: > > > For some reason, I _always_ get a CSRF attack error message when I use > > the admin generator and want to execute a batch action. I can't fix it > > as well, I don't know where that error is coming from. > > Is there anyone who ran into the same problem or can help me? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: CSRF attach with admin generator
check cache for your app, is it enabled? On 4 фев, 13:52, HAUSa wrote: > For some reason, I _always_ get a CSRF attack error message when I use > the admin generator and want to execute a batch action. I can't fix it > as well, I don't know where that error is coming from. > Is there anyone who ran into the same problem or can help me? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] CSRF attach with admin generator
For some reason, I _always_ get a CSRF attack error message when I use the admin generator and want to execute a batch action. I can't fix it as well, I don't know where that error is coming from. Is there anyone who ran into the same problem or can help me? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: i18n - how can I get value from Translation table ?
I think I know: $x->Translation['en']->text $x->Translation['pl']->text On 4 Lut, 10:33, mr_question wrote: > I have: > $x = Doctrine::getTable('Contact')->find($id); > echo $x->getText(); // I want to show text in language = en > echo $x->getText(); // I want to show text in language = pl > > how can I do that ? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Cookies are empty in functional test response
Using symfony 1.4.1 with Doctrine -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Cookies are empty in functional test response
Hello, In functional test: $browser->info('Post a Story page')-> info('Submit a Story')-> // this request forwards to login form get('/story/new')-> with('request')->begin()-> isParameter('module', 'story')-> isParameter('action', 'new')-> end()-> click('sign in', array('signin' => array( 'username'=> 'Tyler', 'password' => '***', ))); $cookies = $browser->getResponse()->getHttpHeader('Set-Cookie'); print_r($cookies); <-- EMPTY HERE can anyone help me with this problem? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] i18n - how can I get value from Translation table ?
I have: $x = Doctrine::getTable('Contact')->find($id); echo $x->getText(); // I want to show text in language = en echo $x->getText(); // I want to show text in language = pl how can I do that ? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
Re: [symfony-users] Re: Images source problem
Hi wueb, is it possible to use a absolute path for your images? BR Seb -- Sebastian Müller http://www.new-mediafactory.de -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: Images source problem
Nobody knows? :S -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
[symfony-users] Re: sfOutputEscaperObjectDecorator with isset() ?
That returns a fatal exception: "Call to undefined method sfOutputEscaperObjectDecorator::offsetExists()" The only static methods I can see on that class are: markClassAsSafe($class) markClassesAsSafe(array $classes) isClassMarkedAsSafe($class) unescape($value) escape($escapingMethod, $value) A quick search through the library code reveals that this method exists on an IteratorDecorator and an ArrayDecorator, but not an ObjectDecorator... On Feb 4, 4:44 am, ken wrote: > sfOutputEscaperObjectDecorator::offsetExists > > On Feb 4, 12:38 am, Mark Smith > wrote: > > > Hi, > > > In my template I only want to print properties that exist. > > > In pure PHP I would use isset: > > > echo isset($object->property) ? $object->property : ""; > > > However when the object is an sfOutputEscaperObjectDecorator, isset > > always returns false, even when the property is there. > > > As a workaround I am currently using: > > > echo !is_null($object->property) ? $object->property : ""; > > > However this triggers an undefined property notice. Not good practise. > > > What is the best way to check the presence of a property on an > > sfOutputEscaperObjectDecorator? > > > I am using symfony 1.2 > > > Thanks for any help. -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.