[symfony-users] Why this action from a custom form doesn't take values ...
Hi every: I have this two methods in my class: public function executeFiltrarPorApartamentoForm(sfWebRequest $request) { $this-form = new TbPorApartamentoForm(); $this-setTemplate('porApartamento'); } public function executeFiltrarPorApartamento(sfWebRequest $request) { echo 'Entering'; die ($request-getParameter('id_apartamento')); $pager = new sfPropelPager('TbReservacion', sfConfig::get('app_cantidad_reservaciones_por_pagina')); $pager-setCriteria(TbReservacionPeer::VisitantesPorApto($request-getParameter('id_apartamento'))); $pager-setPage($request-getParameter('page'), 1); $pager-init(); $this-reservaciones = $pager; $this-setTemplate('porApartamentoListar'); } And the 'porApartamento' template have this code: form action=?php echo url_for('@visitantes_por_apartamento_execute') ? method=post class=formulario_login fieldset legend?php echo __('filtrar') ?/legend ul li?php echo __($form['id_apartamento']-renderLabel()), $form['id_apartamento'] ?/li /ul pinput type=submit value=?php echo __('go') ? size=20 //p /fieldset /form The route definition for @ visitantes_por_apartamento_execute is as follow: visitantes_por_apartamento_execute: url: /reservacion/filtrar/por_apartamento/execute param: { module: reservacion, action: FiltrarPorApartamento } Why when I send the form the value 'id_apartamento' is always empty? What's wrong here? 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] How to build my own filters
Hi every: I need filter some data and for that nothing better than the filters generated using symfony propel:build-filters or even better using admin-generator filters but I need a special filter for a given role based on user permissions. Does anybody know how to do this? I was thinking and maybe I could use a different generator.yml but when I use sfYaml::loader('generator_role1.yml') wich is inside /apps/backend/reservacion/config and contain this piece of configuration: filter: display: [desayuno, almuerzo, comida] If I could do this then I'll be able to setup the filters based on permissions or roles but this approach doesn't work. If any have a better solution I'll be gracefully if it/she share the solution. 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: Why the form isn't saved?
Let me see your current used code please. Maybe there is still a mistake in binding request values to your form. Hi Frank: I didn't reply to you until now because I get the other form working but now I'm running a similar problem, thx for the help also. I try to override the Signin() method and in some part of the code I have this: if ($request-isMethod('post')) { $this-form-bind($request-getParameter('signin')); if ($this-form-isValid()) { $values = $this-form-getValues(); var_dump($values); exit(); try { if ($user-doLogin($values['username'], $values['password'])) { die('Entro'); $this-redirect('@homepage'); } else { $this-setFlash('exception', El usuario no existe o la contrasentilde;a no es vaacute;lida., 0); } } catch (Exception $exception) { $this-setFlash('exception', strip_tags($exception-getMessage()), 0); } //$this-getUser()-signin($values['user'], array_key_exists('remember', $values) ? $values['remember'] : false); $signinUrl = sfConfig::get('app_sf_guard_plugin_success_signin_url', $user-getReferer('@homepage')); return $this-redirect($signinUrl); } else { echo 'Form not valid'; } } What's happening here: 1) If I login using a existent user, I mean inserted before in the sf_guard_user table, the form is valid and all is happy. 2) If I login using a no existent user, I mean over LDAP, the form isn't valid and all is ugly. Why? Any help on this? 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: Why the form isn't saved?
When you do not have overwritten the sfGuardFormSignin then your logic fails due to the post validator of this form. Look in sfGuardValidatorUser and it should open your eyes. This validator fetches an existing user from the database and returns the cleaned data, when no user could be found, then nothing is returned and your form is not valid. Well you're right but still without work. I make a modification to the code into sfGuardValidatorUser.class.php in this method: protected function doClean($values) { $username = isset($values[$this-getOption('username_field')]) ? $values[$this-getOption('username_field')] : ''; $password = isset($values[$this-getOption('password_field')]) ? $values[$this-getOption('password_field')] : ''; $remember = isset($values[$this-getOption('rememeber_checkbox')]) ? $values[$this-getOption('rememeber_checkbox')] : ''; if (sfConfig::get('login') != 'ldap') { // user exists? if ($user = sfGuardUserPeer::retrieveByUsername($username)) { // password is ok? if ($user-checkPassword($password)) { return array_merge($values, array('user' = $user)); } } } if ($this-getOption('throw_global_error')) { throw new sfValidatorError($this, 'invalid'); } throw new sfValidatorErrorSchema($this, array($this-getOption('username_field') = new sfValidatorError($this, 'invalid'))); } But the form is invalid again, why? 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: Adding a field to sfGuard Signin
As to your second question, I've integrated LDAP with sfGuard in the past. First off, I used adLDAP (http://adldap.sourceforge.net/ documentation.php) to connect to the LDAP server. Then I created my own class (myLDAP) with a static method for checking a username and password against the AD server I was hooking into. It returns true if the username/password combo exists and false if it doesn't. Finally, in app.yml, I configured sfGuard to use my custom static method to check the password of users: sf_guard_plugin: check_password_callable: [myLDAP, checkPassword] All user, group and permission management is still handled locally by the sfGuard backend modules. It simply calls out to LDAP to check the password. Hi Alex: First of all thx for your reply but this doesn't work for me. I will comment every step I follow to get it working but without success. 1) Download adLDAP.class.php and save in /apps/frontend/lib folder 2) Create my own class extending from sfGuardSecurity: class LDAP extends sfGuardSecurityUser { public static function checkUserOverLDAP($username, $password) { $options = array('account_suffix'='@uci.cu','base_dn'='DC=uci,DC=cu','domain_controllers'=array('10.0.0.3')); $ldap = new adLDAP($options); $authenticated = $ldap-authenticate($username, $password); if ($authenticated) { return true; } else { return false; } } } 3) Add this values to /apps/frontend/app.yml: sf_guard_plugin: check_password_callable: [LDAP, checkUserOverLDAP] 4) Clear the cache: symfony cc When I test if the username and password bind to LDAP server nothing happened always the method signin() is called but something is wrong inside because it doesn't work. I'm forgetting something? PS: I check the LDAP using the class outside Symfony and all it's fine because it works. 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: Error while trying to extend from sfGuard
This is your function signature: public function executeSignin(sfWebRequest $request) This is the originl from BasesfGuardAuthActions: public function executeSignin($request) They should be the same. Thanks now it works. 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] Adding a field to sfGuard Signin
Hi every: Because I have a big problems while trying to integrate sfGuard and LDAP I will extend the Signin() method and add my own logic. What I'm want to do is this: 1. Add a sfWidgetFormSelect to make a choice between LDAP and Local. Something like that: class sfGuardFormSignin extends sfForm { protected static $opciones = array(ldap=LDAP, local=Local); public function configure() { $this-setWidgets(array( 'username' = new sfWidgetFormInput(), 'password' = new sfWidgetFormInput(array('type' = 'password')), 'type' = new sfWidgetFormSelect(array('choices'=self::$opciones)), 'remember' = new sfWidgetFormInputCheckbox(), )); $this-setValidators(array( 'username' = new sfValidatorString(), 'password' = new sfValidatorString(), 'remember' = new sfValidatorBoolean(), )); $this-validatorSchema-setPostValidator(new sfGuardValidatorUser()); $this-widgetSchema-setNameFormat('signin[%s]'); } } 2. If the user pick LDAP, then the function could be authenticate the user over LDAP server and if the user exists and the credentials are correct add this user to the sf_guard_user table in the DB 3. Otherwise if the user pick Local the function need to authenticate over the DB only and not LDAP. Now for do this I have a lot of questions: 1. As you can see in the code above I implemented the 'type' field in the plugin code, I mean in the core, then if I want to update the plugin I need to rewrite over and over the same code every time I do this ¿how I can avoid this? ¿what yours suggest me? 2. Can any guide me in how to build the function for Signin()? I mean any example of this logic. Cheers and thanks in advance PS: If any make LDAP and sfGuard plugin get working and can use sfGuard groups and permissions facilities I'll be grateful for every help. 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] Error while trying to extend from sfGuard
Hi every: I try to build my own logic with sfGuard for LDAP authentication because the code in the Wiki doesn't work for me. I'm based on this two posts from Sensio Labs: http://www.symfonylab.com/extra-questions-and-solutions-for-sfguardplugin/ http://www.symfonylab.com/extending-sfguardplugin-part-2/ My code look like this: ?php require_once(dirname(__FILE__).'/../../../../../plugins/sfGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php'); class sfGuardAuthActions extends BasesfGuardAuthActions { public function executeSignin(sfWebRequest $request) { if ($request-getParameter('type') == 'ldap') { echo 'Logging over domain UCI.CU'; } else if ($request-getParameter('type') == 'local') { $user = $this-getUser(); if ($user-isAuthenticated()) { return $this-redirect('@homepage'); } $class = sfConfig::get('app_sf_guard_plugin_signin_form', 'sfGuardFormSignin'); $this-form = new $class(); if ($request-isMethod('post')) { $this-form-bind($request-getParameter('signin')); if ($this-form-isValid()) { $values = $this-form-getValues(); $this-getUser()-signin($values['user'], array_key_exists('remember', $values) ? $values['remember'] : false); $signinUrl = sfConfig::get('app_sf_guard_plugin_success_signin_url', $user-getReferer('@homepage')); return $this-redirect($signinUrl); } } else { if ($request-isXmlHttpRequest()) { $this-getResponse()-setHeaderOnly(true); $this-getResponse()-setStatusCode(401); return sfView::NONE; } $user-setReferer($this-getContext()-getActionStack()-getSize() 1 ? $request-getUri() : $request-getReferer()); $module = sfConfig::get('sf_login_module'); if ($this-getModuleName() != $module) { return $this-redirect($module.'/'.sfConfig::get('sf_login_action')); } $this-getResponse()-setStatusCode(401); } } } } ? But when I try to execute I get this error: Strict standards: Declaration of sfGuardAuthActions::executeSignin() should be compatible with that of BasesfGuardAuthActions::executeSignin() in D:\Server\www\residencia\apps\frontend\modules\sfGuardAuth\actions\actions.class.php on line 11 Why? 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] OT: Help with Query in Doctrine
Hi every: I started to use Doctrine today and it's amazing but I have some problems. Can any help me to build this query: select sum(JobBytes),count(*) from Job where Endtime = NOW() and UNIX_TIMESTAMP(EndTime) UNIX_TIMESTAMP(NOW())-86400 I try this: $last24bytes = Doctrine_Query::create()- from('Job j')- select('sum(j.JobBytes)')- where('j.Endtime = now()'); But this doesn't work. Can any help me? Cheers and thx in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Help with link cross applications
Hi every: I read this great article[1] wrote by Fabien and try to create a link between frontend and backend applications. For that I modified some parts of the original code from Fabien and now looks like this: class frontendConfiguration extends sfApplicationConfiguration { protected $backendRouting = null; public function configure() { $this-getActive()-loadHelpers(array('Form','I18N','Javascript','Date','Url','Tag','Asset','Partial')); } public function generateBackendURL($name, $parameters = array()) { return sfConfig::get('app_aplication_url').$this-getBackendRouting()-generate($name, $parameters); } public function getBackendRouting() { if (!$this-backendRouting) { $this-backendRouting = new sfPatternRouting(new sfEventDispatcher()); $config = new sfRoutingConfigHandler(); $routes = $config-evaluate(array(sfConfig::get('sf_apps_dir').'/backend/config/routing.yml')); $this-backendRouting-setRoutes($routes); } return $this-backendRouting; } } Also I create a Helper called LinkCrossApplicationHelper.php and put it inside /frontend/module/lib directory. The helper contains this piece of code: function link_to_backend($name, $parameters) { return sfProjectConfiguration::getActive()-generateBackendURL($name, $parameters); } Then in my template I call the helper method: ?php link_to_backend('hello', array('name' = 'Bar')) ? But I get this error: 500 | Internal Server Error | InvalidArgumentException Unable to load LinkCrossApplicationHelper.php helper in: D:\Server\www\residencia\apps\frontend\modules/reservacion/lib/helper, D:\Server\www\residencia\apps\frontend\lib/helper, D:\Server\www\residencia\lib/helper, D:/Server/SF/lib/plugins/sfProtoculousPlugin/lib/helper, D:/Server/www/residencia/plugins/sfPagerNavigationPlugin/lib/helper, D:\Server\SF\lib/helper, D:\Server\SF\lib\plugins\sfPropelPlugin\lib\vendor, D:\Server\www\residencia, D:\Server\SF\lib, ., C:\php5\pear. Can any help me at this point? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Help with link cross applications
Bring it up a folder to the /frontend/lib directory Nothing it doesn't work Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Help with link cross applications
Ok - I thought it would pick it up from there - otherwise put it into apps/myapp/lib/helper/ Thx, now it works but show me another error: 500 | Internal Server Error | sfConfigurationException The route reservacion/new does not exist. This route exists in /apps/backend/config/routing.yml so what is the problem? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony Virtual Machine
Sure. I'm working on a first run script and I'll include it. Ok, waiting then. Also where I can download the ISO image or .tar.gz or whatever? I can't find it in the site you provide and also my FF doesn't work fine with this site (maybe some add-on is crashing the FF) Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony 1.2 and Doctrine 1.1 problem
Hi every: I want to start with Doctrine ORM and nothing better for that than Jobeet for Doctrine. Because JW release the Doctrine 1.1 I update the libraries at D:\Server\SF\lib\plugins\sfDoctrinePlugin\lib\. Then following the Jobeet Book I try to empty the cache: symfony cc but I get this error: D:\Server\www\res_doctrinesymfony cc cache Clearing cache type all for backend app and cli env Unable to load JavascriptHelper.php helper in: D:\Server\www\res_doctrine\apps\backend\lib/helper, D:\Server\www\res_doctrine\lib/helper, D:/Server/SF/lib/plugins/sfDoctrinePlugin/lib/helper, D:\Server\SF\lib/helper, ., C:\php5\pear. Can any say me why this? I check and all seems to be OK Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony Virtual Machine
Could you include PostgreSQL also? I live in Cuba and because blocking from US I can't download nothing related to MySQL Ing. Reynier Pérez Mira Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On Behalf Of David Ashwood Sent: Wednesday, May 20, 2009 12:55 PM To: symfony-users@googlegroups.com Subject: [symfony-users] Symfony Virtual Machine Wotcha Guys and Gals, I've just launched a site which allows you to download a Virtual Machine setup and ready to run against Symfony and Zend. It's based on Ubuntu Server x86, comes with the latest versions of Apache, MySQL, subversion, PHP Zend - and includes Symfony 1.0, 1.1, 1.2 and 1.3 (via svn so it's a snitch to refresh). It has the current versions of Pear Pecl - so installing plugins shouldn't be a problem. It comes with the Zend Server (community edition) integrated - so you can remotely manage your environment via a web browser. It's deployed via OVF - so just download, extract and import into your favourite Virtual Machine Client - otherwise I'd suggest installing the VirtualBox Client (http://www.virtualbox.org/) which works under Windows and *nix. The VM Images and complete info can be found at: http://sipx.ws and the Issues tracking is at http://project.inspiredthinking.co.uk/projects/show/symfony-vm With this type of approach you can develop and test against an environment in a repeatable fashion. By using the snapshot/rollback features found in many VM Clients - you can roll back an environment quickly and easily - allowing you to see deploy/test changes outside of your production environment. --~--~-~--~~~---~--~~ 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: Why the form isn't saved?
Your form is invalid, because your bind call is not correct. A missing array_merge call is missing there. Try this one: You're right. I do the things as you suggested me and the form fail. What you mean with array_merge call is missing? Can you help me there? Also none error is displayed even if I use the $form-renderGlobalErrors() method in my template, why this? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Why the form isn't saved?
Hi every: I have a form which code is this one (soury for be to long): ?php use_stylesheet('form.css') ? ?php include_javascripts_for_form($form) ? ?php if ($form-hasGlobalErrors()): ? div id=msg_error?php echo $form-renderGlobalErrors() ?/div ?php endif; ? ?php echo form_tag('@reservacion_create', array('class'='formulario_nuevo_editar')) ? ?php echo $form['id_profesor'] ? fieldset class=datos legend?php echo __('datos_profesor') ?/legend ul li?php echo $form['nombre_profesor']-renderLabel(), $form['nombre_profesor'] ?/li li?php echo $form['id_apartamento']-renderLabel(), $form['id_apartamento'] ?/li /ul /fieldset fieldset class=datos legend?php echo __('datos_visitante') ?/legend ul li?php echo $form['carne_identidad']-renderLabel(), $form['carne_identidad'] ?/li li?php echo $form['nombre_visitante']-renderLabel(), $form['nombre_visitante'] ?/li li?php echo $form['id_parentezco']-renderLabel(), $form['id_parentezco'] ?/li li?php echo $form['sexo']-renderLabel(), $form['sexo'] ?/li /ul /fieldset fieldset class=datos legend?php echo __('datos_reservacion') ?/legend ul ?php if($sf_context-getActionName() == NewSpecial): ? li?php echo $form['motivo_reservacion']-renderLabel(), $form['motivo_reservacion'] ?/li ?php endif; ? li?php echo $form['desayuno']-renderLabel(), $form['desayuno'] ?/li li?php echo $form['almuerzo']-renderLabel(), $form['almuerzo'] ?/li li?php echo $form['comida']-renderLabel(), $form['comida'] ?/li ?php if ($sf_user-hasCredential('administrador')): ? li?php echo $form['estado_reservacion']-renderLabel(), $form['estado_reservacion'] ?/li ?php endif; ? li?php echo $form['id_complejo_comedor']-renderLabel(), $form['id_complejo_comedor'] ?/li li?php echo $form['fecha_entrada']-renderLabel(), $form['fecha_entrada'] ?/li li?php echo $form['fecha_salida']-renderLabel(), $form['fecha_salida'] ?/li /ul /fieldset pinput type=submit value=?php echo __('salvar') ? //p /form div class=links_bar_left ?php echo link_to(__('cancelar'), '@reservacion') ? ?php if (!$form-getObject()-isNew()): ? | ?php echo link_to(__('eliminar'), '@eliminar_reservacion?id='.$form-getObject()-getIdReservacion(), array('method'='delete','confirm'=__('alerta_eliminar'))) ? ?php endif; ? /div The module was generated using the task: symfony propel:generate-module. Then in the actions.class.php I have this code: public function executeNew(sfWebRequest $request) { $this-form = new TbReservacionForm(); } protected function processForm(sfWebRequest $request, sfForm $form) { $form-bind($request-getParameter($form-getName()), $request-getFiles($form-getName())); if ($form-isValid()) { $tb_reservacion = $form-save(); $this-redirect('reservacion/edit?id_reservacion='.$tb_reservacion-getIdReservacion()); } } When I try to insert the data nothing happen and I don't know why because none error appears. Any help or tip? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Why this behaviour
Where did you put this code? I mean in which method in the class? Wich code? This one? $context = sfContext::getInstance(); $user = $context-getUser(); if (!$user-hasCredential('administrador')) { unset($this['estado_reservacion']); } In the config() from TbReservacionForm.class.php Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Why this behaviour
Can you paste trace of the error? Sure ... # at () in SF_SYMFONY_LIB_DIR\form\sfForm.class.php line 956 ... 953. { 954. if (!$widget = $this-widgetSchema[$name]) 955. { 956. throw new InvalidArgumentException(sprintf('Widget %s does not exist.', $name)); 957. } 958. 959. if ($this-isBound) # at sfForm-offsetGet('estado_reservacion') in SF_ROOT_DIR\apps\frontend\modules\reservacion\templates\_form.php line 33 ... 30. li?php echo $form['desayuno']-renderLabel(), $form['desayuno'] ?/li 31. li?php echo $form['almuerzo']-renderLabel(), $form['almuerzo'] ?/li 32. li?php echo $form['comida']-renderLabel(), $form['comida'] ?/li 33. li?php echo $form['estado_reservacion']-renderLabel(), $form['estado_reservacion'] ?/li 34. li?php echo $form['id_complejo_comedor']-renderLabel(), $form['id_complejo_comedor'] ?/li 35. li?php echo $form['fecha_entrada']-renderLabel(), $form['fecha_entrada'] ?/li 36. li?php echo $form['fecha_salida']-renderLabel(), $form['fecha_salida'] ?/li # at require('D:\Server\www\residencia\apps\frontend\modules\reservacion\templates\_form.php') in SF_SYMFONY_LIB_DIR\view\sfPHPView.class.php line 77 ... 74. // render 75. ob_start(); 76. ob_implicit_flush(0); 77. require($_sfFile); 78. 79. return ob_get_clean(); 80. } # at sfPHPView-renderFile('D:\Server\www\residencia\apps\frontend\modules/reservacion/templates/_form.php') in SF_SYMFONY_LIB_DIR\view\sfPartialView.class.php line 110 ... 107. $this-getAttributeHolder()-set('sf_type', 'partial'); 108. 109. // render template 110. $retval = $this-renderFile($this-getDirectory().'/'.$this-getTemplate()); 111. } 112. catch (Exception $e) 113. { # at sfPartialView-render() in SF_SYMFONY_LIB_DIR\helper\PartialHelper.php line 218 ... 215. $view = new $class($context, $moduleName, $actionName, ''); 216. $view-setPartialVars($vars); 217. 218. return $view-render(); 219. } 220. 221. /** # at get_partial('form', array(object('TbReservacionForm'))) in SF_SYMFONY_LIB_DIR\helper\PartialHelper.php line 180 ... 177. */ 178. function include_partial($templateName, $vars = array()) 179. { 180. echo get_partial($templateName, $vars); 181. } 182. 183. /** # at include_partial('form', array(object('TbReservacionForm'))) in SF_ROOT_DIR\apps\frontend\modules\reservacion\templates\newSuccess.php line 15 ... 12. br/ 13. ?php endif; ? 14. ?php //if ($mostrar = true): ? 15. ?php include_partial('form', array('form'=$form)) ? 16. ?php //endif; ? # at require('D:\Server\www\residencia\apps\frontend\modules\reservacion\templates\newSuccess.php') in SF_SYMFONY_LIB_DIR\view\sfPHPView.class.php line 77 ... 74. // render 75. ob_start(); 76. ob_implicit_flush(0); 77. require($_sfFile); 78. 79. return ob_get_clean(); 80. } # at sfPHPView-renderFile('D:\Server\www\residencia\apps\frontend\modules/reservacion/templates/NewSuccess.php') in SF_SYMFONY_LIB_DIR\view\sfPHPView.class.php line 174 ... 171. $this-attributeHolder-set('sf_type', 'action'); 172. 173. // render template file 174. $content = $this-renderFile($this-getDirectory().'/'.$this-getTemplate()); 175. 176. if (sfConfig::get('sf_cache') !is_null($uri)) 177. { # at sfPHPView-render() in SF_SYMFONY_LIB_DIR\filter\sfExecutionFilter.class.php line 153 ... 150. break; 151. 152. case sfView::RENDER_CLIENT: 153. $viewData = $view-render(); 154. $this-context-getResponse()-setContent($viewData); 155. break; 156. # at sfExecutionFilter-executeView('reservacion', 'New', 'Success', array(object('TbReservacionForm'))) in SF_SYMFONY_LIB_DIR\filter\sfExecutionFilter.class.php line 114 ... 111. return; 112. } 113. 114. $this-executeView($actionInstance-getModuleName(), $actionInstance-getActionName(), $viewName, $actionInstance-getVarHolder()-getAll()); 115. } 116. 117. /** # at sfExecutionFilter-handleView(object('sfFilterChain'), object('reservacionActions'), 'Success') in SF_SYMFONY_LIB_DIR\filter\sfExecutionFilter.class.php line 47 ... 44. $timer-addTime(); 45. $timer = sfTimerManager::getTimer(sprintf('View %s for %s/%s', $viewName, $actionInstance-getModuleName(), $actionInstance-getActionName())); 46. 47. $this-handleView($filterChain, $actionInstance,
[symfony-users] Re: Why this behaviour
In your _form.php you have the following line: li?php echo $form['estado_reservacion']- renderLabel(), $form['estado_reservacion'] ?/li It is trying to access the widget which does not exists anymore and therefore throwing the error. So I need this logic in the template? Any other way? How the admin-generator does? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 Propel while trying to insert data into PostgreSQL database
Hi every: I'm trying to insert some data into a PostgreSQL DB and I get this error: 500 | Internal Server Error | PropelException Unable to get sequence id. [wrapped: SQLSTATE[42P01]: Undefined table: 7 ERROR: no existe la relación «tb_edificio_id_eficio_seq» LINE 1: SELECT nextval('tb_edificio_id_eficio_seq')^] I do some research in Google and found this thread in Symfony Forums: http://forum.symfony-project.org/index.php/m/72358/ but this didn't solve my problem. The curious here is that I'm check the setPrimaryKeyMethodInfo into the Map class and it's correct so I don't know where is the problem: $tMap-setPrimaryKeyMethodInfo('tb_reservacion_id_reservacion_seq'); Can any help me? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Why this behaviour
Hi every: I try to hide a widget if a user (managed by sfGuard) has not administrador privileges. For that in my Form class named TbReservacionForm.class.php I do this: $context = sfContext::getInstance(); $user = $context-getUser(); if (!$user-hasCredential('administrador')) { unset($this['estado_reservacion']); } But I get this error: 500 | Internal Server Error | InvalidArgumentException Widget estado_reservacion does not exist. The funny part here is that I check the BaseTbReservacionForm class and see the code for Widgets: $this-setWidgets(array( 'id_reservacion' = new sfWidgetFormInputHidden(), 'id_profesor' = new sfWidgetFormPropelChoice(array('model' = 'sfGuardUser', 'add_empty' = false)), 'id_edificio' = new sfWidgetFormPropelChoice(array('model' = 'TbEdificio', 'add_empty' = false)), 'id_apartamento' = new sfWidgetFormPropelChoice(array('model' = 'TbApartamento', 'add_empty' = false)), 'id_complejo_comedor' = new sfWidgetFormPropelChoice(array('model' = 'TbComplejoComedor', 'add_empty' = false)), 'desayuno'= new sfWidgetFormInputCheckbox(), 'almuerzo'= new sfWidgetFormInputCheckbox(), 'comida' = new sfWidgetFormInputCheckbox(), 'estado_reservacion' = new sfWidgetFormInputCheckbox(), 'motivo_reservacion' = new sfWidgetFormTextarea(), 'fecha_entrada' = new sfWidgetFormDateTime(), 'fecha_salida'= new sfWidgetFormDateTime(), 'carne_identidad' = new sfWidgetFormInput(), 'nombre_visitante'= new sfWidgetFormInput(), 'id_parentezco' = new sfWidgetFormPropelChoice(array('model' = 'TbParentezco', 'add_empty' = false)), 'sexo'= new sfWidgetFormInput(), )); So estado_reservacion exists and really I don't know where is the problem. Can any help me to solve this? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Inserting new users into sfGuard tables
Hi every: Recently I send some emails asking how to integrate sfGuard and LDAP authentication. Now I'm asking how to save, at least, the username and password once it was authenticated over LDAP. Any help? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Inserting new users into sfGuard tables
I've done integration with ldap or similar systems before and I always integrated my model directly with the central auth server. So that anytime the model changes, the same changes are made there. You can do this by utilizing the postSave() events, etc. Can you send me an example? Just for take a look inside the code? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Syntax for embedded forms
main_form['sub_form']['field_to_show'] Best Ing. Reynier Pérez Mira Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] On Behalf Of Steve the Canuck Sent: Thursday, May 07, 2009 5:13 PM To: symfony users Subject: [symfony-users] Syntax for embedded forms I have embedded one form in another. What's the syntax for accessing the field? For example, I have ConsumerForm embedded in UserForm. The consumer has a first_name field. I've tried: first_name consumer_first_name consumer[first_name] in my templates, but none of them work. Thanks for your help. Steve --~--~-~--~~~---~--~~ 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] Help with sfGuard and LDAP external method
Hi every: I'm trying to integrate sfGuard with my LDAP. For that I add this lines to my app.yml file: /frontend/config/app.yml all: sf_guard_plugin: check_password_callable: [LDAP, checkLDAPPassword] Then I create a file called LDAP.class.php and put inside /frontend/lib directory. The method content is this: class LDAPclass extends sfGuardSecurityUser { public static function checkLDAPPassword($username, $password) { $options = array('account_suffix'='@uci.cu','base_dn'='DC=uci,DC=cu','domain_controllers'=array('10.0.0.3','10.0.0.4')); $ldap = new adLDAP($options); $authenticated = $ldap-authenticate($username, $password); if ($authenticated) { return true; } else { return false; } } } The adLDAP is another class placed also in /frontend/lib directory. When I try to execute the authentication I get this errors: Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'LDAP::checkLDAPPassword' was given in D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php on line 79 Warning: Cannot modify header information - headers already sent by (output started at D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php:79) in D:\Server\SF\lib\response\sfWebResponse.class.php on line 335 Warning: Cannot modify header information - headers already sent by (output started at D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php:79) in D:\Server\SF\lib\response\sfWebResponse.class.php on line 349 Why? What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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: Help with sfGuard and LDAP external method
Compare: check_password_callable: [LDAP, checkLDAPPassword] class LDAPclass extends sfGuardSecurityUser { in the config you say LDAP, but later you call it LDAPclass, this is why you get the following error: Thanks FASI, the error now is solved but it doesn't work with LDAP. I check frontend_dev.log file and see this: May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute sf_guard_signin (/login) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute sf_guard_signout (/logout) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute sf_guard_password (/request_password) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute nueva_reservacion (/modulos/profesores/reservacion/nueva) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute homepage (/) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute default_index (/:module) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute default (/:module/:action/*) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute sf_guard_signin (/login) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute sf_guard_signout (/logout) May 06 17:47:17 symfony [info] {sfPatternRouting} Connect sfRoute sf_guard_password (/request_password) May 06 17:47:17 symfony [info] {sfPatternRouting} Match route sf_guard_signin (/login) for /login with parameters array ( 'module' = 'sfGuardAuth', 'action' = 'signin',) May 06 17:47:17 symfony [info] {sfFilterChain} Executing filter sfRenderingFilter May 06 17:47:17 symfony [info] {sfFilterChain} Executing filter sfCommonFilter May 06 17:47:17 symfony [info] {sfFilterChain} Executing filter sfExecutionFilter May 06 17:47:17 symfony [info] {sfGuardAuthActions} Call sfGuardAuthActions-executeSignin() May 06 17:47:17 symfony [debug] {sfPropelLogger} exec: SET NAMES 'utf8' May 06 17:47:17 symfony [debug] {sfPropelLogger} prepare: SELECT sf_guard_user.ID, sf_guard_user.USERNAME, sf_guard_user.ALGORITHM, sf_guard_user.SALT, sf_guard_user.PASSWORD, sf_guard_user.CREATED_AT, sf_guard_user.LAST_LOGIN, sf_guard_user.IS_ACTIVE, sf_guard_user.IS_SUPER_ADMIN FROM sf_guard_user WHERE sf_guard_user.USERNAME=:p1 AND sf_guard_user.IS_ACTIVE=:p2 LIMIT 1 May 06 17:47:17 symfony [debug] {sfPropelLogger} Binding 'rperezm' at position :p1 w/ PDO type PDO::PARAM_STR May 06 17:47:17 symfony [debug] {sfPropelLogger} Binding true at position :p2 w/ PDO type PDO::PARAM_BOOL May 06 17:47:17 symfony [info] {sfPHPView} Render D:/Server/www/residencia/plugins/sfGuardPlugin/modules/sfGuardAuth/templates/signinSuccess.php May 06 17:47:17 symfony [info] {sfPHPView} Decorate content with D:\Server\www\residencia\apps\frontend\templates/layout.php May 06 17:47:17 symfony [info] {sfPHPView} Render D:\Server\www\residencia\apps\frontend\templates/layout.php May 06 17:47:17 symfony [info] {main} Get slot title May 06 17:47:17 symfony [info] {sfWebResponse} Send status HTTP/1.1 200 OK May 06 17:47:17 symfony [info] {sfWebResponse} Send header Content-Type: text/html; charset=utf-8 May 06 17:47:17 symfony [info] {sfWebDebugLogger} Configuration 67.73 ms (9) May 06 17:47:17 symfony [info] {sfWebDebugLogger} Action sfGuardAuth/signin 111.99 ms (1) May 06 17:47:17 symfony [info] {sfWebDebugLogger} View Success for sfGuardAuth/signin 69.17 ms (1) May 06 17:47:17 symfony [info] {sfWebResponse} Send content (113018 o) Why it doesn't call the checkLDAPPassword method as I said in the app.yml file? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 sfExtraWidgetsPlugin
Hi every: Recently I start to use this amazing plugin but I get an error when trying to work with datepicker component. The error message, provide by Firebug, is this: $ is not defined dp_display(tb_reservacion_f_entrada) datepicker.js (line 9) onclick()new (line 1) [Break on this error] if($(dp_element_id) == null) Why? Can any help me? I haven't much knowledge about JS and Prototype Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 with sfExtraWidgetsPlugin
Hi, the sfExtraWidgetsPlugin is not bundled with the jquery lib and so it is not loaded automatically. Therefore you have to define and load the according jquery and jquery ui assets. Example within PHP (but you should better define this assets in the view.yml): $response-addStyleSheet( '/js/jquery/css/smoothness/jquery- ui-1.7.1.custom.css' ); $response-addJavascript( '/js/jquery/js/jquery- ui-1.7.1.custom.min.js' ); The stylesheet is needed for the calendar layout and the js file includes the jquery and ui libs. Everything could be downloaded from the jquery page very easily. Thanks for your reply Frank but didn't solve my problem. I do the things as you suggested and see the HTML output: script type=text/javascript src=/js/jquery-1.3.2.min/script script type=text/javascript src=/sfExtraWidgetsPlugin/js/tinymce/plugins/tinybrowser/tb_tinymce.js.php/script script type=text/javascript src=/sfExtraWidgetsPlugin/js/tinymce/tiny_mce.js/script link rel=stylesheet type=text/css media=screen href=/sfPropelPlugin/css/global.css / link rel=stylesheet type=text/css media=screen href=/sfPropelPlugin/css/default.css / link rel=stylesheet type=text/css media=screen href=/css/main.css / link rel=stylesheet type=text/css media=screen href=/css/residencia.css / link rel=stylesheet type=text/css media=screen href=/css/estilos_grid.css / So I don't know how it failed. Any advice? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Can Symfony works with PHP 5.3RC1
Hi: Can Symfony work with PHP 5.3RC1 without any problems? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Validating before show up the form
Hi every: I have a n:m relationship between two tables: modlic_dvd y modlic_licencia. As every here know this kind of relation generate a new table: modlic_rel_dvd_licencia with the primary keys of the main tables. I generate the model, the filters and the forms for this three tables without problems. I want to know if exists any way to check if the modlic_dvd table has at least one file before show the form for the table modlic_licencia? Any help? Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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] Problem with Task or with PHP?
Hi every: I started a new project with Symfony 1.2 and because I have a database created I need to build the schema file. I try to run the task: symfony12 propel:buil-schema And I get this error: Failed loading /usr/lib/php5/20060613+lfs/xcache.so: /usr/lib/php5/20060613+lfs/xcache.so: cannot open shared object file: No such file or directory Task propel:buil-schema is not defined. Can any help me to solve this? Regards and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problem with Task or with PHP?
Fixed, I check the /etc/php5/cli/php.ini file but not the /etc/php5/conf.d/ directory where xcache.ini still. Cheers Ing. Reynier Pérez Mira Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:symfony- [EMAIL PROTECTED] On Behalf Of Sebastian Schulze Sent: Thursday, December 04, 2008 01:31 PM To: symfony users Subject: [symfony-users] Re: Problem with Task or with PHP? Looks like you've got xcache in your php.ini but havn't installed it yet. Either remove it from your php.ini or install the xcache extension. On Dec 4, 6:22 pm, Reynier Perez Mira [EMAIL PROTECTED] wrote: Hi every: I started a new project with Symfony 1.2 and because I have a database created I need to build the schema file. I try to run the task: symfony12 propel:buil-schema And I get this error: Failed loading /usr/lib/php5/20060613+lfs/xcache.so: /usr/lib/php5/20060613+lfs/xcache.so: cannot open shared object file: No such file or directory Task propel:buil-schema is not defined. Can any help me to solve this? Regards and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: What about the Symfony Guide ...
http://www.symfony-project.org/book/1_2/ This is outdate see by yourself the Chapter 10 Forms for example Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: What about the Symfony Guide ...
- http://www.symfony-project.org/book/forms/1_2/en/ I agree with you Fabian we can use this book (that remains incomplete yet) but this is not the only thing that changes in the new Symfony 1.2. There are a lots of things changed here for example: * Routing * Forms * Request * and much more as this article said (http://www.symfony-project.org/tutorial/1_2/whats-new) Will be nice if these things appear in a new version of the book. Also I think now that Symfony 1.2 was released as stable the developers will upgrade their applications and a lot of doubts rain in the list and if we have a book where find first then will be a help for every one. This is what I mean Regards Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Can I install Symfony 1.0.x and 1.1.x and 1.2.x in the same server
Hi every: I have this question since few days ago because I have at least 12 projects in development and not all are in the same Symfony version. So I ask here if I can have Symfony 1.0.18 and Symfony 1.1.4 and Symfony 1.2 BETA1 in the same server and how to do this? Regards Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How to work with sfGuard Plugin and sfDoctrine
Hi every: I'm trying to migrate one of my developments to sfDoctrine Plugin but I have a problem: I can not use sfGuard Plugin with sfDoctrine. I get this error when I try to access to the system: [PropelException] No connection params set for propel stack trace * at () in SF_SYMFONY_LIB_DIR\plugins\sfPropelPlugin\lib\vendor\propel\Propel.php line 476 ... 473. 474. $dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null; 475. if ($dsn === null) { 476. throw new PropelException(No connection params set for . $name); 477. } 478. 479. include_once 'creole/Creole.php'; * at Propel::getConnection('propel') in SF_ROOT_DIR\plugins\sfGuardPlugin\lib\model\om\BasesfGuardUserPeer.php line 289 ... Can any help me or teach me here? I find in the Symfony Project Plugins site but I didn't found anything. Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to work with sfGuard Plugin and sfDoctrine
You need to be using the doctrine version of the plugin, sfDoctrineGuardPlugin. Currently you can only get it from SVN. From this addres: http://svn.symfony-project.com/plugins/sfDoctrineGuardPlugin/trunk/? Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to work with sfGuard Plugin and sfDoctrine
Ok, I made a 1.1 branch checkout, copy the plugin in the plugins folder and when I try to run the task symfony cache:clear I get this error: symfony cache:clear PHP Fatal error: Cannot redeclare class sfGuardPromoteSuperAdminTask in D:\Development\WWW\gestion.local\plugins\sfGuardPlugin\lib\task\sfGuardCreateAdminTask.class.php on line 69 Why? Cheers and thanks again Ing. Reynier Pérez Mira Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Wage Sent: Monday, November 03, 2008 11:57 AM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: How to work with sfGuard Plugin and sfDoctrine Yes, if you are using symfony 1.2 A branch exists for 1.0 and 1.1 as well. - Jon On Mon, Nov 3, 2008 at 10:58 AM, Reynier Perez Mira [EMAIL PROTECTED] wrote: You need to be using the doctrine version of the plugin, sfDoctrineGuardPlugin. Currently you can only get it from SVN. From this addres: http://svn.symfony- project.com/plugins/sfDoctrineGuardPlugin/trunk/? Ing. Reynier Pérez Mira Dirección Técnica IP -- Jonathan H. Wage Open Source Software Developer Evangelist http://www.jwage.com http://www.doctrine-project.org http://www.symfony-project.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-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to work with sfGuard Plugin and sfDoctrine
PHP Fatal error: Cannot redeclare class sfGuardPromoteSuperAdminTask in D:\Development\WWW\gestion.local\plugins\sfGuardPlugin\lib\task\sfGuardCreateAd minTask.class.php on line 69 Ok, I find a solution for my last problem. I delete the old sfGuardPlugin folder and everything is fine now. Now following the README instructions I get this other error: Fatal error: Cannot redeclare class BaseComponente in D:\Development\WWW\gestion.local\lib\model\doctrine\generated\BaseComponente.class.php on line 16 D:\Development\WWW\gestion.localPHP Fatal error: Cannot redeclare class BaseComponente in D:\Development\WWW\gestion.local\lib\model\doctrine\generated\BaseComponente.class.php on line 16 Why this? Cheers Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How to work with sfGuard Plugin and sfDoctrine
Hmm. Because you have 2 classes with the same name defined :) Search your code and find out where and why. OK, I find but without success and for that I start from zero and delete every generated class. I try again using this task: D:\Development\WWW\gestion.localsymfony doctrine-build-all-reload backend doctrine Are you sure you wish to drop your databases? (y/n) doctrine Successfully dropped database f...n propel named uci_recursos doctrine Successfully created database f...n propel named uci_recursos doctrine Generated models successfully And I get another error but with sfGuardDoctrine (I think) Fatal error: Cannot redeclare class BasesfGuardGroup in D:\Development\WWW\gestion.local\lib\model\doctrine\sfDoctrineGuardPlugin\generated\BasesfGuardGroup.class.php on line 35 PHP Fatal error: Cannot redeclare class BasesfGuardGroup in D:\Development\WWW\gestion.local\lib\model\doctrine\sfDoctrineGuardPlugin\generated\BasesfGuardGroup.class.php on line 35 Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Problems with sfDoctrinePlugin
Hi every: I'm trying to migrate my projects from Propel to Doctrine. Today I did a checkout from sfDoctrinePlugin SVN and copy the code to plugins dir. When I try to clear the cache I get this error: D:\Development\WWW\gestion.localsymfony cache:clear --app=backend --env=dev cache Clearing cache type all for backend app and dev env PHP Fatal error: Class 'sfWebDebugPanel' not found in D:\Development\WWW\gestio n.local\plugins\sfDoctrinePlugin\lib\debug\sfWebDebugPanelDoctrine.class.php on line 21 Fatal error: Class 'sfWebDebugPanel' not found in D:\Development\WWW\gestion.loc al\plugins\sfDoctrinePlugin\lib\debug\sfWebDebugPanelDoctrine.class.php on line 21 Can any help me with this? Cheers and thanks in advance Ing. Reynier Pérez Mira Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] What the character ~ means in schema.yml file
Hi: I have been checking the new form Framework book [1] and I notice something insteresting to me: propel: article: id: ~ title: { type: varchar(255), required: true } slug: { type: varchar(255), required: true } content:longvarchar status: varchar(255) author_id:{ type: integer, required: true, foreignTable: author, foreignReference: id, OnDelete: cascade } category_id: { type: integer, required: false, foreignTable: category, foreignReference: id, onDelete: setnull } published_at: timestamp created_at: ~ updated_at: ~ _uniques: unique_slug: [slug] As you can see in the code above at the id appears the character ~. ¿This mean that this field have the common properties for a ID field in a table? I mean something like this: id { type: INT, required: true, autoIncrement: true, primaryKey: true } [1] http://www.symfony-project.org/book/forms/1_1/en/04-Propel-Integration Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How to deal with Check Boxes in Symfony 1.1.4
Hi every: I have a form created using the task propel-build:forms and look like this: class BaseModlicCategoriasForm extends BaseFormPropel { public function setup() { $this-setWidgets(array( 'id_categoria' = new sfWidgetFormInputHidden(), 'titulo_categoria' = new sfWidgetFormInput(), 'activa' = new sfWidgetFormInputCheckbox(), )); $this-setValidators(array( 'id_categoria' = new sfValidatorPropelChoice(array('model' = 'ModlicCategorias', 'column' = 'id_categoria', 'required' = false)), 'titulo_categoria' = new sfValidatorString(array('max_length' = 150)), 'activa' = new sfValidatorBoolean(), )); $this-widgetSchema-setNameFormat('modlic_categorias[%s]'); $this-errorSchema = new sfValidatorErrorSchema($this-validatorSchema); parent::setup(); } public function getModelName() { return 'ModlicCategorias'; } } The using the other class I setup some Validators: class ModlicCategoriasForm extends BaseModlicCategoriasForm { public function configure() { unset ( $this['id_categoria'] ); $this-setValidators(array( 'titulo_categoria' = new sfValidatorString(array( 'required'=true, 'min_length'=4, 'max_length'=25, ),array( 'required'='The field is required', 'min_length'='The field must have at least %min_length% characters', 'max_length'='The field must not exceed %max_length% characters' ; } } But when I check the checkbox and send the form I get this error: Unexpected extra form field named activa. How can I fix this problem? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Why this ...
Hi every: I have this routing defined: cambiar_cultura: url: /change/lang/* param: { module: geslicsoft, action: ChangeAppCulture } requirements: { lang: (?:es|en|fr|it) } I have this link in my template: link_to(image_tag('icn_spanish',array('title'=__('espanol'),'alt'=__('espanol'))),'@cambiar_cultura?lang=es'); I have this method in my class: public function ChangeAppCulture($request) { $this-getUser()-setCulture($request-getParameter('lang')); } Why when I click in that link I get this error: [sfError404Exception] Action geslicsoft/ChangeAppCulture does not exist. Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How can I access to the actual module name?
Hi every: I have this code in the preExecute action: PHP Code: public function preExecute() { $this-moduleName = $this-getModuleName(); } Then in my layout.php file I have this: echo $moduleName; If I try the URL http://gestion.local/backend_dev.php/geslicsoft the $moduleName variable need to take geslicsoft as value ¿right? Well this var cannot take any value and Symgony show me this error: Notice: Undefined variable: moduleName in D:\Development\WWW\gestion.local\apps\backend\templates\layout.php on line 39 What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How can I access to the actual module name?
Thanks for your reply Ant but I resolve the problem using $sf_context var from the view layout.php. Now the code is: $moduleName = $sf_context-getModuleName(); if (isset($moduleName)) { switch ($moduleName) { case geslicsoft: include_partial('LicenciasAdminMenu'); break; case gesrecursos: include_partial('LevantamientoAdminMenu'); break; case gesdessoft: include_partial('SoftwareAdminMenu'); break; case gesmantenimiento: include_partial('MantenimientoAdminMenu'); break; } } else { include_partial('MainMenu'); } Now it works perfectly and I don't have anymore the preExecute function in my class. Cheers and thanks for all Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP i think it has to do with assignment in pre execute. I beleive i had trouble with this before as well. For some reason i dont think assignment for the template works in preExecute. I think it only works for assignment within the actions, not within the template. I think this has to do with how preExecute is called and use of __set to magically assing the template variable form within an execution method. Of course i could be completely wrong. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfForms doesn't validate
Hi every: I created a Forms based on a Propel Model and using the propel:build-forms task. I try to personalize a little more the generated form adding some rules for validation. See the code below: class BaseAutoresForm extends BaseFormPropel { public function setup() { $this-setWidgets(array('nombre_autor' = new sfWidgetFormInput())); $this-setValidators(array('nombre_autor' = new sfValidatorString(array('required'=true,'min_length'= 4,'max_length'=50; $this-widgetSchema-setNameFormat('autores[%s]'); $this-errorSchema = new sfValidatorErrorSchema($this-validatorSchema); parent::setup(); } public function getModelName() { return 'Autores'; } } So this code when I leave a blank field must be validate but it doesn't work because the form is always send. I try also writing only 3 characters (for min_lenght) and doesn't work too. What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: sfForms doesn't validate
Thanks for your reply again but myself found the error. My code is wrong completely. See the code for the action now: public function executeAdicionarAutor($request) { $this-formulario_autores = new AutoresForm(); if ($request-isMethod('post')) { $this-formulario_autores-bind($request-getParameter('nombre')); if ($this-formulario_autores-isValid()) { $autor = new Autores(); $autor-setNombreAutor($request-getParameter('nombre')); $autor-save(); $this-redirect('@listar_autores'); } } } Now it validates OK but I have one doubt. I have the csrf_secret protection active. Now when I send the form always appear this message: csrf token: Required. and the form never is send. What this mean that I need a field for insert the secret word or something else? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ant Cunningham Sent: Thursday, October 09, 2008 7:37 PM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: sfForms doesn't validate Im not sure that this has anything to do with it... But why are you extending the base class? Normal procedure is to extend the generated form class. Reynier Perez Mira wrote: Hi every: I created a Forms based on a Propel Model and using the propel:build-forms task. I try to personalize a little more the generated form adding some rules for validation. See the code below: class BaseAutoresForm extends BaseFormPropel { public function setup() { $this-setWidgets(array('nombre_autor' = new sfWidgetFormInput())); $this-setValidators(array('nombre_autor' = new sfValidatorString(array('required'=true,'min_length'= 4,'max_length'=50; $this-widgetSchema-setNameFormat('autores[%s]'); $this-errorSchema = new sfValidatorErrorSchema($this-validatorSchema); parent::setup(); } public function getModelName() { return 'Autores'; } } So this code when I leave a blank field must be validate but it doesn't work because the form is always send. I try also writing only 3 characters (for min_lenght) and doesn't work too. What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP -- Ant Cunningham Graphic Designer | Web Developer Vector Based Design --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problems with redirection and sfGuard for Symfony 1.1
Before this email I have not because reading sfGuard documentation in somewhere said that this is not obligatory so I didn't write in the file. Today I added this clear the cache try again and the same error still appearing. Is this a sfGuard problem? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP Do you have theese settings in routing.yml ? sf_guard_signin: url: /login param: { module: sfGuardAuth, action: signin } sf_guard_signout: url: /logout param: { module: sfGuardAuth, action: signout } sf_guard_password: url: /request_password param: { module: sfGuardAuth, action: password } --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Problems with redirection and sfGuard for Symfony 1.1
Hi every: I'm using sfGuard plugin in one of my applications. When I login inside the application I get a server 500 response wich is a Internal Server Error. I see the Apache logs and I can see this: [Mon Oct 06 20:17:00 2008] [error] [client 127.0.0.1] Empty module and/or action after parsing the URL /images/platgestion.ico (/). [Mon Oct 06 20:17:00 2008] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'sfStopException' in D:\\Development\\symfony1.1\\lib\\filter\\sfBasicSecurityFilter.class.php:86\nStack trace:\n#0 D:\\Development\\symfony1.1\\lib\\filter\\sfBasicSecurityFilter.class.php(50): sfBasicSecurityFilter-forwardToLoginAction()\n#1 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(1189): sfBasicSecurityFilter-execute(Object(sfFilterChain))\n#2 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(1152): sfFilterChain-execute()\n#3 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(1189): sfRenderingFilter-execute(Object(sfFilterChain))\n#4 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(734): sfFilterChain-execute()\n#5 D:\\Development\\symfony1.1\\lib\\exception\\sfError404Exception.class.php(49): sfController-forward('default', 'error404')\n#6 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(2530): sfError404Excep in D:\\Development\\symfony1.1\\lib\\filter\\sfBasicSecurityFilter.class.php on line 86 [Mon Oct 06 20:17:03 2008] [error] [client 127.0.0.1] Empty module and/or action after parsing the URL /images/platgestion.ico (/). [Mon Oct 06 20:17:03 2008] [error] [client 127.0.0.1] PHP Fatal error: Uncaught exception 'sfStopException' in D:\\Development\\symfony1.1\\lib\\filter\\sfBasicSecurityFilter.class.php:86\nStack trace:\n#0 D:\\Development\\symfony1.1\\lib\\filter\\sfBasicSecurityFilter.class.php(50): sfBasicSecurityFilter-forwardToLoginAction()\n#1 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(1189): sfBasicSecurityFilter-execute(Object(sfFilterChain))\n#2 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(1152): sfFilterChain-execute()\n#3 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(1189): sfRenderingFilter-execute(Object(sfFilterChain))\n#4 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(734): sfFilterChain-execute()\n#5 D:\\Development\\symfony1.1\\lib\\exception\\sfError404Exception.class.php(49): sfController-forward('default', 'error404')\n#6 D:\\Development\\WWW\\gestion.local\\cache\\backend\\prod\\config\\config_core_compile.yml.php(2530): sfError404Excep in D:\\Development\\symfony1.1\\lib\\filter\\sfBasicSecurityFilter.class.php on line 86 [Mon Oct 06 20:17:08 2008] [error] [client 127.0.0.1] An internal URI must contain a module and an action (module/action) ( given)., referer: http://gestion.local/ [Mon Oct 06 20:17:08 2008] [error] [client 127.0.0.1] Empty module and/or action after parsing the URL /favicon.ico (/). [Mon Oct 06 20:17:11 2008] [error] [client 127.0.0.1] Empty module and/or action after parsing the URL /favicon.ico (/). I made some changes in my routing.yml file and now look like this : homepage: url: / param: { module: geslicsoft, action: index } And my action.class.php is this: public function executeIndex($request) { $user = $this-getUser(); if (!$user-isAuthenticated()) { return $this-redirect('@sf_guard_signin'); } $this-culture = $user-getCulture(); return sfView::SUCCESS; } Where is the problem? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problems with redirection and sfGuard for Symfony 1.1
Well I try this URL http://gestion.local/backend_dev.php and when I login inside the system I get this message error: [InvalidArgumentException] An internal URI must contain a module and an action (module/action) ( given). Also you can check the backend_dev.log content here http://paste.org/index.php?id=3976 Why happen this? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP Do you _REALLY_ think that your error log is readable? Use http://paste.org/ instead. Also you should try to login with dev environment -- --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Understanding routing system
Hi every: I have a problem with routing system. I have this rule: list_author: url: /modules/author/list param: { module: geslicsoft, action: ListAuthors } So if I call the URL: http://gestion.local/backend_dev.php/geslicsoft/modules/author/list this rule match and will be executed, no? Well Symfony when I try this URL send me this error message: [sfError404Exception] Action geslicsoft/modulos does not exist. stack trace * at () in SF_SYMFONY_LIB_DIR\controller\sfController.class.php line 207 ... 204. $this-dispatcher-notify(new sfEvent($this, 'application.log', array(sprintf('Action %s/%s does not exist', $moduleName, $actionName; 205. } 206. 207. throw new sfError404Exception(sprintf('Action %s/%s does not exist.', $moduleName, $actionName)); 208. } 209. 210. // create an instance of the action Why? What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony 1.1, i18n y sfGuard
Hi every: I'm developing a fresh application and I take Symfony 1.1.4 as Symfony release. I'm using also the sfGuard plugin to take advantage in user and group managment. Because I speak Spanish I want to internationalize the app and for that I do this: 1) Activate the right options in settings.yml file i18n: on default_culture: es 2) Create the i18n/sfguard.es_ES.xml and put this content inside: ?xml version=1.0 encoding=UTF-8? xliff version=1.0 file orginal=global source-language=es_ES datatype=plaintext body trans-unit id=1 sourcesignin[username]/source targetUsuario/target /trans-unit /body /file /xliff Then I want to internationalize first the sfGuard plugin interface. This plugin generate the form using the new form Framework so the code is as follow: public function configure() { $this-setWidgets(array( 'username' = new sfWidgetFormInput(), 'password' = new sfWidgetFormInput(array('type' = 'password')), 'remember' = new sfWidgetFormInputCheckbox(), )); $this-setValidators(array( 'username' = new sfValidatorString(), 'password' = new sfValidatorString(), 'remember' = new sfValidatorBoolean(), )); $this-validatorSchema-setPostValidator(new sfGuardValidatorUser()); $this-widgetSchema-setNameFormat('signin[%s]'); } And then in the template only echo $form appear. So I not know how to get the label value for put as internationalize string. I mean this: label for=signin_usernameUsername/label ¿Any idea or solution? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] dbFinder problem
Hi every: Recently I start a new project with Symfony 1.1.2. After created all model classes I'm trying to use dbFinder plugin but I get this error: Notice: Undefined variable: finder in D:\Development\WWW\gestion.local\plugins\DbFinderPlugin\lib\DbFinder.php on line 171 Fatal error: Call to a member function paginate() on a non-object in D:\Development\WWW\gestion.local\plugins\DbFinderPlugin\lib\DbFinder.php on line 390 Can any help me with this? PS: With Symfony 1.0.17 I not have this problem is only with Symfony 1.1.2 Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: dbFinder problem
I think that is from a Propel ORM because I have none Doctrine plugin installed. I'm using the latest from SVN (maybe is not the latest because I update my plugin when you fix the PostgreSQL problem. I'm the ticket guy). What you mean with initialization line? This one: $this-pag = DbFinder::from('Autores')-paginate($request-getParameter('pag', 1), sfConfig::get('app_paginado')); Cheers and thanks Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Francois Zaninotto Sent: Wednesday, September 24, 2008 4:07 PM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: dbFinder problem Are you creating a finder object from a Propel class or from a Doctrine class? Which version of the plugin are you using? Can you paste the finder initialization line? François 2008/9/24 Reynier Perez Mira [EMAIL PROTECTED]: Hi every: Recently I start a new project with Symfony 1.1.2. After created all model classes I'm trying to use dbFinder plugin but I get this error: Notice: Undefined variable: finder in D:\Development\WWW\gestion.local\plugins\DbFinderPlugin\lib\DbFinder.php on line 171 Fatal error: Call to a member function paginate() on a non-object in D:\Development\WWW\gestion.local\plugins\DbFinderPlugin\lib\DbFinder.php on line 390 Can any help me with this? PS: With Symfony 1.0.17 I not have this problem is only with Symfony 1.1.2 Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users]
Hi: I'm developing a new Project with Symfony 1.1.x and I want to use the new Form Framework. When I build the project I generated also the model using propel:build-model and then the respective forms using propel:build-forms. Then I have this method: public function executeAdicionarAutor($request) { if (sfRequest::POST == $this-getRequest()-getMethod()) { $autor = new Autores(); $autor-setNombreAutor($request-getParameter('nombre')); $autor-save(); $this-redirect('@listar_autores'); } else { $this-formulario_autores = new AutoresForm(); return sfView::SUCCESS; } } When I try to access to http://gestion.local/backend_dev.php/geslicsoft/AdicionarAutor Symfony show me this error: Fatal error: Class 'AutoresForm' not found in D:\Development\WWW\gestion.local\apps\backend\modules\geslicsoft\actions\actions.class.php on line 61 I check that this class exists and it exists in /lib/form directory.¿What's wrong here? ¿I miss something? ¿Can any send me a functional sample to see how it Works and also understand how the new form Framework work? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: [symfony-users]
Try to execute symfony cc Thanks, this solve the problem Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Integrating FirePHP in Symfony Core
First of all I'm not a ZF user I'm a Symfony user. Recently and reading on Internet Zend Co. release ZF 1.6 and it comes with some new features. One of them is really interesting and it's FirePHP Log Support. I'm asking if will be possible include this feature in the next Symfony 1.2 version. I take a look at FirePHP site[1] and some articles about ZF and FirePHP[2] and it's not complicated. I least this is what I'm think. What you believe? Fabien? [1] http://www.firephp.org/Wiki/Libraries/FirePHPCore [2] http://www.christophdorn.com/Blog/2008/09/02/firephp-and-zend-framework-16/ Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfPropel13 Plugin and Symfony 1.0.16 error
Hi every, I follow all the steps in sfPropel13Plugin wiki to install it. I upgrade the Propel libraries to Propel 1.3 Beta2. So because schema.yml haven't any changes between Propel 1.2 and Propel 1.3 I not recreate again the file. This mean I don't use the command: # symfony propel-13-build-schema So I jump directly to: # symfony propel-13-build-model But surprise I get this error: schemaconverting /workdata/www/gesti...ynier/config/schema.yml to XML schemaputting /workdata/www/gestionReynier/config/generated-schema.xml schemaconverting /workdata/www/gesti...lugin/config/schema.yml to XML schemaputting /workdata/www/gestionRe...erated-sfGuardPlugin-schema.xml file+ config/generated-sfGuardPlugin-schema.xml file- /workdata/www/gestionReynier/pl...erated-sfGuardPlugin-schema.xml Buildfile: /workdata/www/gestionReynier/plugins/sfPropel13Plugin/lib/vendor/propel-generator/build.xml [PHP Error] require_once(PEAR.php): failed to open stream: No such file or directory [line 23 of /workdata/www/gestionReynier/plugins/sfPropel13Plugin/lib/vendor/phing/classes/phing/tasks/ext/FtpDeployTask.php] Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='/workdata/www/gestionReynier/plugins/sfPropel13Plugin/lib/vendor/phing/classes:/workdata/www/gestionReynier:/workdata/symfony/lib:/workdata/www/gestionReynier/plugins/sfPropel13Plugin/lib/vendor/propel-generator/classes:/workdata/www/gestionReynier/lib:/workdata/www/gestionReynier/apps//lib::/workdata/symfony/lib/vendor:.:/usr/share/php:/usr/local/share/gforge:/usr/local/share/gforge/www/include:/etc/gforge') in /workdata/www/gestionReynier/plugins/sfPropel13Plugin/lib/vendor/phing/classes/phing/tasks/ext/FtpDeployTask.php on line 23 How can I solve this? Any help? I didn't install Symfony using PEAR I just uncompress the .tar.gz file in a directory. Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] new project sfConfigurationException error
Hi, I'm trying to start a fresh Project and aparently al lis fine. When I open the page for check if every is fine as I thought this error appear: == [sfConfigurationException] Invalid configuration settings: [sf_error_404_module] default, [sf_error_404_action] error404 stack trace * at () in SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 218 ... 215. $error = 'Invalid configuration settings: [sf_error_404_module] %s, [sf_error_404_action] %s'; 216. $error = sprintf($error, $moduleName, $actionName); 217. 218. throw new sfConfigurationException($error); 219. } 220. } 221. * at sfController-forward('default', 'module') in SF_SYMFONY_LIB_DIR/action/sfAction.class.php line 137 ... ... I didn't touch any code yet simply I start a new Project (symfony new), create the application (symfony app backend), add a default module(symfony module backend default) and test if this work. ¿Any idea? I'm using Ubuntu Linux Server 8.04 como OS, Symfony 1.0.16 and PHP 5.2.4-2ubuntu5.1 Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: new project sfConfigurationException error
Thanks Ant, this was the problem Cheers Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ant Cunningham Sent: Thursday, June 05, 2008 10:37 AM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: new project sfConfigurationException error Its probably because you used the module name default. Since you didn't add all the methods in the skeleton default module or redirect them via configuration it can't find them. On 6/5/08 10:28 AM, Reynier Perez Mira [EMAIL PROTECTED] wrote: Hi, I'm trying to start a fresh Project and aparently al lis fine. When I open the page for check if every is fine as I thought this error appear: == [sfConfigurationException] Invalid configuration settings: [sf_error_404_module] default, [sf_error_404_action] error404 stack trace * at () in SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 218 ... 215. $error = 'Invalid configuration settings: [sf_error_404_module] %s, [sf_error_404_action] %s'; 216. $error = sprintf($error, $moduleName, $actionName); 217. 218. throw new sfConfigurationException($error); 219. } 220. } 221. * at sfController-forward('default', 'module') in SF_SYMFONY_LIB_DIR/action/sfAction.class.php line 137 ... ... I didn't touch any code yet simply I start a new Project (symfony new), create the application (symfony app backend), add a default module(symfony module backend default) and test if this work. ¿Any idea? I'm using Ubuntu Linux Server 8.04 como OS, Symfony 1.0.16 and PHP 5.2.4-2ubuntu5.1 Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo de Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Validation problems
Hi, I'm trying to valídate the data inserted in a form. For that reason I created a file called AdicionarLicencias.yml inside the /validate folder in my module. This is the content of the file: /valídate/AdicionarLicencias.yml fillin: enabled: true fields: nombre: required: msg: El campo Nombre no se puede dejar vacío sfStringValidator: min: 3 min_error: El campo Nombre no puede tener menos de 5 carácteres max: 150 max_error: El campo Nombre no puede tener más de 150 carácteres dvd: required: msg: El campo DVD no se puede dejar vacio sfNumberValidator: type: float fecha_adq: required: msg: El campo Fecha de Adquisición no se puede dejar vacio fecha_ven: required: msg: El campo Fecha de Vencimiento no se puede dejar vacio sitio: sfUrlValidator: msg: Dirección no valida Then in my class I have a method called AdicionarLicencias() with this code: public function executeAdicionarLicencias() { if ($this-getRequest()-getMethod() != sfRequest::POST) { // Some irrelevant operations, for this enviroment, to retrieval data from DB return sfView::SUCCESS; } else { // Insert the data and redirect to @listar_licencias $this-redirect('@listar_licencias'); } } And I have also the function for handle the Error: public function handleErrorAdicionarLicencias() { // Some irrelevant operations, for this enviroment, to retrieval data from DB - This are the same as the AdicionarLicencias method before POST return sfView::SUCCESS; } Al lis good now. If I send the form ,with caused errors, I mean fields empty or others cases, to test if validation Works I get this error: [sfRenderException] The template /_MainMenu.php does not exist in: stack trace * at () in SF_SYMFONY_LIB_DIR/view/sfView.class.php line 463 ... 460. if (!is_readable($template)) 461. { 462. // the template isn't readable 463. throw new sfRenderException(sprintf('The template %s does not exist in: %s', $template, $this-directory)); 464. } 465. 466. // check to see if this is a decorator template ¿Can any tell me or give me any idea why Symfony call __MainMenu.php partial when this belong to another module and haven't any relationship with this one? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Problems with translation and I18N
Hi, After several days giving head butt with the problem I have found a solution. I left here because maybe in the future somebody could have the same problem: 1. Set default cultura to es_ES #apps/backend/config/i18n.yml all: default_culture: es_ES debug: off 2. Activate the i18n use in every enviroment and put UTF-8 as default charset: #apps/backend/config/settings.yml prod: .settings: i18n:on dev: .settings: i18n:on all: .settings: i18n:on charset: utf-8 3. Activate the I18N helper in every, absolutely every, template in wich I use translation ?php use_helper('I18N') ? 4. And not for be the last less important, delete every cookie that application or symphony has created. If you don't do this then you couldn't see the correct translation and this is what happen to me. Hope this help to others in case they have the same problem Cheers and thanks for every Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:symfony- [EMAIL PROTECTED] On Behalf Of Bernhard Schussek Sent: Saturday, May 17, 2008 02:57 AM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: Problems with translation and I18N Hello! Are you sure you are calling your site with user culture es? You set your default culture to en, and your translation file only translates en-es if the active culture is es. Could that be the problem? Regards and good luck, Bernhard 2008/5/16 Reynier Perez Mira [EMAIL PROTECTED]: Thanks Nicholas but nothing, I still getting the same behavior. I made the changes in both files: messages.es.xml and messages.es_ES.xml and nothing. Both file have this same code: ?xml version=1.0 ? xliff version=1.0 file orginal=global source-language=en_US datatype=plaintext body trans-unit id=1 sourcenombre_licencia/source targetLicencia:/target /trans trans-unit id=2 sourcenombre_categoria/source targetNombre Categoría/target /trans /body /file /xliff So I really don't know what's wrong Cheers and waiting for some solution Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:symfony- [EMAIL PROTECTED] On Behalf Of Nicolas Perriault Sent: Friday, May 16, 2008 04:23 AM To: symfony-users@googlegroups.com Subject: [symfony-users] Re: Problems with translation and I18N 2008/5/16 Reynier Perez Mira [EMAIL PROTECTED]: trans-unit id=1 source nombre_licencia /source target Listar /target /trans-unit You must use this format: trans-unit id=1 sourcenombre_licencia/source tragetListar/target /trans The text in the tag must exactly fit the string you pass to the __() function. HTH ++ -- Nicola --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Propel Exception Help
Hi, I'm working in a form and using the input_date_tag helper. By default this construct the dates as dd/mm/. When I try to insert this data to a table I get this error: [PropelException] Unable to parse date/time value for [fecha_creacion] from input: '17/05/2008' I do a Google research for some reference but nothing can help me. Can any help me here? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Problems with translation and I18N
Hi, I've been reading detailed the Symfony Book and paying greater attention to the Chapter 13 I18n And L10n. I need to translate a application interface because I need this in English and Spanish. This is what I have done until now: 1. Enable the use of i18n in /apps/backend/config/settings.yml all: .settings: charset:utf-8 i18n: on 2. Enable the use of i18n in /apps/backend/config/i18n.yml all: default_culture: en_US source: XLIFF debug: off cache: off 3. Create two (2) files to test if Spanish translation works under /apps/backend/i18n/messages.es.xml and /apps/backend/i18n/messages.es_ES.xml and wrote this text inside which one: ?xml version=1.0 ? xliff version=1.0 file orginal=global source-language=es_ES datatype=plaintext body trans-unit id=1 source nombre_licencia /source target Listar /target /trans-unit trans-unit id=2 source nombre categoria /source target Nombre Categoría /target /trans-unit /body /file /xliff 4. In my template I have this code: ?php echo __('nombre_licencia') ? When I call the page in the browser I get the untranslated text, means nombre_licencia. Why? What I'm doing wrong? Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony validators documentation ...
Hi every: I need to use some Symfony validators but I can't find a place to see doc about they. Can any help me with a site or URL or book or anything? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Loosing partial after validate
Hi every: I have the following code at preExecute() function: [code] public function preExecute() { if ( $this-getModuleName() == geslicsoft) { $this-mostrar_parcial = geslicsoft; } } Then in the layout.php I have this other code: [code] ?php if (isset($mostrar_parcial)) { switch ($mostrar_parcial) { case geslicsoft: include_partial('LicenciasAdminMenu'); break; } } ? When I execute the action, normally, all is fine and I check using DebugBar and at the end I can read this: View - initialize view for geslicsoft/_LicenciasAdminMenu View - render sf_app_dir/modules/geslicsoft/templates/_LicenciasAdminMenu.php Now when I validate a form if I leave at least one field blank Symfony never render the partial again. I try also to force the variable in the handleError method: [code] public function handleErrorAdicionarAutor() { $this-mostrar_parcial = geslicsoft; return sfView::SUCCESS; } I check again using DebugBar and at the end it only wrote this: Filter - executing filter sfFillInFormFilter ¿Somebody having before this problem and found the solution? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: How I get the Database Connection ...
Yes it is, I founded few hours ago when I post the message, anyway thanks Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP -Original Message- From: symfony-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Whisller Sent: Tuesday, May 06, 2008 07:12 pm To: symfony users Subject: [symfony-users] Re: How I get the Database Connection ... Propel::getConnection(); Is it, what you want? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How I get the Database Connection ...
Hi every: I have this settings in my databases.yml [code] all: propel: class: sfPropelDatabase param: dsn: pgsql://gestec:[EMAIL PROTECTED]/uci_recursos and in my propel.ini this other settings: [code] propel.targetPackage = lib.model propel.packageObjectModel = true propel.project = gestion propel.database= pgsql propel.database.createUrl = pgsql://gestec:[EMAIL PROTECTED] propel.database.url= pgsql://gestec:[EMAIL PROTECTED]/uci_recursos So I write this code: [code] class gesdessoftActions extends sfActions { public function executeIndex() { $this-getContext()-getDatabaseConnection(); } } When I call the URL I get this error: [sfDatabaseException] Database default does not exist Is this a error, a bug, a missunderstanding by me or something is wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Route named editar_dvd have a mandatory id_licencia parameter
Hi Nicolas and thanks for your reply: Try to invert the editar_dvd and form_editar_dvd routes If by invert you mean this: form_editar_dvd: url: /EditarDVD param: { module: geslicsoft, action: EditarDVD } editar_dvd: url: /EditarDVD/:id_dvd param: { module: geslicsoft, action: EditarDVD } This do nothing, still the same error. Cheers and waiting ... Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Route named editar_dvd have a mandatory id_licencia parameter
Hi every: I have the following routes defined in my routing.yml file: [code] listar_dvd: url: /ListarDVD param: { module: geslicsoft, action: ListarDVD } adicionar_dvd: url: /AdicionarDVD param: { module: geslicsoft, action: AdicionarDVD } editar_dvd: url: /EditarDVD/:id_dvd param: { module: geslicsoft, action: EditarDVD } eliminar_dvd: url: /EliminarDVD/:id_dvd param: { module: geslicsoft, action: EliminarDVD } form_editar_dvd: url: /EditarDVD param: { module: geslicsoft, action: EditarDVD } Then in my template(parcial by the way) I have this code: [code] ?php echo link_to('Listar DVD','@listar_dvd') ? When I try the URL: http://localhost/backend_dev.php/ListarDVD I get this message: [sfException] Route named editar_dvd have a mandatory id_licencia parameter I have sought on all sides (templates, functions, routes) having to do with the methods associated with DVD and contains no reference to id_licencia. I have erased the cache and I trying again and nothing. Some idea? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] SO: Documentation about new Symfony 1.1 Features
Hi every: I'm preparing a Symfony mini conference to talk about new functionalities that come with Symfony 1.1. I found a lot of presentations but all them too abstract. I need some extended information, not manual or book, to understand the new features and then can explain to my students. Is just something like that: http://www.aide-de-camp.org/article/3/en/symfony-1-1-form-framework-and-the-mvc-pattern. ¿Any help? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] How to use relations with sfPropelPager
Hi every: I have two tables, Categorias and SubCategorias. Each Categoria have a lot of SubCategorias so the relationship between tables is 1:n. I have this method for get every record in SubCategorias table. [code] public function executeListarSubCategorias() { $subcatsql = new Criteria(); $subcatsql-addAscendingOrderByColumn(SubcategoriasPeer::NOMBRE_SUBCATEGORIA); $this-pag = new sfPropelPager('Subcategorias', sfConfig::get('app_cantidadpaginadodefecto')); $this-pag-setCriteria($subcatsql); $this-pag-setPage($this-getRequestParameter('pagina'), 1); $this-pag-init(); } With this I get all columns from SubCategorias table but I need to get also the Categorias name. Checking BaseSubCategoriasPeer class I see the method doSelectJoinCategorias wich selects a collection of Subcategorias objects pre-filled with their Categorias objects. ¿How can I use this method with sfPropelPager? Also I read this article[1] in Propel Wiki but it's not so clear for me. ¿Any help? [1] http://propel.phpdb.org/trac/wiki/Users/Documentation/1.2/Relationships Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony + Propel + Multiple Schemas
Hi every: Define multiple schemas. What you mean with define multiples schemas? I understand by schema at least in PostgreSQL (the SGBD I use in my project now) a set of objects (tables, views, indexes, etc) that belongs to an user account and as Oracle Wiki [1] said It is often used as another way to refer to an Oracle account. I want to use having a set of tables in the same PostgreDB. For example: db: mydatabase schema:projects tables: table1 table2 schema:accounts tables: users users_preferences ¿Understand now? I can't deal with that using Symfony or better using Propel because this last doesn't support schemas yet. I don't know if for future versions Propel come with this feature. Also I don't know if Doctrine support this. ¿Any know? We are building several apps in ONE symfony tree and successfully using several schemas and several databases within the same database server. As I explain befote maybe you use schemas as Oracle account and not as multiples schemas in the same DB. [1] http://orafaq.com/wiki/Schema ¿Another approach? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP __ Information from ESET NOD32 Antivirus, version of virus signature database 3015 (20080410) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony + Propel + Multiple Schemas
lol thats useful :) Nah seriously, does anyone from Doctrine read these forums and could give us any direction? :) Maybe we should be posting this on the Doctrine forum too? :) A friend mine in spanish community/list made a modifications to PgSQLDatabaseInfo and PgSQLConnection classes [1] and he said me that's works but really I can't get it to work. The solution? works with only one schema and have in it 150 tables !!! This is for now, I expect for Doctrine or Propel developers listen to the statement. [1] http://symfoneando.blogspot.com/2007/12/trabajando-con-mltiples-shemas-de.html (The article is in spanish by the way) Cheers Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Symfony + Propel + Multiple Schemas
Within the same database or does each user have a separate database? Yep, within the same database. We too have been working with legacy code where we have to work with existing tables but also add new tables for new features (which usually becomes a new database with its own set of tables). This means we have multiple DSNs in config/databases.yml and often use multiple connections (maybe when we have totally replaced the legacy site we can reduce this :-) This is not my case and I think Ryan G too. Cheers Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] sfGuard installing problems
Hi every: I build a clean Project to install, configure and try sfGuard and LDAP. I download the file sfGuardPlugin-1.1.13.tgz from www.symfony-project.org uncompress and start read the file README. I start following every step by step: - Configuring the databases.yml all: propel: class: sfPropelDatabase param: dsn: pgsql://gestec:[EMAIL PROTECTED]/sfguard - Configuring the propel.ini (I post only the relevant information) propel.project = sfguard propel.database= pgsql propel.database.createUrl = pgsql://gestec:[EMAIL PROTECTED] propel.database.url= pgsql://gestec:[EMAIL PROTECTED]/sfguard propel.builder.addIncludes = false propel.builder.addComments = true propel.builder.addBehaviors = false propel.disableIdentifierQuoting = true Next: 1. Create the DB in PostgreSQL 2. Define Rols and Permissions Since here is pure sfGuard doc 3. Run the commands: 3.1 Command: symfony propel-build-model 3.2 Results: All fine 3.3 Command: symfony propel-build-sql 3.4 Results: All fine 3.5 Command: symfony propel-insert-sql 3.6 Results: ... propel insert-sql: [propel-sql-exec] Executing statements in file: /workdata/www/sfguard/data/sql/plugins.sfGuardPlugin.lib.model.schema.sql [propel-sql-exec] Our new url - pgsql://gestec:[EMAIL PROTECTED]/sfguard [propel-sql-exec] Executing file: /workdata/www/sfguard/data/sql/plugins.sfGuardPlugin.lib.model.schema.sql [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_group CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_group does not exist] [User Info: DROP TABLE sf_guard_group CASCADE] [propel-sql-exec] Failed to execute: DROP SEQUENCE sf_guard_group_seq [propel-sql-exec] Could not execute update [Native Error: ERROR: sequence sf_guard_group_seq does not exist] [User Info: DROP SEQUENCE sf_guard_group_seq] [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_permission CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_permission does not exist] [User Info: DROP TABLE sf_guard_permission CASCADE] [propel-sql-exec] Failed to execute: DROP SEQUENCE sf_guard_permission_seq [propel-sql-exec] Could not execute update [Native Error: ERROR: sequence sf_guard_permission_seq does not exist] [User Info: DROP SEQUENCE sf_guard_permission_seq] [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_group_permission CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_group_permission does not exist] [User Info: DROP TABLE sf_guard_group_permission CASCADE] [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_user CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_user does not exist] [User Info: DROP TABLE sf_guard_user CASCADE] [propel-sql-exec] Failed to execute: DROP SEQUENCE sf_guard_user_seq [propel-sql-exec] Could not execute update [Native Error: ERROR: sequence sf_guard_user_seq does not exist] [User Info: DROP SEQUENCE sf_guard_user_seq] [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_user_permission CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_user_permission does not exist] [User Info: DROP TABLE sf_guard_user_permission CASCADE] [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_user_group CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_user_group does not exist] [User Info: DROP TABLE sf_guard_user_group CASCADE] [propel-sql-exec] Failed to execute: DROP TABLE sf_guard_remember_key CASCADE [propel-sql-exec] Could not execute update [Native Error: ERROR: table sf_guard_remember_key does not exist] [User Info: DROP TABLE sf_guard_remember_key CASCADE] [propel-sql-exec] 31 of 41 SQL statements executed successfully 3.7 Command: symfony propel-load-data backend 3.8 Results: propelload data from /workdata/www/s...ns/sfGuardPlugin/data/fixtures PHP Fatal error: Class 'BasesfGuardUserGroupPeer' not found in /workdata/www/sfguard/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserGroupPeer.php on line 18 Fatal error: Class 'BasesfGuardUserGroupPeer' not found in /workdata/www/sfguard/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserGroupPeer.php on line 18 Segmentation fault What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Accesing config values
Hi every: I need to paginate some values from a query. This is not a problem because I can use sfPropelPager class. For that I do this at first: public function executeListar() { $this-pag = new sfPropelPager('Nombre_Clase', cantidad_por_pagina); } Now I want to create some global var and access to they using sfConfig class. I've been reading the Definitive Guide to Symfony specifically the epigraph Accessing the Configuration from Code and there the authors said that I can use the file app.yml. They explain also that this file is inside myproject/apps/myapps/config/app.yml[1] but I think that I can copy that file to /mymodule/config and use this also. Well before trying with mymodules folder I work with the default file [1]. Then I do this: dev: CantidadCategorias: 2 In my actions.class.php I wrote this: public function executeListar() { $this-pag = new sfPropelPager('Nombre_Clase', sfConfig::get('app_CantidadCategorias', 5)); } When I call the URL: http://localhost/backend_dev.php/geslicsoft/Listar this should list the result two by two but it doesn't list as I expect. The table inside the DB has 5 or more records. ¿What I'm doing wrong? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP __ Information from ESET NOD32 Antivirus, version of virus signature database 3008 (20080408) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Working with slots first time
Hi every: I have a menu and I need this menu specific only for admin pages. For that I think the better option is slots. Well I put this code inside backend/templates/layout.php: ?php if(has_slot('admin_menu')) { include_slot('admin_menu'); } ? And in my backend/modules/license/templates/EditAutorSuccess.php the menu code: ?php slot('admin_menu'); ? Here goes my menu ?php end_slot('admin_menu'); ? How I can show this slot when I call http://localhost/backend_dev.php/license? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Symfony + Propel + Multiple Schemas
Hi every: I'm asking if Symfony 1.0.11 can work with multiple schemas in PostgreSQL. If the answer is yes, exists any guide or any documentation about how to configure the propel.ini and databases.yml? Cheers and thanks in advance Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---