[symfony-users] Doctrine Searchable with non-ASCII characters
Hi, Let's say I have text in Turkish language: selam günaydın. Doctrine searchable converts it to keywords in table: -selam -guenaydin So guenaydin was saved in table as keyword günaydın so when somebody writes in search günaydın he gets nothing - what can I do? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: File upload problem
problem solved , it was some server side problem , fixed by just setting the temp upload directory On May 15, 4:13 pm, Ali aalish...@gmail.com wrote: HI symfony users, i am facing a problem when i upload the files from the admin section . there are two problems 1 : mp3 files are uploading successfully on my local system , but when i upload the file on shared hosting the extension changes to .text my local machine is windows and im using wamp setup 2 : the .flv files changes to .bin , both on my local and shared server ( linux box ) i changed the mime_types to audo/mpeg for mp3 please tell me how to fix this Thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] passing values as query string to a form
basically i have two modules Customers and logs, This is basically CRM tool. it used to record how many times we contacted the customer This is my schema # config/doctrine/schema.yml State: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true, unique: true } Status: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true, unique: true } Project: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true, unique: true } Users: actAs: { Timestampable: ~ } columns: state_id: { type: integer, notnull: true } username: { type: string(255), notnull: true, unique: true } password: { type: string(255), notnull: false, unique: true } token: { type: string(255), notnull: true } is_active: { type: boolean, notnull: true, default: 0 } role: { type: integer, default: 0 } relations: State: { onDelete: CASCADE, local: state_id, foreign: id, foreignAlias: State } Customer: actAs: { Timestampable: ~ } columns: state_id: { type: integer, notnull: true } mobile: { type: string(11), notnull: true, unique: true } email: { type: string(255), notnull: false, unique: true } name: { type: string(255), notnull: false } address: { type: string(255)} relations: State: { onDelete: CASCADE, local: state_id, foreign: id, foreignAlias: State } CallLog: actAs: { Timestampable: ~ } columns: customer_id: { type: integer, notnull: true } status_id: { type: integer, notnull: true } project_id: { type: integer, notnull: true } users_id: { type: integer, notnull: true } response: { type: string(255) } relations: Project: { onDelete: CASCADE, local: project_id, foreign: id, foreignAlias: Project } Customer: { onDelete: CASCADE, local: customer_id, foreign: id, foreignAlias: Customer } Status: { onDelete: CASCADE, local: status_id, foreign: id, foreignAlias: Status } Users: { onDelete: CASCADE, local: users_id, foreign: id, foreignAlias: Users } I am using generated forms for this project I need to pass a value (customerid) to generated call_log form how can i do this ? or any alternate way ? This is my form widget abstract class BaseCallLogForm extends BaseFormDoctrine { public function setup() { $this-setWidgets(array( 'id' = new sfWidgetFormInputHidden(), 'customer_id' = new sfWidgetFormDoctrineChoice(array('model' = $this-getRelatedModelName('Customer'), 'add_empty' = false)), 'status_id' = new sfWidgetFormDoctrineChoice(array('model' = $this-getRelatedModelName('Status'), 'add_empty' = false)), 'project_id' = new sfWidgetFormDoctrineChoice(array('model' = $this-getRelatedModelName('Project'), 'add_empty' = false)), 'users_id'= new sfWidgetFormDoctrineChoice(array('model' = $this-getRelatedModelName('Users'), 'add_empty' = false)), 'response'= new sfWidgetFormInputText(), 'created_at' = new sfWidgetFormDateTime(), 'updated_at' = new sfWidgetFormDateTime(), )); I need customer id to be hidden and pass it from customer module how can i do this Please help me Thanks in advance Arun Raj R -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Templates in a single directory
Hi everybody, for the project I've been working on I need to be able to define multiple themes. With theme I mean the full thing, including php code for the templates, images, stylesheets and javascripts too. But symfony templates structure is not quite friendly for this kind of operation, since we have files on - apps/frontend/templates/ - apps/frontend/modules/*/templates/ - web/images - web/css - web/js Which is not a good solution to mantain. My idea was to package themes in the data directory, creating something like - data -- themes --- default css js images templates modules - module1 - module2 Basically I need to be able to put every file needed in a single directory (like most CMS do). Since the data dir is not world wide accessible, I thought about creating a task that creates symlinks in the web directory, so this problem is easily solved. Now about the PHP files: what's the best solution to handle this? I think I have two choices: 1 make symfony look into the right directories, creating custom view and partial classes 2 making the apps/frontend/templates and apps/frontend/modules/*/ templates symlink to the directory theme I like more the first solution, but after a while looking in the symfony core I still can't figure out how to redirect all paths to the theme dir. Setting the global layout is as easy as doing sfConfig::set('sf_app_template_dir', $themeDir . '/templates') But module templates are a bit harder to configure. Actually, I still don't know how to do that :) So this is my question: which one is the best approach? I'd rather not have symlinks all over my project, but that seems to be the easiest solution (one console task to handle everything, no symfony classes to override, no risks to forget about this or that...). -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Compatibility PHP 5.3
On 15 Mag, 22:15, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Anyone who has experienced using Symfony on PHP 5.3? Did it all run fine? No compatibility errors / bugs? The Symfony versions 1.1, 1.2, 1.4? Take a look to this ticket http://trac.symfony-project.org/ticket/8563 Other issues are minor. cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Doctrine Behavior example in symfony 1.4 book - CountCache
I have the same problem. I stumpled across this: http://forum.symfony-project.org/index.php?t=rviewgoto=90931th=24670#msg_90931 But I'd love to know if there was a cleaner way to do it. Any Doctrine developers out there got any suggestions? Thanks, Tom On Apr 5, 8:03 am, mstralka mstra...@gmail.com wrote: Hi, An example in The More with symfony book chapter 8 shows how to create a doctrine behavior called CountCache that counts the number of Posts a Thread has related to it:http://www.symfony-project.org/more-with-symfony/1_4/en/08-Advanced-D... I'm trying to use this behavior in my domain model but the sample code doesn't provide getters and setters for the num_posts column. For example, I want to be able to do this: ?php echo $thread-getNumPosts() ? But a 500 exception is thrown which reads: Unknown record property / related component num_posts on Thread Am I missing something? Thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Templates in a single directory
Would http://www.symfony-project.org/plugins/ysfDimensionsPlugin help? cheers, Tony. On May 16, 6:53 pm, Davide Borsatto lloy...@gmail.com wrote: Hi everybody, for the project I've been working on I need to be able to define multiple themes. With theme I mean the full thing, including php code for the templates, images, stylesheets and javascripts too. But symfony templates structure is not quite friendly for this kind of operation, since we have files on - apps/frontend/templates/ - apps/frontend/modules/*/templates/ - web/images - web/css - web/js Which is not a good solution to mantain. My idea was to package themes in the data directory, creating something like - data -- themes --- default css js images templates modules - module1 - module2 Basically I need to be able to put every file needed in a single directory (like most CMS do). Since the data dir is not world wide accessible, I thought about creating a task that creates symlinks in the web directory, so this problem is easily solved. Now about the PHP files: what's the best solution to handle this? I think I have two choices: 1 make symfony look into the right directories, creating custom view and partial classes 2 making the apps/frontend/templates and apps/frontend/modules/*/ templates symlink to the directory theme I like more the first solution, but after a while looking in the symfony core I still can't figure out how to redirect all paths to the theme dir. Setting the global layout is as easy as doing sfConfig::set('sf_app_template_dir', $themeDir . '/templates') But module templates are a bit harder to configure. Actually, I still don't know how to do that :) So this is my question: which one is the best approach? I'd rather not have symlinks all over my project, but that seems to be the easiest solution (one console task to handle everything, no symfony classes to override, no risks to forget about this or that...). -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: sfErrorHandlerPlugin doesn't catch call to a member function on a non-object errors
There are actually _recoverable_ fatal errors (really), which sfErrorHandler DOES catch If you see an error like that with sfErrorHandler installed, it HAS caught it - and flushed the error from the output buffer. It's not possible to do much more than that in the case of a non-recoverable fatal error On 11 May 2010, at 06:29, Richtermeister wrote: This is because the php engine shuts down completely when a fatal error is encountered. Symfony doesn't get to do anything after that point. What the error handler really handles are Exceptions, not fatal errors. Daniel On May 10, 10:14 am, nurikabe eaow...@gmail.com wrote: e.g.: sfErrorHandlerPlugin can't seem to trap errors like: Fatal error: Call to a member function xyz() on a non-object in file.php on line ## Is that to be expected, or is this possibly a limitation of the older version of Symfony we are using (1.0.3)? Thanks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: How to convert a SQL query to a Doctrine left join with subquery
That's working perfectly now using the HYDRATE_RECORD and looping - I only had to change the query to group by r.id so it shows all requests with or without a comment made. Very much appreciated. On May 13, 5:02 pm, grahamj42 graham...@orange.fr wrote: $collection is a Doctrine_Collection object. This has a method get() which can take a row number and returns a Doctrine_Record object. The Doctrine-Record object can be accessed by field name, so $collection-get(0)-title should return the title of the first request. Alternatively, you can use HYDRATE_ARRAY instead of HYDRATE_RECORD to return the results as an array. One advantage of Doctrine_Collection is that it can retrieve rows from the database on demand, which is good with a pager on a large result set. Hope this will get you further. On May 13, 3:37 pm, El Duderino tleftw...@gmail.com wrote: The simplified DQL looks good and returns the correct rows including the last created_at so definite progress. You mentioned using $collection=$q-execute(array(),Doctrine_Core::HYDRATE_RECORD); // to retrieve all the records How exactly would I be able to use this to pull the comment's last date and display it on a typical indexSuccess.php page? For example, I can get the request's created_at this way: ?php echo $request-getComments()-getCreatedAt() ?, but how do you access the last_comment seeing as it isn't part of the model? Thanks so much for this. On May 13, 11:25 am, grahamj42 graham...@orange.fr wrote: I would start by simplifying the query: SELECT r.*, MAX(c.created_at) AS last_comment FROM request r LEFT JOIN comment c on r.id=c.request_id GROUP BY c.request_id; This can be expressed using DQL as: $q=Doctrine_Query::create()-select( 'r.*, MAX(c.created_at) AS last_comment' )-from( 'request r, r.Comments c' )- groupBy( 'c.request_id' ); echo $q-getSqlQuery(); // to see the SQL generated $collection=$q-execute(array(),Doctrine_Core::HYDRATE_RECORD); // to retrieve all the records See the chapter on DQL in the Doctrine manual. Unless I'm going crazy, it seems that the manual has been temporarily withdrawn from the site. I could mail you a copy. Regards, Graham On May 13, 10:22 am, El Duderino tleftw...@gmail.com wrote: To simplify a project I am working on it has two tables, one for posting requests, the other for making comments on that request (one- to-many relationship). The objective is to return one line per request (whether there has been a comment or not) and show the date for the latest comment made on that request. Although I have found a way to do this with a regular SQL query, I'm stumped on how to get this working with Doctrine on Symfony, specifically how to work with the subquery. SQL query: SELECT * FROM request LEFT JOIN ( SELECT s1.* FROM comment as s1 LEFT JOIN comment AS s2 ON s1.request_id = s2.request_id AND s1.created_at s2.created_at WHERE s2.request_id IS NULL ) AS comment_tmp ON (request.id = comment_tmp.request_id) Schema: Request: actAs: Timestampable: ~ columns: title: { type: string(255), notnull: true } Comment: actAs: Timestampable: ~ columns: request_id: { type: integer(10), notnull: true } comments: { type: string(1), notnull: true } relations: Request: { onDelete: CASCADE, local: request_id, foreign: id, foreignAlias: Comments, foreignType: one } Any insights appreciated. Thanks! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to
[symfony-users] Re: Templates in a single directory
Unfortunately no, the plugin itself (for what I've seen) it's not useful, since what I'm trying to achieve is quite specific. I'll maybe try to look at its source code to see how a few things are done, maybe that will help... On May 16, 10:21 pm, Tony Piper tpi...@tpiper.com wrote: Wouldhttp://www.symfony-project.org/plugins/ysfDimensionsPluginhelp? cheers, Tony. On May 16, 6:53 pm, Davide Borsatto lloy...@gmail.com wrote: Hi everybody, for the project I've been working on I need to be able to define multiple themes. With theme I mean the full thing, including php code for the templates, images, stylesheets and javascripts too. But symfony templates structure is not quite friendly for this kind of operation, since we have files on - apps/frontend/templates/ - apps/frontend/modules/*/templates/ - web/images - web/css - web/js Which is not a good solution to mantain. My idea was to package themes in the data directory, creating something like - data -- themes --- default css js images templates modules - module1 - module2 Basically I need to be able to put every file needed in a single directory (like most CMS do). Since the data dir is not world wide accessible, I thought about creating a task that creates symlinks in the web directory, so this problem is easily solved. Now about the PHP files: what's the best solution to handle this? I think I have two choices: 1 make symfony look into the right directories, creating custom view and partial classes 2 making the apps/frontend/templates and apps/frontend/modules/*/ templates symlink to the directory theme I like more the first solution, but after a while looking in the symfony core I still can't figure out how to redirect all paths to the theme dir. Setting the global layout is as easy as doing sfConfig::set('sf_app_template_dir', $themeDir . '/templates') But module templates are a bit harder to configure. Actually, I still don't know how to do that :) So this is my question: which one is the best approach? I'd rather not have symlinks all over my project, but that seems to be the easiest solution (one console task to handle everything, no symfony classes to override, no risks to forget about this or that...). -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Hey guys... transactions??
Hey guys... based on my understand about transactions in symfony the following should not result in the data in the table been modified... however it is... any ideas as to what i am doing wrong...?? $cdb_connection = Propel::getConnection('cdb'); $cdb_connection-beginTransaction(); $statement_cdb = $cdb_connection-prepare(TRUNCATE test); $statement_cdb-execute(); $statement_cdb = $cdb_connection-prepare(INSERT INTO test (a) VALUES (.rand(0,9).)); $statement_cdb-execute(); $cdb_connection-rollback(); die(__file__.__line__); -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Hey guys... transactions??
Yep that was it... , how did you know? On Mon, May 17, 2010 at 2:22 PM, Garry Freemyer garry...@pacbell.net wrote: Two guesses. 1. Is the underlying database mysql? If so the transaction stuff only works if the table(s) it is working on are of type InnoDb 2. Truncate table cannot be rolled back, perhaps the presence of the truncate table command is causing the transaction to be ignored. If the tables are innodb type, try moving the truncate test command to just above the beginTransaction and see what that does. From: Richard U richard@gmail.com To: symfony-users@googlegroups.com Sent: Sun, May 16, 2010 8:57:38 PM Subject: [symfony-users] Hey guys... transactions?? Hey guys... based on my understand about transactions in symfony the following should not result in the data in the table been modified... however it is... any ideas as to what i am doing wrong...?? $cdb_connection = Propel::getConnection('cdb'); $cdb_connection-beginTransaction(); $statement_cdb = $cdb_connection-prepare(TRUNCATE test); $statement_cdb-execute(); $statement_cdb = $cdb_connection-prepare(INSERT INTO test (a) VALUES (.rand(0,9).)); $statement_cdb-execute(); $cdb_connection-rollback(); die(__file__.__line__); -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en