[symfony-users] Problems running doctrine:build-all task
Hi every: First of all my apologies if this isn't the right place to ask this. I have created a schema.yml file from scratch containing this: ProjectData: actAs: Timestampable: Searchable: fields: [pid, pname, pdescription, pstatus] columns: id: ~ pid: string(50) pname: string(150) pdescription: string(150) pstatus: boolean When I run the task: #symfony doctrine:build-all All it's fine until the task try to create the tables on the DB. See the logs: #symfony doctrine:build-all This command will remove all data in your database connections named: doctrine Are you sure you want to proceed? (y/N) y doctrine dropping databases doctrine Successfully dropped database for connection named 'doctrine' doctrine creating databases doctrine Successfully created database for connection named 'doctrine' doctrine generating model classes autoload Reloading autoloaders file- /var/www/buscador/cache/backend/dev/config/config_autoload.yml.php doctrine generating form classes tokens/var/www/buscador/lib/form/BaseForm.class.php tokens /var/www/buscador/lib/form/doctrine/ProjectDataForm.class.php tokens /var/www/buscador/lib/form/doctrine/ProjectDataIndexForm.class.php tokens /var/www/buscador/lib/form/doctrine/base/BaseProjectDataForm.class.php tokens /var/www/buscador/lib/form/doctrine/base/BaseProjectDataIndexForm.class.php tokens /var/www/buscador/lib/form/doctrine/BaseFormDoctrine.class.php autoload Reloading autoloaders file- /var/www/buscador/cache/backend/dev/config/config_autoload.yml.php doctrine generating filter form classes tokens /var/www/buscador/lib/filter/doctrine/base/BaseProjectDataFormFilter.class.php tokens /var/www/buscador/lib/filter/doctrine/base/BaseProjectDataIndexFormFilter.class.php tokens /var/www/buscador/lib/filter/doctrine/ProjectDataIndexFormFilter.class.php tokens /var/www/buscador/lib/filter/doctrine/ProjectDataFormFilter.class.php tokens /var/www/buscador/lib/filter/doctrine/BaseFormFilterDoctrine.class.php autoload Reloading autoloaders file- /var/www/buscador/cache/backend/dev/config/config_autoload.yml.php doctrine generating sql for models doctrine Generated SQL successfully for models doctrine created tables successfully SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' keyword VARCHAR(200), field VARCHAR(50), position BIGINT, PRIMARY KEY(id, keywo' at line 1. Failing Query: CREATE TABLE project_data_index (id , keyword VARCHAR(200), field VARCHAR(50), position BIGINT, PRIMARY KEY(id, keyword, field, position)) ENGINE = INNODB What's wrong here? I'm using Symfony 1.3ALPHA1 -- Cheers ReynierPM --~--~-~--~~~---~--~~ 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: Component- Templating
Fabien Potencier wrote: Simone Fumagalli wrote: The templating component will be used in Symfony 2 for the view. It's not used by symfony 1. So ... I can't use with Symfony 1.2.8 unless I follow this guide: http://components.symfony-project.org/templating/trunk/book/01-Templating-In-Five-Minutes or you, Fabien, don't recommend to use it in SF 1.2.x projects? Today I started a new project and I want to use Symfony Template Component for theming options. Cheers --~--~-~--~~~---~--~~ 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] Problems getting no_script_name to work
Hi every: I have installed a Virtual Machine (VM) with Ubuntu Server 9.04. In this VM I have some sites in developing state. I have configured Apache to show this sites trougth Virtual Hosts (VH). I'm working with Windows right now (some software requirements). My VH is this one: VirtualHost *:80 ServerName sfwebacula ServerAlias sfwebacula.ubuntudev DocumentRoot /var/www/sfwebacula/web Directory / Options FollowSymLinks AllowOverride None /Directory Directory /var/www/sfwebacula/web Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all /Directory Alias /sf /usr/share/symfony/data/web/sf Directory /usr/share/symfony/data/web/sf AllowOverride All Allow from All /Directory ErrorLog /var/log/apache2/sfwebacula-error.log LogLevel warn CustomLog /var/log/apache2/sfwebacula-access.log combined /VirtualHost In the file /etc/hosts I have this: 192.168.5.250 sfwebacula.ubuntudev In my c:\WINDOWS\system32\drivers\etc\hosts I have this line too: 192.168.5.250 sfwebacula.ubuntudev The .htaccess file under /web directory is this: Options +FollowSymLinks +ExecCGI IfModule mod_rewrite.c RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work # RewriteBase / # we skip all files with .something #RewriteCond %{REQUEST_URI} \..+$ #RewriteCond %{REQUEST_URI} !\.html$ #RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ index.php [QSA,L] /IfModule I have the mod_rewrite and mod_vhost_alias enabled. When I call a page without index.php I get 404 Error: Not Found The requested URL /director was not found on this server. Apache/2.2.11 (Ubuntu) DAV/2 SVN/1.5.4 Phusion_Passenger/2.2.5 PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch Server at sfwebacula.ubuntudev Port 80 I try removing comments for line RewriteBase in .htaccess and nothing get the same error. Can any help me? Cheers and thanks in advance -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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: Problems getting no_script_name to work
Eno wrote: Does it work when you explicitly specify index.phpi in your url? Yes it's, it works if I write the URL as http://sfwebacula.ubuntudev/index.php/pool/overview What is no_script_name set to in your settings.yml? prod: .settings: no_script_name: on logging_enabled:off -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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: Problems getting no_script_name to work
Tugdual SAUNIER wrote: Le 10/09/09 17:37, Reynier Pérez Mira a écrit : Replace AllowOverride None by AllowOverride All because with AllowOverride None your .htaccess will not work. Rgds, Thanks a lot, it works perfectly now. Cheers -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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: Newsletter plugin?
Lambert wrote: Hello, Is there a symfony newsletter plugin (no, I cannot find it...), has someone developed it or is someone interested in co-developing one for publication? I could help you, just let me know what you need and what is my part here Cheers -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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] Working with filters
Hi every: I have the following schema.yml file: AreaTematica: tableName: area_tematica actAs: [Timestampable] columns: id: type: integer(4) primary: true autoincrement: true nombre: type: string(35) notnull: true Cursos: tableName: cursos actAs: [Timestampable] columns: id: type: integer(4) primary: true autoincrement: true id_area_tematica: type: integer(4) nombre: type: string(50) notnull: true relations: AreaTematica: local: id_area_tematica foreign: id foreignAlias: AreaTematica foreignType: one onDelete: restrict onUpdate: cascade Estudiantes: tableName: estudiantes actAs: [Timestampable] columns: id: type: integer(4) primary: true autoincrement: true ci: type: string(11) notnull: true id_area_tematica: type: integer(4) nombre: type: string(35) notnull: true ano_escolar: type: string(10) notnull: true usuario: type: string(35) notnull: true relations: AreaTematica: local: id_area_tematica foreign: id foreignAlias: AreaTematica foreignType: one onDelete: restrict onUpdate: cascade Profesores: tableName: profesores actAs: [Timestampable] columns: id: type: integer(4) primary: true autoincrement: true ci: type: string(11) notnull: true nombre: type: string(35) notnull: true categoria: type: string(35) notnull: true RelacionEstudiantesCursos: tableName: estudiantes_cursos columns: ci_estudiante: type: integer(4) id_curso: type: integer(4) ci_profesor: type: integer(4) nota: type: integer(4) estado: type: string(35) fecha: type: timestamp relations: Estudiantes: local: ci_estudiante foreign: id foreignAlias: Estudiantes foreignType: one onDelete: restrict onUpdate: cascade Cursos: local: id_curso foreign: id foreignAlias: Cursos foreignType: one onDelete: restrict onUpdate: cascade Profesores: local: ci_profesor foreign: id foreignAlias: Profesores foreignType: one onDelete: restrict onUpdate: cascade I'm using Doctrine and Symfony 1.2.8. I generated somethings in this order: - model (symfony doctrine:build-model) - forms (symfony doctrine:build-forms) - filters(symfony doctrine:build-filters) - admin module for every class(symfony doctrine:generate-admin backend %model%) Now I want filter by group in RelacionEstudiantesCursos (relacion_estudiantes_cursos) admin module. Knows any how to do this? Any tutorial or doc for how to work with filters? Cheers and thanks -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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: problem with the task symfony-propel-build-schema
josesilva wrote: I have not enabled. I use pgsql Then you have to enable pdo_pgsql try this and tell us Cheers -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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] Accessing ROOT_DIR from actions
Hi every: It's possible access to SF_ROOT_DIR value from a actions wich not extends from sfProjectConfiguration? I try using sfProjectConfiguration::getRootDir() directly and I get this error: Strict Standards: Non-static method sfProjectConfiguration::getRootDir() should not be called statically, assuming $this from incompatible context in D:\Server\www\sfwebacula\plugins\sfControlPanelPlugin\modules\sfControlPanel\actions\actions.class.php on line 131 -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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: SOT: Help with Doctrine query
Bertrand Zuchuat wrote: Hello, Check your model name. Relation is -leftJoin('aliasRoot.ModelName aliasModelName) Best regards Thanks again Bertrand. I build the relations and now it works fine. I just have a last question: How I can show the results in templates? Any tutorial? Cheers -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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] Problems with sfDoctrinePager
Hi every: I'm trying to paginate. For this in my model I do that: Job.class.php -- class Job extends BaseJob { static public function obtenerUltimosTrabajos($current = 1, $limit) { $last1day = date('Y-m-d H:i:s', time() - 86400); $pager = new Doctrine_Pager( Doctrine_Query::create() -select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*') -from('Job j') -leftJoin('j.Status s') -leftJoin('j.Client c') -leftJoin('j.Pool p') -leftJoin('j.Fileset f') -where(j.endtime ?, $last1day) -addWhere(j.jobstatus IN ('T', 'E', 'e', 'f', 'A')) -orderBy('j.starttime, j.jobid') -addGroupBy('j.jobid, j.job, j.name, j.type, j.level, j.clientid, j.jobstatus, j.jobtdate, j.volsessionid, j.volsessiontime, j.jobfiles, j.jobbytes, j.readbytes, j.joberrors, j.jobmissingfiles, j.poolid, j.filesetid, j.purgedfiles, j.hasbase, j.priorjobid, j.schedtime, j.realendtime, s.jobstatus, s.jobstatuslong, c.clientid, c.name, p.poolid, p.name, f.filesetid, f.fileset, f.md5, f.createtime, j.starttime, j.endtime'), $current, $limit); return $pager-execute(); } } Then in my controller: actions.class.php - public function executeIndex(sfWebRequest $request) { $limit = sfConfig::get('app_job_per_page'); $this-results = Job::obtenerUltimosTrabajos('', $limit); } Where app_job_per_page takes 10 as value (seted up in app.yml). When I execute the method I get always 25 (by default) records, why? In this scenario how I can paginate using DoctrinePager methods like getFirstPage(), getLastPage() and some others? I try directly from $results var but this show me an error because $results contains a Doctrine Collection. Regards, -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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: SOT: Help with Doctrine query
Bertrand Zuchuat wrote: Use addWhere on your query for second and next. Thanks for your reply Bertrand. I change the query as you suggested and see the result: $q = Doctrine_Query::create() -select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*') -from('Job j, Status s, Client c, Pool p, Fileset f') -where('j.jobstatus = s.jobstatus') -addWhere('j.clientid = c.clientid') -addWhere('j.poolid = p.poolid') -addWhere('j.filesetid = f.filesetid') -addWhere(j.endtime ?, $last1day) -addWhere(j.jobstatus IN ('T', 'E', 'e', 'f', 'A')) -orderBy('j.starttime, j.jobid'); When I try to execute I get this error: 500 | Internal Server Error | Doctrine_Hydrator_Exception Status with an alias of s in your query does not reference the parent component it is related to. Why? What's wrong? Regards --~--~-~--~~~---~--~~ 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: SOT: Help with Doctrine query
Bertrand Zuchuat wrote: Hello, Check with this: $q = Doctrine_Query::create() -select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*') -from('Job j') -leftJoin('j.Status s') -leftJoin('j.Client c') -leftJoin('j.Pool p') -leftJoin('j.Fileset f') -where(j.endtime ?, $last1day) -addWhere(j.jobstatus IN ('T', 'E', 'e', 'f', 'A')) -orderBy('j.starttime, j.jobid') Bertrand Nothing, I get this error insted: 500 | Internal Server Error | Doctrine_Table_Exception Unknown relation alias Status Cheers -- Ing. Reynier Pérez Mira --~--~-~--~~~---~--~~ 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] SOT: Help with Doctrine query
Hi every: I'm newbie using Doctrine and also DQL I only know basic SQL and a bit of Propel. I need to create a complex query with REST operation and also with some Joins. I read the Doctrine documentation but I can't build the query as the doc suggest. I do this: $last1day = date('Y-m-d H:i:s', time() - 86400); $q = Doctrine_Query::create() -from('Job j') -leftJoin('s.jobstatus s') -where(j.endtime ?, $last1day) -where(j.jobstatus IN ('T', 'E', 'e', 'f', 'A')) -orderBy('j.starttime, j.jobid'); But when I try to execute the query I get this error: 500 | Internal Server Error | Doctrine_Table_Exception Unknown relation alias jobstatus Can any help me? Also how I can use this: 'DurationTime' = '(EndTime - StartTime)' inside the same query as a new calculated value? PS: I know this question not belong to here but I suscribe to doctrine-users list and didn't receive confirmation. Regards --~--~-~--~~~---~--~~ 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: SOT: Help with Doctrine query
Reynier Pérez Mira wrote: Hi every: I'm newbie using Doctrine and also DQL I only know basic SQL and a bit of Propel. I need to create a complex query with REST operation and also with some Joins. I read the Doctrine documentation but I can't build the query as the doc suggest. I do this: $last1day = date('Y-m-d H:i:s', time() - 86400); $q = Doctrine_Query::create() -from('Job j') -leftJoin('s.jobstatus s') -where(j.endtime ?, $last1day) -where(j.jobstatus IN ('T', 'E', 'e', 'f', 'A')) -orderBy('j.starttime, j.jobid'); But when I try to execute the query I get this error: 500 | Internal Server Error | Doctrine_Table_Exception Unknown relation alias jobstatus Can any help me? Also how I can use this: 'DurationTime' = '(EndTime - StartTime)' inside the same query as a new calculated value? Reading a little more I found the problem: the tables has not relations (software restriction) so the leftJoin can't be used because Doctrine doesn't know the relationship between this two tables. Exists another way to do this without JOIN? --~--~-~--~~~---~--~~ 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] Problems with i18n
Hi every: I'm developing a web application and I need to show the content for now in this 4 languages: English, Spanish, French y Detusch. I read slowly the chapter 19 from Jobeet book. I created the component, the template and the action. Additionally I created 3 files: * Deutsch: messages.de_DE.xml * Spanish: messages.es_ES.xml * French: messages.fr_FR.xml By default all the messages are in English. When I execute the method the culture change because I check in the template using $sf_user-getCulture() but the data doesn't change. ¿What I'm doing wrong? Cheers and 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-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 -~--~~~~--~~--~--~---