[symfony-users] access embedded form fields through generator.yml
There is a ticket for this in symfony trac (#5486). Did any one already did this on there own. I really need this for my current project, but don't have the time to give it a crack on my own. I know that there is a workaround possible with partials, but this would save me a lot of time. Thanks in advance. -- 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] Accessing arrays from templates turns them into sfOutputEscaperArrayDecorator objects?
sfOutputEscaperArrayDecorator means you have output escaping enabled, and any data you send to the view gets escaped for safety. You can still use it as an array, like $content_tabs[key1], the only difference you'll see is that you need not use htmlspecialchars() or anything like that. On Tue, Jan 5, 2010 at 04:06, SB oce...@gmail.com wrote: Hello, I'm trying to do something really simple (I thought), send an array from the controller to the template. actions.class.php: $this-content_tabs = array('key1' = 'value1', 'key2' = 'value2'); indexSuccess.php: var_dump($content_tabs); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) However, if I try to output a simple scalar variable, i.e.: actions.class.php $this-content_tabs = 'test'; indexSuccess.php var_dump($content_tabs); gives: string 'test' (length=4) I get the same result if I try to set a request parameter as an array in a filter, i.e. myFilter.php: $this-getContext()-getRequest()-setParameter('content_tabs', array ('key1' = 'value1', 'key2' = 'value2')); if i output this in myFilter.php: var_dump($this-getContext()-getRequest()-getParameter ('content_tabs')); gives: array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) but if i output in indexSuccess.php: var_dump($sf_request-getParameter('content_tabs')); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) Why is this happening? Is there no way to send arrays to the view layer? thanks! SB -- 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] Accessing arrays from templates turns them into sfOutputEscaperArrayDecorator objects?
I also encountered a problem like that: when I pass a DOMDocument object $dom to view, I found that I can't treat $dom as array anymore, I put $dom in a foreach statement: foreach ($dom-getElementsByTagName('name') as $name ) .. It would always ouput names from a xml file untill I set escape option on in settings.yml Gábor Fási wrote: sfOutputEscaperArrayDecorator means you have output escaping enabled, and any data you send to the view gets escaped for safety. You can still use it as an array, like $content_tabs[key1], the only difference you'll see is that you need not use htmlspecialchars() or anything like that. On Tue, Jan 5, 2010 at 04:06, SB oce...@gmail.com wrote: Hello, I'm trying to do something really simple (I thought), send an array from the controller to the template. actions.class.php: $this-content_tabs = array('key1' = 'value1', 'key2' = 'value2'); indexSuccess.php: var_dump($content_tabs); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) However, if I try to output a simple scalar variable, i.e.: actions.class.php $this-content_tabs = 'test'; indexSuccess.php var_dump($content_tabs); gives: string 'test' (length=4) I get the same result if I try to set a request parameter as an array in a filter, i.e. myFilter.php: $this-getContext()-getRequest()-setParameter('content_tabs', array ('key1' = 'value1', 'key2' = 'value2')); if i output this in myFilter.php: var_dump($this-getContext()-getRequest()-getParameter ('content_tabs')); gives: array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) but if i output in indexSuccess.php: var_dump($sf_request-getParameter('content_tabs')); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) Why is this happening? Is there no way to send arrays to the view layer? thanks! SB -- 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] sfDoctrineGuard and behaviors
On 04.01.2010, at 11:49, Lukas Kahwe Smith wrote: On 03.01.2010, at 14:07, Lukas Kahwe Smith wrote: On 02.01.2010, at 20:05, Daniel Lohse annismcken...@googlemail.com wrote: You can handle this in the global project schema.yml as it's merged automatically with the plugin schemas and is the last information added to the mix so you can override (but not delete) and customize every model object defined in plugins. This is how I now add additional fields to the sfGuardUser model (like next_password_reset and the like) that is original to the project. Am I really missing something you said/are saying? I can only imagine that merging/ adding of additional behaviors wouldn't work but it works for the columns: key and so should work for everything else. not at my laptop atm but if indeed all plugin schema files are just appended to the beginning of the global schema.yml then all that really needs to happen is that plugin authors make extensive use of the yaml merge key support (just google yaml merge key to find specs but sfyaml doesnt support the full spec. maybe there are docs on the sf components page. i reviewed the code, but to me this is far from that i need. the code does attempt to merge things, but it first parses, applies some magic and then merges the models to then finally dump a new yam file. at this point the merge key alias are of course lost, nor would they help, since every schema file seems to be parsed independently. i tried to quickly change the code to append the files together and use merge key to handle the plugin schema files (including overwriting a plugin schema file via another plugin using merge key), but i ran into some odd issues. not sure if they are related to sfYaml or some of the magic in the doctrine base task file. another approach would be to somehow inject all the previous merge key alias's before doing the next sfYaml::load() call, but that would require some modifications to sfYaml that i have not investigated if they are feasible. as for copying the schema definition into my own schema.yml, this does work after all. but there is a bug that led me to believe that something more severe is broken (*). however it means that i need to keep things in sync manually if any of my plugin schema files change. so to me we should still work towards finding a better solution. at this point i still believe that we would probably be served better to base the entire plugin schema handling (and extending) on merge key and not on magic inside the doctrine plugin base task. thinking about it some more .. maybe we can go in a direction similar to the import directive in the ServiceContainer .. than again does it even make sense for me to worry about this for symfony 1.x or should I just make sure that Symfony 2.x is more sensible here and accept that I need to duplicate the schema definition in 1.x? regards, Lukas Kahwe Smith m...@pooteeweet.org -- 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: sfWidgetFormJQueryDate option format is no longer supported in version 1.1.1?
Axel, my solution is totally independ from date format. On my page (liked above) there is also an example with day/month/year On 4 Gen, 13:17, axel at axel.zu...@gmail.com wrote: Hi Massimiliano, when I use your datepicker solution I still have the problem that the date selects are mm/dd/ and I would need dd/mm/ ( Date.format = 'dd.mm.'; is included in date_de.js ) On 31 Dez. 2009, 17:01, Massimiliano Arione garak...@gmail.com wrote: Forget sfWidgetFormJQuery and try this full-javascript solution:http://garakkio.altervista.org/datepicker/ On 29 Dic, 13:58, axel at axel.zu...@gmail.com wrote: after upgrading to symonfy 1.3 and sfFormExtraPlugin 1.1.1 the format option is no longer supported by sfWidgetFormJQuery $this-setWidgets(array( 'from_date' = new sfWidgetFormJQueryDate(array( 'image'='/images/icons/calendar_view_month.gif', 'format' = '%day%-%month%-%year%', 'culture' = 'de_AT') ), )); is there another way to change the date format (from mm-dd- to dd- mm-)? -- 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 can I make normal query using Symfony and Doctrine ?
I want to make normal query in symfony and doctrine without models etc. I am trying: $result = Doctrine_Manager::connection()-getDbh()-query(SELECT * FROM table)-execute(); print_r($result); but I get nothing :( -- 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] From link_to to m_link_to
HI, I have a template with an image cropper like this: http://londatiga.net/tutorials/imagecrop/example.html Now i want to show this template in a modal window, so i just changed the helper to this template from link_to to m_link_to. After that, the modal window appears but the image cropper seams not working (if i placed the cursor over the image it doesn't change to a cross). Any help? 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.
[symfony-users] Re: From link_to to m_link_to
Well, what i mean is just the image cropper doesn't work inside the modal window... Javi On Jan 5, 1:29 pm, tirengarfio tirengar...@gmail.com wrote: HI, I have a template with an image cropper like this: http://londatiga.net/tutorials/imagecrop/example.html Now i want to show this template in a modal window, so i just changed the helper to this template from link_to to m_link_to. After that, the modal window appears but the image cropper seams not working (if i placed the cursor over the image it doesn't change to a cross). Any help? 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.
[symfony-users] Re: how can I make normal query using Symfony and Doctrine ?
Hi Alex, try this to get the PDO connection: $dbh = Doctrine_Manager::getInstance()-getCurrentConnection()-getDbh (); $result = $dbh-query(SELECT * FROM my_table); :-) Klemens On 5 Jan., 13:23, alexmm misiekaleksan...@gmail.com wrote: I want to make normal query in symfony and doctrine without models etc. I am trying: $result = Doctrine_Manager::connection()-getDbh()-query(SELECT * FROM table)-execute(); print_r($result); but I get nothing :( -- 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: Accessing arrays from templates turns them into sfOutputEscaperArrayDecorator objects?
you can use $object-getRaw('property'); On Jan 5, 6:34 pm, chrisyue blizzch...@gmail.com wrote: I also encountered a problem like that: when I pass a DOMDocument object $dom to view, I found that I can't treat $dom as array anymore, I put $dom in a foreach statement: foreach ($dom-getElementsByTagName('name') as $name ) .. It would always ouput names from a xml file untill I set escape option on in settings.yml Gábor Fási wrote: sfOutputEscaperArrayDecorator means you have output escaping enabled, and any data you send to the view gets escaped for safety. You can still use it as an array, like $content_tabs[key1], the only difference you'll see is that you need not use htmlspecialchars() or anything like that. On Tue, Jan 5, 2010 at 04:06, SB oce...@gmail.com wrote: Hello, I'm trying to do something really simple (I thought), send an array from the controller to the template. actions.class.php: $this-content_tabs = array('key1' = 'value1', 'key2' = 'value2'); indexSuccess.php: var_dump($content_tabs); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) However, if I try to output a simple scalar variable, i.e.: actions.class.php $this-content_tabs = 'test'; indexSuccess.php var_dump($content_tabs); gives: string 'test' (length=4) I get the same result if I try to set a request parameter as an array in a filter, i.e. myFilter.php: $this-getContext()-getRequest()-setParameter('content_tabs', array ('key1' = 'value1', 'key2' = 'value2')); if i output this in myFilter.php: var_dump($this-getContext()-getRequest()-getParameter ('content_tabs')); gives: array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) but if i output in indexSuccess.php: var_dump($sf_request-getParameter('content_tabs')); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) Why is this happening? Is there no way to send arrays to the view layer? thanks! SB -- 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 athttp://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] MySQL error with a little filter
Hi, I have added this model and this fixture to my app: Birthday: columns: day: date Birthday: example: day: 2010-1-1 I have generated the Birthday module. Then I've generated the filter class (BirthdayFormFilter.class.php) and I have created a form filter object in executeIndex(): $this-filter = new BirthdayFormFilter(); After that, i've added this lines to the index template: ?php echo form_tag('birthday/filtrar') ? ?php echo $filter; ? div?php echo submit_tag('Filter') ?/div /form When i click the 'Filter' button i get this error: 500 | Internal Server Error | Doctrine_Connection_Mysql_Exception SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens stack trace * at () in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/ lib/vendor/doctrine/Doctrine/Connection.php line 1086 ... 1083. 1084. $name = 'Doctrine_Connection_' . $this- driverName . '_Exception'; 1085. 1086. $exc = new $name($e-getMessage(), (int) $e- getCode()); 1087. if ( ! isset($e-errorInfo) || ! is_array($e- errorInfo)) { 1088. $e-errorInfo = array(null, null, null, null); 1089. } * at Doctrine_Connection-rethrowException(object('PDOException'), object('Doctrine_Connection_Statement')) in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/ lib/vendor/doctrine/Doctrine/Connection/Statement.php line 253 ... 250. } catch (Doctrine_Adapter_Exception $e) { 251. } 252. 253. $this-_conn-rethrowException($e, $this); 254. 255. return false; 256. } * at Doctrine_Connection_Statement-execute(array('month' = '1', 'day' = '2', 'year' = '2014')) in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/ lib/vendor/doctrine/Doctrine/Connection.php line 1014 ... 1011. try { 1012. if ( ! empty($params)) { 1013. $stmt = $this-prepare($query); 1014. $stmt-execute($params); 1015. 1016. return $stmt; 1017. } else { * at Doctrine_Connection-execute('SELECT b.id AS b__id, b.day AS b__day FROM birthday b WHERE b.day = ? AND b.day = ?', array('month' = '1', 'day' = '2', 'year' = '2014')) in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/ lib/vendor/doctrine/Doctrine/Query/Abstract.php line 992 ... 989. return $this-_conn-exec($query, $params); 990. } 991. 992. $stmt = $this-_conn-execute($query, $params); 993. return $stmt; 994. } 995. * at Doctrine_Query_Abstract-_execute(array('month' = '1', 'day' = '2', 'year' = '2014')) in SF_ROOT_DIR/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/ lib/vendor/doctrine/Doctrine/Query/Abstract.php line 1036 ... 1033. $result = $this- _constructQueryFromCache($cached); 1034. } 1035. } else { 1036. $stmt = $this-_execute($params); 1037. 1038. if (is_integer($stmt)) { 1039. $result = $stmt; * at Doctrine_Query_Abstract-execute() in SF_ROOT_DIR/apps/frontend/modules/birthday/actions/ actions.class.php li Any idea? 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.
[symfony-users] Re: problem installing sfDoctrineGuard Plugin
ok...i downgraded to symfony 1.3 and downloaded sfDoctrineGuardPlugin 4.0 and 3.0 followed some advice on symfony forums to do this symfony plugin:install ./sfDoctrineGuardPlugin-3.0.0.tgz rm sfDoctrineGuardPlugin-3.0.0.tgz but the symfony tool still tries to connect to the internet, even though i am trying to do a local plugin install. Is there a way to unset this default choice? please help On Jan 4, 11:34 pm, el-sid sydneyari...@gmail.com wrote: hi all i'm using symfony 1.4 with version 4.0.1 of doctrineguardplugin. i downloaded the package from symfony website. when i issue the command ./symfony plugin:install /path/to/sfDoctrineGuardPlugin.tzg i get this error unable to register channel pear.symfony.com from the readme file, it says i can do a local install the way ive done above. Is there a way i can stop plugin:install from refering to the web, since the computer i am using syfony in is not connected? 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: problem installing sfDoctrineGuard Plugin
Please, download package, unzip it in your plugins directory and add the $this-enablePlugins('dirName'), in your projectConfiguration.class.php then plugin:publish-assets if needed. Check readme on plugin website. I'm pretty sure google would give you an answer near this one :-) Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Tue, Jan 5, 2010 at 3:15 PM, el-sid sydneyari...@gmail.com wrote: ok...i downgraded to symfony 1.3 and downloaded sfDoctrineGuardPlugin 4.0 and 3.0 followed some advice on symfony forums to do this symfony plugin:install ./sfDoctrineGuardPlugin-3.0.0.tgz rm sfDoctrineGuardPlugin-3.0.0.tgz but the symfony tool still tries to connect to the internet, even though i am trying to do a local plugin install. Is there a way to unset this default choice? please help On Jan 4, 11:34 pm, el-sid sydneyari...@gmail.com wrote: hi all i'm using symfony 1.4 with version 4.0.1 of doctrineguardplugin. i downloaded the package from symfony website. when i issue the command ./symfony plugin:install /path/to/sfDoctrineGuardPlugin.tzg i get this error unable to register channel pear.symfony.com from the readme file, it says i can do a local install the way ive done above. Is there a way i can stop plugin:install from refering to the web, since the computer i am using syfony in is not connected? 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.comsymfony-users%2bunsubscr...@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: how can I make normal query using Symfony and Doctrine ?
thx :) On 5 Sty, 14:01, klemens_u klem...@ull.at wrote: Hi Alex, try this to get the PDO connection: $dbh = Doctrine_Manager::getInstance()-getCurrentConnection()-getDbh (); $result = $dbh-query(SELECT * FROM my_table); :-) Klemens On 5 Jan., 13:23, alexmm misiekaleksan...@gmail.com wrote: I want to make normal query in symfony and doctrine without models etc. I am trying: $result = Doctrine_Manager::connection()-getDbh()-query(SELECT * FROM table)-execute(); print_r($result); but I get nothing :( -- 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: embedForm bug?
I have read many of theese tutorials. Without effect. I have unset id. But.. look at this schema of saving forms http://vousavezchoisi.com/img/formsdiagram.png I don't know if is correct but according to this image my form is saving twice to the database. First in doSave() method and second in saveEmbededForms() method. I think that here is the problem. When i try to overwrite the saveEmbededForms() only by return null: everything seams to be allright. But c'mon! This can't correct way to save form. On 5 Sty, 07:44, Daniel Lohse annismcken...@googlemail.com wrote: What symfony/Doctrine version are you using? If it's 1.3/1.4, you can use embedRelation(). Over the top of my head, I'd guess it's got something to do with you not unset()-ing the primary key of the embedded form. There was even a blog post from Fabien (I think) about this, so search Google for that. Cheers, Daniel Sent from my iPhone On Jan 5, 2010, at 2:36 AM, kierzniak kierzn...@gmail.com wrote: I have problem during saving embed form. Someone describe it on this site: http://symfonyguide.wordpress.com/2009/09/28/symfony-forms-saving-pro... my problem is connected with this part: I tried to embed an sfGuardForm with this system. Saving a new object went fine, but for some reasons, editing didn’t work. After some a l ot of debug, I found that it triggered a hidden validation error “An object with the same ‘username’ already exists”. Honestly I don ’t really remember on which level it happened, but I think this is linked to the fact that some methods are executed twice and shouldn’t be. Even calling the bind() method on embedded forms seems to me to be a redundancy. When you submit a form, doClean() deeply clean the values, meaning even embedded forms values are passed to the validators, and returned cleaned. So if you call bind() on an embedded form it will call the clean method again. In my case when i try to save embed form i have three inserts to database while should be only 2. One to sfGuardUser table and one to my schema table PanelUser. Insert to PanelUser is doubled and i don't know why. INSERT INTO sf_guard_user (algorithm, is_active, is_super_admin, username, salt, password, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?) - (sha1, 1, 0, pio.ma, e4ebecdd99d5f1128e87b36980fcb89b, 1744b44ee23963ecf737b33839e464b1bcb0af90, 2009-12-31 15:21:14, 2009-12-31 15:21:14) INSERT INTO panel_user (sf_guard_user_id, first_name, last_name, email_address, allegro_id) VALUES (?, ?, ?, ?, ?) - (6, Piotr, Malek, f...@onet.com, 12313123) INSERT INTO panel_user (first_name, last_name, email_address, allegro_id) VALUES (?, ?, ?, ?) - (Piotr, Malek, f...@onet.com, 12313123) -- 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 athttp://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: problem installing sfDoctrineGuard Plugin
thanks alot. it was deceptively simple but it worked. I must have missed a step somewhere. thanks again On Jan 5, 5:29 pm, Stéphane stephane.er...@gmail.com wrote: Please, download package, unzip it in your plugins directory and add the $this-enablePlugins('dirName'), in your projectConfiguration.class.php then plugin:publish-assets if needed. Check readme on plugin website. I'm pretty sure google would give you an answer near this one :-) Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Tue, Jan 5, 2010 at 3:15 PM, el-sid sydneyari...@gmail.com wrote: ok...i downgraded to symfony 1.3 and downloaded sfDoctrineGuardPlugin 4.0 and 3.0 followed some advice on symfony forums to do this symfony plugin:install ./sfDoctrineGuardPlugin-3.0.0.tgz rm sfDoctrineGuardPlugin-3.0.0.tgz but the symfony tool still tries to connect to the internet, even though i am trying to do a local plugin install. Is there a way to unset this default choice? please help On Jan 4, 11:34 pm, el-sid sydneyari...@gmail.com wrote: hi all i'm using symfony 1.4 with version 4.0.1 of doctrineguardplugin. i downloaded the package from symfony website. when i issue the command ./symfony plugin:install /path/to/sfDoctrineGuardPlugin.tzg i get this error unable to register channel pear.symfony.com from the readme file, it says i can do a local install the way ive done above. Is there a way i can stop plugin:install from refering to the web, since the computer i am using syfony in is not connected? 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.comsymfony-users%2bunsubscr...@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] Is netbeans compatible with symfony
hi guys i'm new to symfony till now i was working without using ide now i found that netbeans 6.8 supports symfony.is there any issues coz i don wan again to struggle like earlier please if any one is working on netbeans please let me know Boss. Regards, Lucky -- 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] Get/Set - what is more 'correct' in symfony
I have a MySQL table that stores a 'mood id' (eg. 6) and a picture associated with that mood (eg. /images/mood_happy.png'). mood_id is referenced on other tables like 'customer_contact' but I never want to see the mood_id - everytime mood is referenced in other tables eg. customer_contact, I just want the graphic to display. So far, I'm displaying the mood picture by adding a new property in actions.class.php controller ie., $this-mood = Doctrine::getTable('mood')-find(array($this-contact- getMoodId())); Then, to display the image in showSuccess.php I call $mood-getImage (). Is this the right way or a reasonable way to handle a 'mapped-to' column in a table OR am I not using symfony correctly/to its best capacity? What I'm asking is if there's a more 'symfonic' way to handle this situation whereby EVERY time I access a mood table via the key (mood_id), I actually receive the image name (mood_image)? Tks guys! ps. I'm using doctrine. pps. I love 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.
Re: [symfony-users] sfDoctrineGuard and behaviors
On 04.01.2010, at 11:49, Lukas Kahwe Smith wrote: (*) the issue is caused by the way the behaviors are defined in the sfDoctrineGuard plugin: sfGuardUser: actAs: [Timestampable] in my customized plugin i used the proper (aka the one that does not require magic inside the Doctrine builder), then it clashes with the merge magic inside the Doctrine plugin task code: sfGuardUser: actAs: Timestampable: ~ SoftDelete: ~ Blameable: : *Blameable I guess I will discuss with Jonathan if this bug should be fixed inside the plugin merge task or inside the Doctrine builder. guess someone else has already opened a ticket: http://trac.symfony-project.org/ticket/8044 regards, Lukas Kahwe Smith m...@pooteeweet.org -- 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] Is netbeans compatible with symfony
There was a thread earlier which discussed symfony plugins for netbeans, it's been discussed this week itself, you should do a little search for it. On Tue, Jan 5, 2010 at 12:57 PM, lucky givin.chris...@gmail.com wrote: hi guys i'm new to symfony till now i was working without using ide now i found that netbeans 6.8 supports symfony.is there any issues coz i don wan again to struggle like earlier please if any one is working on netbeans please let me know Boss. Regards, Lucky -- 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.comsymfony-users%2bunsubscr...@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] Debugging forms ..
Hi all What is the best way of debugging Forms with the form framework? Im used to print_r()'ing objects, but with the nesting in sfForm framework this is a bad idea .. The problem I have is that I have a form that has a global error - There is an error with your form, but none of the fields are highlighted. Currently I have to write a debug function that does something like this: foreach ($form - getErrorSchema() - getErrors() as $error) { echo $error - getMessage(); } It would be cool if the errors were displayed in the web-debug toolbar, would that be possible? -- 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] Debugging forms ..
This usually means you forgot to echo the csrf secret field in your form. On Tue, Jan 5, 2010 at 17:59, dantleech dan.t.le...@gmail.com wrote: The problem I have is that I have a form that has a global error - There is an error with your form, but none of the fields are highlighted. -- 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: Debugging forms ..
In this case it was because widgets in the form were not being rendered .. but that's a different story :) On Jan 5, 5:16 pm, Gábor Fási maerl...@gmail.com wrote: This usually means you forgot to echo the csrf secret field in your form. On Tue, Jan 5, 2010 at 17:59, dantleech dan.t.le...@gmail.com wrote: The problem I have is that I have a form that has a global error - There is an error with your form, but none of the fields are highlighted. -- 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: sfWidgetFormJQueryDate option format is no longer supported in version 1.1.1?
Hello Axel, I like your solution, but in Opera (v. 10.10) it has broken layout little bit ... On 5 led, 11:40, Massimiliano Arione garak...@gmail.com wrote: Axel, my solution is totally independ from date format. On my page (liked above) there is also an example with day/month/year On 4 Gen, 13:17, axel at axel.zu...@gmail.com wrote: Hi Massimiliano, when I use your datepicker solution I still have the problem that the date selects are mm/dd/ and I would need dd/mm/ ( Date.format = 'dd.mm.'; is included in date_de.js ) On 31 Dez. 2009, 17:01, Massimiliano Arione garak...@gmail.com wrote: Forget sfWidgetFormJQuery and try this full-javascript solution:http://garakkio.altervista.org/datepicker/ On 29 Dic, 13:58, axel at axel.zu...@gmail.com wrote: after upgrading to symonfy 1.3 and sfFormExtraPlugin 1.1.1 the format option is no longer supported by sfWidgetFormJQuery $this-setWidgets(array( 'from_date' = new sfWidgetFormJQueryDate(array( 'image'='/images/icons/calendar_view_month.gif', 'format' = '%day%-%month%-%year%', 'culture' = 'de_AT') ), )); is there another way to change the date format (from mm-dd- to dd- mm-)? -- 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: sfWidgetFormJQueryDate option format is no longer supported in version 1.1.1?
I wanted to add a link to a printscreen to imageshack (with your datepicker in Opera), but when I add a link into this reply window it show me an error that I can't post it... On 5 led, 19:23, Tom Ptacnik to...@tomor.cz wrote: Hello Axel, I like your solution, but in Opera (v. 10.10) it has broken layout little bit ... On 5 led, 11:40, Massimiliano Arione garak...@gmail.com wrote: Axel, my solution is totally independ from date format. On my page (liked above) there is also an example with day/month/year On 4 Gen, 13:17, axel at axel.zu...@gmail.com wrote: Hi Massimiliano, when I use your datepicker solution I still have the problem that the date selects are mm/dd/ and I would need dd/mm/ ( Date.format = 'dd.mm.'; is included in date_de.js ) On 31 Dez. 2009, 17:01, Massimiliano Arione garak...@gmail.com wrote: Forget sfWidgetFormJQuery and try this full-javascript solution:http://garakkio.altervista.org/datepicker/ On 29 Dic, 13:58, axel at axel.zu...@gmail.com wrote: after upgrading to symonfy 1.3 and sfFormExtraPlugin 1.1.1 the format option is no longer supported by sfWidgetFormJQuery $this-setWidgets(array( 'from_date' = new sfWidgetFormJQueryDate(array( 'image'='/images/icons/calendar_view_month.gif', 'format' = '%day%-%month%-%year%', 'culture' = 'de_AT') ), )); is there another way to change the date format (from mm-dd- to dd- mm-)? -- 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: Storing navigation via associative arrays in YAML
Thank you Daniel! That was it. Now I remember reading that in the Docs. I ended up doing this: all: .navigation: tabs: main: - { slug: monitoring, link: Monitoring } - { slug: customers,link: Customers } customers: - { slug: lookup, link: Customer Lookup } - { slug: communities, link: Communities } monitoring: - { slug: report, link: Current Report } Livesaver! On Jan 4, 10:40 pm, Daniel Lohse annismcken...@googlemail.com wrote: As I'm currently in public transportation, I cannot give you a specific doc page but I know this is in 1.2 book. What you need to do is the following: all: .navigation: tabs_main: monitoring: Monitoring customers: Customers Sorry if the indentation is not accurate in this email, I think you know how to handle this. The important part is this: the additional group label with the dot at the beginning is not part of the access key! So after this you can access the array like so: sfConfig::get ('app_tabs_main'). Cheers, Daniel Sent from my iPhone On Jan 5, 2010, at 2:43 AM, SB oce...@gmail.com wrote: Hi all, I'm trying to store my navigation tabs in app.yaml and retrieve an associative array of the form: Here's my app.yml: all: tabs_main: monitoring: Monitoring customers: Customers What I wish I could do is sfConfig::get('app_tabs_main') which is an array like: array('monitoring' = 'Monitoring', 'customers' = 'Customers'); but app_tabs_main doesn't exist. I can do app_tabs_main_monitoring and app_tabs_main_customers but that doesn't help, because the whole idea is that I won't know which pages to ask for. I also tried all: tabs_main: - { monitoring: Monitoring } - { customers: Customers } but that gives: sfConfig::get('app_tabs_main_0') = array('monitoring' = 'Monitoring') and sfConfig::get('app_tabs_main_1') = array('customers' = 'Customers') which is close, but no cigar. How have you tackled storing tabs or navigation in YAML files? Thanks, SB -- 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 athttp://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: Accessing arrays from templates turns them into sfOutputEscaperArrayDecorator objects?
Thanks all! On Jan 5, 5:02 am, ken marfillas...@gmail.com wrote: you can use $object-getRaw('property'); On Jan 5, 6:34 pm, chrisyue blizzch...@gmail.com wrote: I also encountered a problem like that: when I pass a DOMDocument object $dom to view, I found that I can't treat $dom as array anymore, I put $dom in a foreach statement: foreach ($dom-getElementsByTagName('name') as $name ) .. It would always ouput names from a xml file untill I set escape option on in settings.yml Gábor Fási wrote: sfOutputEscaperArrayDecorator means you have output escaping enabled, and any data you send to the view gets escaped for safety. You can still use it as an array, like $content_tabs[key1], the only difference you'll see is that you need not use htmlspecialchars() or anything like that. On Tue, Jan 5, 2010 at 04:06, SB oce...@gmail.com wrote: Hello, I'm trying to do something really simple (I thought), send an array from the controller to the template. actions.class.php: $this-content_tabs = array('key1' = 'value1', 'key2' = 'value2'); indexSuccess.php: var_dump($content_tabs); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) However, if I try to output a simple scalar variable, i.e.: actions.class.php $this-content_tabs = 'test'; indexSuccess.php var_dump($content_tabs); gives: string 'test' (length=4) I get the same result if I try to set a request parameter as an array in a filter, i.e. myFilter.php: $this-getContext()-getRequest()-setParameter('content_tabs', array ('key1' = 'value1', 'key2' = 'value2')); if i output this in myFilter.php: var_dump($this-getContext()-getRequest()-getParameter ('content_tabs')); gives: array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) but if i output in indexSuccess.php: var_dump($sf_request-getParameter('content_tabs')); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) Why is this happening? Is there no way to send arrays to the view layer? thanks! SB -- 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 athttp://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] Re: Storing navigation via associative arrays in YAML
Cool, no problem. Glad to be of help! Cheers, Daniel On Jan 5, 2010, at 7:51 PM, SB wrote: Thank you Daniel! That was it. Now I remember reading that in the Docs. I ended up doing this: all: .navigation: tabs: main: - { slug: monitoring, link: Monitoring } - { slug: customers,link: Customers } customers: - { slug: lookup, link: Customer Lookup } - { slug: communities, link: Communities } monitoring: - { slug: report, link: Current Report } Livesaver! On Jan 4, 10:40 pm, Daniel Lohse annismcken...@googlemail.com wrote: As I'm currently in public transportation, I cannot give you a specific doc page but I know this is in 1.2 book. What you need to do is the following: all: .navigation: tabs_main: monitoring: Monitoring customers:Customers Sorry if the indentation is not accurate in this email, I think you know how to handle this. The important part is this: the additional group label with the dot at the beginning is not part of the access key! So after this you can access the array like so: sfConfig::get ('app_tabs_main'). Cheers, Daniel Sent from my iPhone On Jan 5, 2010, at 2:43 AM, SB oce...@gmail.com wrote: Hi all, I'm trying to store my navigation tabs in app.yaml and retrieve an associative array of the form: Here's my app.yml: all: tabs_main: monitoring: Monitoring customers:Customers What I wish I could do is sfConfig::get('app_tabs_main') which is an array like: array('monitoring' = 'Monitoring', 'customers' = 'Customers'); but app_tabs_main doesn't exist. I can do app_tabs_main_monitoring and app_tabs_main_customers but that doesn't help, because the whole idea is that I won't know which pages to ask for. I also tried all: tabs_main: - { monitoring: Monitoring } - { customers:Customers } but that gives: sfConfig::get('app_tabs_main_0') = array('monitoring' = 'Monitoring') and sfConfig::get('app_tabs_main_1') = array('customers' = 'Customers') which is close, but no cigar. How have you tackled storing tabs or navigation in YAML files? Thanks, SB -- 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 athttp://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] Re: Debugging forms ..
hello, just for info, the only way i found to get all errors compiled is this : {{{ // in lib/form/doctrine/BaseFormDoctrine.class.php // or lib/form/BaseForm.class.php public function getErrors() { $errors = array(); foreach ($this as $form_field) { if ($form_field-hasError()) { $error_obj = $form_field-getError(); if ($error_obj instanceof sfValidatorErrorSchema) { foreach ($error_obj-getErrors() as $error) { $errors[$form_field-getName()][] = $error- getMessage(); } } else { $errors[$form_field-getName()] = $error_obj- getMessage(); } } } foreach ($this-getGlobalErrors() as $validator_error) { $errors[] = $validator_error-getMessage(); } return $errors; } }}} It's useful for debbuging : just do a ?php print_r($form-getErrors()) ? On 5 jan, 18:45, dantleech dan.t.le...@gmail.com wrote: In this case it was because widgets in the form were not being rendered .. but that's a different story :) On Jan 5, 5:16 pm, Gábor Fási maerl...@gmail.com wrote: This usually means you forgot to echo the csrf secret field in your form. On Tue, Jan 5, 2010 at 17:59, dantleech dan.t.le...@gmail.com wrote: The problem I have is that I have a form that has a global error - There is an error with your form, but none of the fields are highlighted. -- 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: Accessing arrays from templates turns them into sfOutputEscaperArrayDecorator objects?
In a template, you can call $sf_data-getRaw('myActionProperty'); after init it like $this-myActionProperty = array('hey'='hoy'); inside an action. So you'll get your raw object : unescaped. Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Tue, Jan 5, 2010 at 8:26 PM, SB oce...@gmail.com wrote: Thanks all! On Jan 5, 5:02 am, ken marfillas...@gmail.com wrote: you can use $object-getRaw('property'); On Jan 5, 6:34 pm, chrisyue blizzch...@gmail.com wrote: I also encountered a problem like that: when I pass a DOMDocument object $dom to view, I found that I can't treat $dom as array anymore, I put $dom in a foreach statement: foreach ($dom-getElementsByTagName('name') as $name ) .. It would always ouput names from a xml file untill I set escape option on in settings.yml Gábor Fási wrote: sfOutputEscaperArrayDecorator means you have output escaping enabled, and any data you send to the view gets escaped for safety. You can still use it as an array, like $content_tabs[key1], the only difference you'll see is that you need not use htmlspecialchars() or anything like that. On Tue, Jan 5, 2010 at 04:06, SB oce...@gmail.com wrote: Hello, I'm trying to do something really simple (I thought), send an array from the controller to the template. actions.class.php: $this-content_tabs = array('key1' = 'value1', 'key2' = 'value2'); indexSuccess.php: var_dump($content_tabs); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) However, if I try to output a simple scalar variable, i.e.: actions.class.php $this-content_tabs = 'test'; indexSuccess.php var_dump($content_tabs); gives: string 'test' (length=4) I get the same result if I try to set a request parameter as an array in a filter, i.e. myFilter.php: $this-getContext()-getRequest()-setParameter('content_tabs', array ('key1' = 'value1', 'key2' = 'value2')); if i output this in myFilter.php: var_dump($this-getContext()-getRequest()-getParameter ('content_tabs')); gives: array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) but if i output in indexSuccess.php: var_dump($sf_request-getParameter('content_tabs')); gives: object(sfOutputEscaperArrayDecorator)[69] private 'count' = null protected 'value' = array 'key1' = string 'value1' (length=6) 'key2' = string 'value2' (length=6) protected 'escapingMethod' = string 'esc_specialchars' (length=16) Why is this happening? Is there no way to send arrays to the view layer? thanks! SB -- 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.comsymfony-users%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// 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.comsymfony-users%2bunsubscr...@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] Get/Set - what is more 'correct' in symfony
Just implement the __toString() method in your mood model class and return $this-_get('mood_image'); in it. Then you can just echo $mood in the template and it will output that path. Cheers, Daniel On Jan 5, 2010, at 12:42 PM, pete wrote: I have a MySQL table that stores a 'mood id' (eg. 6) and a picture associated with that mood (eg. /images/mood_happy.png'). mood_id is referenced on other tables like 'customer_contact' but I never want to see the mood_id - everytime mood is referenced in other tables eg. customer_contact, I just want the graphic to display. So far, I'm displaying the mood picture by adding a new property in actions.class.php controller ie., $this-mood = Doctrine::getTable('mood')-find(array($this-contact- getMoodId())); Then, to display the image in showSuccess.php I call $mood-getImage (). Is this the right way or a reasonable way to handle a 'mapped-to' column in a table OR am I not using symfony correctly/to its best capacity? What I'm asking is if there's a more 'symfonic' way to handle this situation whereby EVERY time I access a mood table via the key (mood_id), I actually receive the image name (mood_image)? Tks guys! ps. I'm using doctrine. pps. I love 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. -- 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: embedForm bug?
I don't understand this. Do you embed the same form into the same form? I'd need to see your schema and the form code where you're embedding the additional form. Cheers, Daniel On Jan 5, 2010, at 4:11 PM, kierzniak wrote: I have read many of theese tutorials. Without effect. I have unset id. But.. look at this schema of saving forms http://vousavezchoisi.com/img/formsdiagram.png I don't know if is correct but according to this image my form is saving twice to the database. First in doSave() method and second in saveEmbededForms() method. I think that here is the problem. When i try to overwrite the saveEmbededForms() only by return null: everything seams to be allright. But c'mon! This can't correct way to save form. On 5 Sty, 07:44, Daniel Lohse annismcken...@googlemail.com wrote: What symfony/Doctrine version are you using? If it's 1.3/1.4, you can use embedRelation(). Over the top of my head, I'd guess it's got something to do with you not unset()-ing the primary key of the embedded form. There was even a blog post from Fabien (I think) about this, so search Google for that. Cheers, Daniel Sent from my iPhone On Jan 5, 2010, at 2:36 AM, kierzniak kierzn...@gmail.com wrote: I have problem during saving embed form. Someone describe it on this site: http://symfonyguide.wordpress.com/2009/09/28/symfony-forms-saving-pro... my problem is connected with this part: I tried to embed an sfGuardForm with this system. Saving a new object went fine, but for some reasons, editing didn’t work. After some a l ot of debug, I found that it triggered a hidden validation error “An object with the same ‘username’ already exists”. Honestly I don ’t really remember on which level it happened, but I think this is linked to the fact that some methods are executed twice and shouldn’t be. Even calling the bind() method on embedded forms seems to me to be a redundancy. When you submit a form, doClean() deeply clean the values, meaning even embedded forms values are passed to the validators, and returned cleaned. So if you call bind() on an embedded form it will call the clean method again. In my case when i try to save embed form i have three inserts to database while should be only 2. One to sfGuardUser table and one to my schema table PanelUser. Insert to PanelUser is doubled and i don't know why. INSERT INTO sf_guard_user (algorithm, is_active, is_super_admin, username, salt, password, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?) - (sha1, 1, 0, pio.ma, e4ebecdd99d5f1128e87b36980fcb89b, 1744b44ee23963ecf737b33839e464b1bcb0af90, 2009-12-31 15:21:14, 2009-12-31 15:21:14) INSERT INTO panel_user (sf_guard_user_id, first_name, last_name, email_address, allegro_id) VALUES (?, ?, ?, ?, ?) - (6, Piotr, Malek, f...@onet.com, 12313123) INSERT INTO panel_user (first_name, last_name, email_address, allegro_id) VALUES (?, ?, ?, ?) - (Piotr, Malek, f...@onet.com, 12313123) -- 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 athttp://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] Re: symfony 1.2 + mssql 2005 + propel + wamp
I change to symfony 1.4. A tried to use ODBC connection width doctrine. The connecion works, anything else...:( Symfony can build schema. and read the db. But can't insert, or update. Now I'm trying to use DBLIB. the newest php 5.3.1 has the dll... (php_pdo_mssql.dll) But i got this message: Couldn't locate driver named dblib. I'm not an absolutely senior php/symfony developer so I thin I do somethin worong but i don't know what...:s Here is my config: all: doctrine: class: sfDoctrineDatabase param: dsn: 'dblib:host=localhost;dbname=erste_jutalek' username: sa password: asdfgh Can anybody help me? Previously thanks the answers On jan. 4, 19:37, xplo xplo...@gmail.com wrote: As far as i know there is no pdo mssql driver available for php 5.3 so it is not possible to use php 5.3 + mssql :/ However with php 5.2.x it s ok On Jan 4, 4:32 pm, Nathan Bijnens nbijn...@servs.eu wrote: Hello, When you start a new project, use the 1.4 release. If you're not starting from scratch upgrade to 1.3. Certainly because you're using php 5.3! I have good experiences with Doctrine, more than with Propel. I suggest you look at the documentation for both. If MSSql 2005 is a requirement, I guess a database with data also exist. If this is the case doctrine can generate it's schema based on a database instead of a schema.yml. Both Doctrine and Propel do database abstraction, you won't really notice the difference between Mssql 2005 and MySQL. However the doctrine mysql dbal is a lot better tested than the doctrine mssql dbal. For how to actually start: Just like any other Symfony project. Except in databases.yml put in a suitable dsn. (google for pdo dsn mssql if you really can't find anything). Best regards, Nathan On Mon, Jan 4, 2010 at 2:11 PM, Vikos make.webp...@gmail.com wrote: Hi! We are start a project that must use mssql 2005 and run on windows server. (vindows server 2003, apache2, mssql 2005, symfony 1.2...actual, php 5.3.1) How can I connect to sql server on windows via propel? Witch do you advise propel or doctrine? What problems can be? What experiences are? Thanks! Viktor -- 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.comsymfony-users%2bunsubscr...@goog legroups.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] 1.4, propel, and sfGuard problem
I thought I might try re-writing a system I built a few years ago inside symfony. To that end, I created an Ubuntu server Vbox appliance, installed symfony 1.4, initiated a new project and app, changed the default Doctrine to Propel (I'm familiar with it), then added sfGuard. At this point I successfully display the default new project page. However, whenever I try to run propel:build-all, the task fails with 'Unable to parse contents of the sqldb.map file'. Permissions appear to be ok (owned by myself, with 644 mode). I have tried running with an empty schema, as well as including a single sfGuardUserProfile definition. The sqldb.map in question (currently) contains: #Sqlfile - Database map generated-sfGuardPlugin-schema.sql=propel generated-schema.sql=propel schema.sql= I have tried adding 'propel' to the final line, as well as deleting the final line. Neither eliminates the error message. All three referenced files exist and appear correct. Any ideas? I can always load the sql statements manually, but given I have yet to even begin development, and expect numerous changes, it would be easier if I could figure out why the task is failing. Thanks in advance. Marti -- 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: symfony 1.2 + mssql 2005 + propel + wamp
Try this one: http://trac.symfony-project.org/wiki/HowToConnectToMSSQLServer, chapter Windows host On Wed, Jan 6, 2010 at 00:40, Vikos make.webp...@gmail.com wrote: I change to symfony 1.4. A tried to use ODBC connection width doctrine. The connecion works, anything else...:( Symfony can build schema. and read the db. But can't insert, or update. Now I'm trying to use DBLIB. the newest php 5.3.1 has the dll... (php_pdo_mssql.dll) But i got this message: Couldn't locate driver named dblib. I'm not an absolutely senior php/symfony developer so I thin I do somethin worong but i don't know what...:s Here is my config: all: doctrine: class: sfDoctrineDatabase param: dsn: 'dblib:host=localhost;dbname=erste_jutalek' username: sa password: asdfgh Can anybody help me? Previously thanks the answers On jan. 4, 19:37, xplo xplo...@gmail.com wrote: As far as i know there is no pdo mssql driver available for php 5.3 so it is not possible to use php 5.3 + mssql :/ However with php 5.2.x it s ok On Jan 4, 4:32 pm, Nathan Bijnens nbijn...@servs.eu wrote: Hello, When you start a new project, use the 1.4 release. If you're not starting from scratch upgrade to 1.3. Certainly because you're using php 5.3! I have good experiences with Doctrine, more than with Propel. I suggest you look at the documentation for both. If MSSql 2005 is a requirement, I guess a database with data also exist. If this is the case doctrine can generate it's schema based on a database instead of a schema.yml. Both Doctrine and Propel do database abstraction, you won't really notice the difference between Mssql 2005 and MySQL. However the doctrine mysql dbal is a lot better tested than the doctrine mssql dbal. For how to actually start: Just like any other Symfony project. Except in databases.yml put in a suitable dsn. (google for pdo dsn mssql if you really can't find anything). Best regards, Nathan On Mon, Jan 4, 2010 at 2:11 PM, Vikos make.webp...@gmail.com wrote: Hi! We are start a project that must use mssql 2005 and run on windows server. (vindows server 2003, apache2, mssql 2005, symfony 1.2...actual, php 5.3.1) How can I connect to sql server on windows via propel? Witch do you advise propel or doctrine? What problems can be? What experiences are? Thanks! Viktor -- 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.comsymfony-users%2bunsubscr...@goog legroups.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] showsuccess
HELP!! Symfony print in the showSuccess text change html tags table width=100% cellspacing=1 cellpadding=1 border=1 captionEncabezado/caption tbody tr tdnbsp;/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;/td /tr tr tdnbsp;/td tdnbsp;/td /tr /tbody /table Gabo -- 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] created_at is intermittently blank
I've a problem with the created_at field defined in my schema.yml on this site: http://www.wpquestions.com/ I've this table: sf_guard_user_profile: _attributes: { phpName: sfGuardUserProfile } id: ~ user_id: { type: integer, foreignTable: sf_guard_user, foreignReference: id, required: true } status: { type: varchar(255), required: false } first_name: { type: varchar(255), required: false } last_name:{ type: varchar(255), required: false } email:{ type: varchar(255), required: false } url: { type: varchar(255), required: false } description:{ type: longvarchar, required: false } created_at: ~ updated_at:~ cash_total: { type: float, required: false } image:{ type: VARCHAR, size:255 } secret_signup_key: { type: VARCHAR, size:255 } twitter_address: { type: VARCHAR, size:255 } landing_page: { type: VARCHAR, size:255 } The registration form is here: http://www.wpquestions.com/user/register When I look in the database, I see that about 60% of the users have blank values for the created_at field. The other 40% have the value filled in automatically, as one might expect. Why would this field be intermittently blank? -- 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.