Re: [symfony-users] [symfony2] first test and first question

2010-07-13 Thread samuel
ok,but we can put javascript library in vendor directory or is only for php
library ?

2010/7/13 Fabien Potencier fabien.potenc...@symfony-project.com

 On 7/12/10 11:14 PM, samuel wrote:

 Hello,
 I'm seeing in the symfony2 best practice : A bundle must not embed
 third-party libraries.

 What about javascript libraries ?
 I think they should forward the same logic and don't be present in the
 bundle, isn't it ?


 Yes, you are right.

 Fabien


 --
 If you want to report a vulnerability issue on symfony, please send it
 to security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [symfony2] first test and first question

2010-07-13 Thread Fabien Potencier


On 7/13/10 10:04 AM, samuel wrote:

ok,but we can put javascript library in vendor directory or is only for
php library ?


You should not bundle any vendor with a bundle. That said, the tools to 
ease installation and management of such dependencies are not available 
yet. So, don't pay too much attention to this specific rule for now.


Fabien



2010/7/13 Fabien Potencier fabien.potenc...@symfony-project.com
mailto:fabien.potenc...@symfony-project.com

On 7/12/10 11:14 PM, samuel wrote:

Hello,
I'm seeing in the symfony2 best practice : A bundle must not embed
third-party libraries.

What about javascript libraries ?
I think they should forward the same logic and don't be present
in the
bundle, isn't it ?


Yes, you are right.

Fabien


--
If you want to report a vulnerability issue on symfony, please
send it
to security at symfony-project.com http://symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to
symfony-users@googlegroups.com
mailto:symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com http://symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
mailto:symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
mailto:symfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
If you want to report a vulnerability issue on symfony, please send it
to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [symfony2] first test and first question

2010-07-13 Thread samuel
ok,
thank you.
So I'm waiting to see this tool available.


2010/7/13 Fabien Potencier fabien.potenc...@symfony-project.com


 On 7/13/10 10:04 AM, samuel wrote:

 ok,but we can put javascript library in vendor directory or is only for
 php library ?


 You should not bundle any vendor with a bundle. That said, the tools to
 ease installation and management of such dependencies are not available yet.
 So, don't pay too much attention to this specific rule for now.

 Fabien


 2010/7/13 Fabien Potencier fabien.potenc...@symfony-project.com
 mailto:fabien.potenc...@symfony-project.com


On 7/12/10 11:14 PM, samuel wrote:

Hello,
I'm seeing in the symfony2 best practice : A bundle must not embed
third-party libraries.

What about javascript libraries ?
I think they should forward the same logic and don't be present
in the
bundle, isn't it ?


Yes, you are right.

Fabien


--
If you want to report a vulnerability issue on symfony, please
send it
to security at symfony-project.com http://symfony-project.com


You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to
symfony-users@googlegroups.com
mailto:symfony-users@googlegroups.com

To unsubscribe from this group, send email to

 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com

 mailto:symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com
 

For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com http://symfony-project.com


You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
mailto:symfony-users@googlegroups.com

To unsubscribe from this group, send email to

 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com

 mailto:symfony-users%2bunsubscr...@googlegroups.comsymfony-users%252bunsubscr...@googlegroups.com
 

For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


 --
 If you want to report a vulnerability issue on symfony, please send it
 to security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Single Sign On - Plugin

2010-07-13 Thread DEEPAK BHATIA
Hi Mr. Morvan,

I am looking at two symfony plugins

1. vjGuardADPlugin - 1.1.4
2. vjAuthPlugin-2.1.1

The vjGaurdADPlugin - Active Directory authentication - Identity management
- SSO with NTLM or Kerberos protocol.

The vjAuthPlugin - AD authentification and SSO plugin with NTLM

Which one should I use in my project ?

Best Regards

Deepak Bhatia

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Insert sql

2010-07-13 Thread wueb
Hello,

i have some sql lines in a file.

i need the inserts from that sql be created by symfony in order to
execute the code i made on the models from each table.

how can i execute that sql in symfony?

thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Qustion about routing

2010-07-13 Thread Javier Garcia

Hi,

I have this rule in routing.yml:

mensaje_nuevo:
  url:   /mensaje/nuevo

and this link in a template:

echo link_to('Foo', 'mensaje/nuevo');


When i execute the action that renders the link, it gives me this error:

Unable to find a matching route to generate url for params array ( 
'action' = 'nuevo', 'module' = 'mensaje',).


Any idea?

--

Javi

Ubuntu 8.04 - Symfony 1.3

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Qustion about routing

2010-07-13 Thread Gábor Fási
Why not use the route's name?

link_to(bar, @mensaje_nuevo)

On Tue, Jul 13, 2010 at 14:53, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I have this rule in routing.yml:

 mensaje_nuevo:
  url:   /mensaje/nuevo

 and this link in a template:

 echo link_to('Foo', 'mensaje/nuevo');


 When i execute the action that renders the link, it gives me this error:

 Unable to find a matching route to generate url for params array (
 'action' = 'nuevo', 'module' = 'mensaje',).

 Any idea?

 --

 Javi

 Ubuntu 8.04 - Symfony 1.3

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: somebody have worked with FormFilter? :: getting 'Array to String conversion' Notice

2010-07-13 Thread Massimiliano Arione
On 13 Lug, 02:36, B.O.G germanaolivei...@gmail.com wrote:
 I have a sfWidgetFormFilterDate, and every time i 'click' Filter
 button i get and 'Array to String conversion' Notice

 If i remove de Date Filter the error disappear, what is going on ?

it could depend on your date filter validator.
Check it

cheers
Massimiliano

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Qustion about routing

2010-07-13 Thread Mathieu Comandon

Your route doesn't say what module and action it refers to, modify
your route to :

mensaje_nuevo:
  url:   /mensaje/nuevo
  param: { module: mensaje, action: nuevo }



On Jul 13, 2:53 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 I have this rule in routing.yml:

 mensaje_nuevo:
    url:   /mensaje/nuevo

 and this link in a template:

 echo link_to('Foo', 'mensaje/nuevo');

 When i execute the action that renders the link, it gives me this error:

 Unable to find a matching route to generate url for params array (
 'action' = 'nuevo', 'module' = 'mensaje',).

 Any idea?

 --

 Javi

 Ubuntu 8.04 - Symfony 1.3

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Problem with Inheritance in autoGenerated action class using sfAdminThemejRollerPlugin.

2010-07-13 Thread sieboje
In generator.yml file I have set:

actions_base_class:sfSortableModuleActions
theme: admin

And my module can launch actions from sfSortableModuleActions but when
I change theme to jroller by setting:

actions_base_class:sfSortableModuleActions
theme: jroller

Auto generated module actions in cache folder extends sfActions not
sfSortableModuleActions.

Does anyone have an idea why it is happening?

I can copy actions from sfSortableModule to make it working but I
would like to avoid that.





-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Insert sql

2010-07-13 Thread Mathieu Comandon
if it's not the sql generated by symfony, there is no obvious way of
insert such files. I usually do this kind of thing with the mysql
command line program :
mysql -umyuser -pmypassword mydatabase  myfile.sql

If you want to be able to do this with symfony, you could create a new
task that runs a similar command.

On Jul 13, 1:10 pm, wueb webmaster@gmail.com wrote:
 Hello,

 i have some sql lines in a file.

 i need the inserts from that sql be created by symfony in order to
 execute the code i made on the models from each table.

 how can i execute that sql in symfony?

 thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfEasyGMapPlugin: Mulitple maps on one page

2010-07-13 Thread Mathieu Comandon
Indeed, it's better not to create yet another parameter in order to
instantiate the map.
Automatically generating the initialize function name is a better idea
than what I've done.

I've never instanciated the same map several times and I don't know
why someone would want to
do such a thing. I'm ok with auto-generating js_name.

Mathieu

On Jul 12, 4:51 pm, Fabrice Bernhard fabri...@theodo.fr wrote:
 Ok so this is actually a working strategy ? I will implement it and
 name the function initialize 'intiialize_'.$map_name by default so
 that users don't need to actually change this parameter unless they
 need to.

 Concerning the javascript_name of the map, one soulution could be to
 generate automatically a new one for every new instance :

 'map', 'map1', 'map2', etc.

 Do you people actually instanciate many times the same map or not ?

 Fabrice

 On Jul 11, 5:19 pm, Mathieu Comandon stryc...@gmail.com wrote:

  I've submitted a quick n'dirty patch on the plugin's bugtracker, for
  those who want to integrate it manually, here's what it looks like :

  --

  --- GMap.class.php
  +++ GMap.class.php2
  @@ -87,6 +87,7 @@
     protected $parameters = array(
         'js_name' = 'map',
         'onload_method' = 'js',
  +      'init_function' = 'initialize',
         'api_keys' = null
     );

  @@ -298,6 +299,12 @@
     {

       return $this-parameters['js_name'];
  +  }
  +
  +
  +  public function getInitFunction()
  +  {
  +      return $this-parameters['init_function'];
     }

     /**
  @@ -394,14 +401,15 @@
       switch ($this-parameters['onload_method'])
       {
         case 'jQuery':
  -        return 'jQuery(document).ready(function(){initialize();});';
  +      case 'jquery':
  +        return 'jQuery(document).ready(function(){' . 
  $this-getInitFunction() . '();});';

           break;
         case 'prototype':
  -        return 'document.observe(dom:loaded, function()
  {initialize();});';
  +        return 'document.observe(dom:loaded, function(){' . 
  $this-getInitFunction() . '();});';

           break;
         default:
         case 'js':
  -        return 'window.onload = function(){initialize()};';
  +        return 'window.onload = function(){' . $this-getInitFunction() . 
  '()};';

           break;
       }
     }
  @@ -443,7 +451,7 @@
       }
       $return .= '
     //  Call this function when the page has been loaded
  -  function initialize()
  +  function ' . $this-getInitFunction() . '()
     {';
       foreach($init_events as $init_event)
       {

  --

  It currently only works with the jQuery onload method, you'll have to
  instantiate your maps like this :

  $this-gMap = new GMap(array(),array(),array('id' =
  'map1'),array('js_name' = 'map1', 'init_function' = 'init_map1',
  'onload_method' = 'jQuery'));

  $this-gMap_2 = new GMap(array(),array(),array('id' =
  'map2'),array('js_name' = 'map2', 'init_function' = 'init_map2',
  'onload_method' = 'jQuery'));



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony 2 - anything like grails?

2010-07-13 Thread Dennis Gearon
I have found several small problems with my approach below. I'm probably going 
to change it.

A/ Indexes on Postgres don't seem to get picked up via intrpospection
B/ The default value of NULL gets altered to NULL::var_type, which fails
C/ Doctrine bypasses the default value for columns with default values drawn 
from a sequence. It gets the value from the sequence itself, then issues the 
INSERTS. It also DOES NOT PUT THE DEFAULT VALUE INTO THE SQL FOR THE TABLE 
CREATION. This means that any non Doctrine SQL can break.

Probably C is not TOO much of an issue: I don't understand why it's that way 
though. Should be non coflicting to have the normal default value in the column 
defintion. Just have to remember to put nextval('column_name_seq'::regclass) in 
all SQL not part of the Doctrine package.

The indexes though, that's a deal breaker. I haven't looked into the code, but 
I can't imagine that Doctrine is trying to do the Unique indexes in PHP, 
because it has the defintion of indexes in it's capability.

Anyone else using a different database have problems with instropection of 
indexes, default values for sequences(or other default values)?

I wrote previously:
I'm not sure if I wrote it to this mail list or not.

I have found the easiest way to make a set of symfony model classes is:

A/ Use a GUI ERD (Entity Relationship Diagram) editor.
B/ Output the SQL for the target database, (AND the PDF or Image of the ERD)
C/ Make the database, a symfony project and its directory, and a 
databases.yml file
//in your $PROJECT directory do ...
E/ ./symfony doctrine:build-schema
F/ ./symfony doctrine:build-model
G/ ./symfony doctrine:build-forms
H/ ./symfony doctrine:build-filters
I/ ./symfony cc
J/ ./symfony doctrine:data-load
Dennis Gearon

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Routing problem for generate-admin with id: type string (128)...

2010-07-13 Thread Richtermeister
Take a look here:

http://www.codemassacre.com/2009/04/27/symfony-12-admin-with-custom-primary-key/

Daniel


On Jul 12, 9:06 am, PePe_el_Romano rolia...@gmail.com wrote:
 Good dear group:
 I am writing to see if someone has this same error occurred and has
 solved, or if they are aware of it.

 Problem description:
  For reasons of replicate Master - Master, which is necessary for my
 system the identifier for each table it must be a varchar to type
 name_value Zera_3 after generating modules to generate-admin, when I
 give a save or update to an item, I get the error, let them then gave
 me this error even for a show, for an edit, for each share of the
 module, with the Xdebug I realized that the problem was that
 routingColection generated for each module, and as an alternative, we
 create a new routing for every action I leave an example here too with
 sfGuardUser for
 edit action.

 routing.yml:
 sf_guard_user_edit:
   url: /sf_guard_user/:id/edit
   class: sfDoctrineRoute
   options:
     model:        sfGuardUser
     module:       sfGuardUser
     type:         object
     prefix_path:  sf_guard_user
     column:       id
   param: { module: sfGuardUser, action: edit}

 Error:
 Type: 404 | Not Found | sfError404Exception
 Action sf_guard_user/Zera_1 does not exist.
 stack trace

     * at ()
       in SF_ROOT_DIR\lib\vendor\symfony\lib\controller
 \sfController.class.php line 202 ...
              199.         $this-dispatcher-notify(new sfEvent($this,
 'application.log', array(sprintf('Action %s/%s does not exist',
 $moduleName, $actionName;
              200.       }
              201.
              202.       throw new sfError404Exception(sprintf('Action
 %s/%s does not exist.', $moduleName, $actionName));
              203.     }
              204.
              205.     // create an instance of the action
     * at sfController-forward('sf_guard_user', 'Zera_1')
       in SF_ROOT_DIR\lib\vendor\symfony\lib\controller
 \sfFrontWebController.class.php line 48 ...
               45.       }
               46.
               47.       // make the first request
               48.       $this-forward($moduleName, $actionName);
               49.     }
               50.     catch (sfException $e)
               51.     {
     * at sfFrontWebController-dispatch()
       in SF_ROOT_DIR\lib\vendor\symfony\lib\util\sfContext.class.php
 line 159 ...
              156.    */
              157.   public function dispatch()
              158.   {
              159.     $this-getController()-dispatch();
              160.   }
              161.
              162.   /**
     * at sfContext-dispatch()
       in SF_ROOT_DIR\web\administracion_dev.php line 13 ...
               10. require_once(dirname(__FILE__).'/../config/
 ProjectConfiguration.class.php');
               11.
               12. $configuration =
 ProjectConfiguration::getApplicationConfiguration('administracion',
 'dev', true);
               13. sfContext::createInstance($configuration)-

 dispatch();

 Greetings Rolian.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Need help with Doctrine migration

2010-07-13 Thread Joe
Hey everyone,

I am maintaining a Symfony 1.4 application. I need to add a column to
an existing table in production database. I am trying to use Doctrine
migration ability to do so.

My first command was:
php symfony doctrine:generate-migrations-db.

I get the error: Could not generate migration classes from database



I then tried to generate my own migration class:
php symfony doctrine:generate-migration AddMymoduleMyfield

Class was generated as well as 91 others that re-create my complete
database (isn't this supposed to be the result of the first command ?)
Problem is, as soon as I launch:
php symfony doctrine:migrate

Here's the output I get:

 doctrine  Migrating from version 1 to 92

I then get error saying that table already exists. So I gather
migration is going to try to recreate databases from start, and
PostgreSQL returning 'already exists' error.

Simply put, is there a way to ask Symfony to migrate from version 91
to 92 (instead of 1 to 92) ??

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Need help with Doctrine migration

2010-07-13 Thread Georg
Hi Joe,

for me this works really well:
add the column to the table in schema.yml
DO NOT ./symfony doctrine:build --all-classes
BUT
./symfony doctrine:generate-migrations-diff
AND NOW ./symfony doctrine:build --all-classes

Now you should be able to run
./symfony doctrine:migrate

BTW: Delete all old migration files before doing this. And you db user
needs the rights to add tables the first time you run migrations.

HTH

PS: The migration files name's start with a timestamp. From this
timestamp doctrine determines in which order to run the migrations (if
you have more than one migration file), and which version of the
database. The first time when you run a migration, doctrine creates a
table migration_version where it keeps the database's version.


Am 13.07.2010 17:22, schrieb Joe:
 Hey everyone,
 
 I am maintaining a Symfony 1.4 application. I need to add a column to
 an existing table in production database. I am trying to use Doctrine
 migration ability to do so.
 
 My first command was:
 php symfony doctrine:generate-migrations-db.
 
 I get the error: Could not generate migration classes from database
 
 
 
 I then tried to generate my own migration class:
 php symfony doctrine:generate-migration AddMymoduleMyfield
 
 Class was generated as well as 91 others that re-create my complete
 database (isn't this supposed to be the result of the first command ?)
 Problem is, as soon as I launch:
 php symfony doctrine:migrate
 
 Here's the output I get:
 
 doctrine  Migrating from version 1 to 92
 
 I then get error saying that table already exists. So I gather
 migration is going to try to recreate databases from start, and
 PostgreSQL returning 'already exists' error.
 
 Simply put, is there a way to ask Symfony to migrate from version 91
 to 92 (instead of 1 to 92) ??
 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: symfony and Eclipse: I can not go to the function or class using F3.

2010-07-13 Thread Javier Garcia
Anyway, now i have this:

  public function executeShow(sfWebRequest $request)
  {
$this-usuario = $this-getRoute()-getObject();

When i try to go to the getObject()'s definition (F3), it doesn't
works (just don't do anything).

I right clicked on the symfony folder (now it is named lib/vendor/
symfony), and Build PathUse as source folder.

Any idea?


On Jul 12, 2:41 pm, Javier Garcia tirengar...@gmail.com wrote:
 Thanks! works!

 On 07/12/2010 01:47 PM, St�phane wrote:



  Right click on the folder and Build PathUse as source folder

  Before Printing, Think about Your Environmental Responsibility!
  Avant d'Imprimer, Pensez � Votre Responsabilit�e Environnementale!

  On Mon, Jul 12, 2010 at 1:43 PM, Javier Garcia tirengar...@gmail.com
  mailto:tirengar...@gmail.com wrote:

      On 07/11/2010 05:58 PM, St�phane wrote:

          Hi,

          Check that your lib folders are source folders.

      Thanks, but how can i check that?

      On 07/11/2010 06:49 PM, Mariano Sola wrote:

          sorry for the question, but why using eclipse?

      I tried NB but when i wanted to go the declaration of a method, it
      shows the list of the methods of all the classes with that name of
      the function, so it's not being aware of the class of the object
      that calls the method. Eclipse go directly to the method Im calling.

      --
      If you want to report a vulnerability issue on symfony, please
      send it to security at symfony-project.com
      http://symfony-project.com

      You received this message because you are subscribed to the Google
      Groups symfony users group.
      To post to this group, send email to
      symfony-users@googlegroups.com mailto:symfony-users@googlegroups.com
      To unsubscribe from this group, send email to
      symfony-users+unsubscr...@googlegroups.com
      mailto:symfony-users%2bunsubscr...@googlegroups.com
      For more options, visit this group at
     http://groups.google.com/group/symfony-users?hl=en

  --
  If you want to report a vulnerability issue on symfony, please send it
  to security at symfony-project.com

  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Javi

 Ubuntu 8.04 - Symfony 1.3

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Tutorial - Day 3 - Doctrine_Connection_Sqlite_Exception

2010-07-13 Thread czaku
This is the error I get...

500 | Internal Server Error | Doctrine_Connection_Sqlite_Exception

SQLSTATE[HY000]: General error: 1 no such table: jobeet_job. Failing
Query: SELECT j.id AS j__id, j.category_id AS j__category_id, j.type
AS j__type, j.company AS j__company, j.logo AS j__logo, j.url AS
j__url, j.position AS j__position, j.location AS j__location,
j.description AS j__description, j.how_to_apply AS j__how_to_apply,
j.token AS j__token, j.is_public AS j__is_public, j.is_activated AS
j__is_activated, j.email AS j__email, j.expires_at AS j__expires_at,
j.created_at AS j__created_at, j.updated_at AS j__updated_at FROM
jobeet_job j


HELP ME :(

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: ALERT - possible memory corruption detected - unknown Hashtable destructor

2010-07-13 Thread Joost Faassen
Hello Mark,

We ran into a similar situation. For details, check
http://www.joost.cx/apc-unknown-hashtable-destructor/

In short: As soon as you create a static class property, and
initialize it to '=array()', the next time you assign something to
that property, you'll get a similar error as you have described above.
The simple solution is to pre-initialize that static property to
'null'.
We use APC in combination with XDEBUG too, but disabling XDEBUG did
not solve our problem.
You'll also find a link to a bugreport on APC on my site, and if I
find any further info/solution, I'll post it there.
Best regards,
Joost Faassen // www.joost.cx

On Jun 23, 3:49 pm, markh hamlinma...@googlemail.com wrote:
 ALERT - possible memory corruption detected - unknownHashtable
 destructor (attacker 'REMOTE_ADDR not set', file '/mnt/hgfs/src/snm-
 symfony/trunk/lib/vendor/symfony/lib/log/sfVarLogger.class.php', line
 169)

 I got this error running a symfony task.  Other tasks might terminate
 with same or a segfault.

 strace revealed this: send(4, 9suhosin[9752]: ALERT - possibl...,
 225, 0) = 225

 There are many reports of this and similar errors, with fixes
 involving suhosin.  But my problem was caused by something else
 entirely, XDebug.

 I fixed this by removing the following xdebug settings of death from
 the php.ini.

 xdebug.collect_return=1
 xdebug.collect_assignments=1
 xdebug.collect_params=1

 I'm guessing I could have left xdebug.collect_return, as I know from
 previous experience its assignments and params that usually cause
 problems.  But I'll leave that test for another day.

 Mark

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [admin generator]

2010-07-13 Thread osinet
I probe this example http://www.slideshare.net/jcleveley/working-with-
the-admin-generator slide number 39 and 40 and runs but the problem
is that the filter can be restored and see the complete list phone
numbers of all employees. How can I avoid the restoration of the
filter?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Question about object routing and slugging

2010-07-13 Thread Javier Garcia

Hi,

in order to not show the ID's of the members of my social network in the 
URL, I have created this route:


perfil_miembro:
  url: /miembros/:nombre_apellidos
  class: sfDoctrineRoute
  options: { model: Usuario, type: object}
  param: { module: miembros, action: show}

and added this line in the show action:

$this-usuario = $this-getRoute()-getObject();

It works ok: when i click on their names the corresponding profile is 
showed, and the URL is this type:


frontend_dev.php/miembros/Maria+de+Miguel+Alvarado


Now I would like to slug the names in the URL so i have changed the 
route this way:


perfil_miembro:
  url: /miembros/:nombre_apellidos_slug
  class: sfDoctrineRoute
  options: { model: Usuario, type: object}
  param: { module: miembros, action: show}


And i have created this methods:

public function getNombreApellidosSlug()
{

 return Tirengarfio::slugify($this-getNombreApellidos());
}

class Tirengarfio
{
  static public function slugify($text)
  {

// replace all non letters or digits by -
$text = preg_replace('/\W+/', '-', $text);

// trim and lowercase
$text = strtolower(trim($text, '-'));

return $text;
  }
}

Now when I click on the name of a member, this URL is showed:

frontend_dev.php/miembros/maria-de-miguel-alvarado

but it always shows the profile of the first member that i have in the 
fixtures file..


Any idea?

--
Javi

Ubuntu 8.04 - Symfony 1.3

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Question about object routing and slugging

2010-07-13 Thread Gábor Fási
The slug field needs to be a real column, not a virtual one that you created.
When the url is accessed, doctrine is looking for a single object
matching the fields found in the url - in your case, no fields, that's
why you see the very first record in your table. The query logger
should show something like select * from tablename limit 1;.

A note regarding your url: are you sure there will not be multiple
people with the same name? If such a collision occures, noone will be
able to see the 2nd, 3rd, etc. person's page.

On Tue, Jul 13, 2010 at 20:48, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 in order to not show the ID's of the members of my social network in the
 URL, I have created this route:

 perfil_miembro:
  url: /miembros/:nombre_apellidos
  class: sfDoctrineRoute
  options: { model: Usuario, type: object}
  param: { module: miembros, action: show}

 and added this line in the show action:

 $this-usuario = $this-getRoute()-getObject();

 It works ok: when i click on their names the corresponding profile is
 showed, and the URL is this type:

 frontend_dev.php/miembros/Maria+de+Miguel+Alvarado


 Now I would like to slug the names in the URL so i have changed the route
 this way:

 perfil_miembro:
  url: /miembros/:nombre_apellidos_slug
  class: sfDoctrineRoute
  options: { model: Usuario, type: object}
  param: { module: miembros, action: show}


 And i have created this methods:

 public function getNombreApellidosSlug()
 {

     return Tirengarfio::slugify($this-getNombreApellidos());
 }

 class Tirengarfio
 {
  static public function slugify($text)
  {

    // replace all non letters or digits by -
    $text = preg_replace('/\W+/', '-', $text);

    // trim and lowercase
    $text = strtolower(trim($text, '-'));

    return $text;
  }
 }

 Now when I click on the name of a member, this URL is showed:

 frontend_dev.php/miembros/maria-de-miguel-alvarado

 but it always shows the profile of the first member that i have in the
 fixtures file..

 Any idea?

 --
 Javi

 Ubuntu 8.04 - Symfony 1.3

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Custom routing config handler broken ...

2010-07-13 Thread Dan Leech
Hi

I am trying to implement an XML navigation map which also contains all
the routing information for the app,
I have created the config handler below and changed factories.yml to
use a custom routing class which extends sfPatternRouting. Both listed
below, also the generated route cache file.

The routes seem to get loaded OK, but I get the error

  Empty module and/or action after parsing the URL / (/).

Im not too sure what that signifies, can anybody spot what I am not doing right?

Cheers

dan.



class gwProjectRouting extends sfPatternRouting
{
  protected function getConfigFileName()
  {
return 
sfContext::getInstance()-getConfigCache()-checkConfig('config/navtree.xml',
true);
  }
}

class gwProjectRoutingConfigHandler extends sfConfigHandler
{
  public function execute($configFiles)
  {
$options = $this-getOptions();
unset($options['cache']);

$dom = new DOMDocument(1.0);
$dom - load($configFiles[0]);

$xpath = new DOMXpath($dom);
foreach ($xpath - query('//node') as $i = $node)
{
  if ($url = $node - getAttribute('url'))
  {
$params = array();
if ($node - hasAttribute('module'))
{
  $params['module'] = $node - getAttribute('module');
}

if ($node - hasAttribute('action'))
{
  $params['action'] = $node - getAttribute('action');
}

foreach ($xpath - query('./param') as $param)
{
  $params[$param - getAttribute('name')] = $param -
getAttribute('value');
}

$route_name = $node - hasAttribute('name') ? $node -
getAttribute('name') : $i;

$data[] = sprintf('$this - routes[%s] = new %s(%s,%s);',
  $route_name, 'sfRoute', $url, var_export($params, true));
$data[] = sprintf('$this - routes[%s] - setDefaultOptions(%s);',
  $route_name, var_export($options, true));
$data[] = sprintf('$this - routes[%s] - compile();', $route_name);
  }
}

$code = implode(\n, $data);

return sprintf(?php\n.
   // auto-generated by gwProjectRoutingConfigHandler\n.
   // date: %s\n%s\n, date('Y/m/d H:i:s'), $code );
  }

  protected function getOptions()
  {
$config = 
sfFactoryConfigHandler::getConfiguration(sfContext::getInstance()-getConfiguration()-getConfigPaths('config/factories.yml'));
return $config['routing']['param'];
  }
}

?php
// auto-generated by gwProjectRoutingConfigHandler
// date: 2010/07/14 00:37:15
$this - routes[default] = new sfRoute(/:module/:action,array (
));
$this - routes[default] - setDefaultOptions(array (
  'load_configuration' = true,
  'suffix' = '',
  'default_module' = 'default',
  'default_action' = 'index',
  'debug' = '1',
  'logging' = '1',
  'generate_shortest_url' = true,
  'extra_parameters_as_query_string' = true,
));
$this - routes[default] - compile();
$this - routes[2] = new sfRoute(/audit,array (
  'module' = 'gwProjectAuditLog',
  'action' = 'list',
));
$this - routes[2] - setDefaultOptions(array (
  'load_configuration' = true,
  'suffix' = '',
  'default_module' = 'default',
  'default_action' = 'index',
  'debug' = '1',
  'logging' = '1',
  'generate_shortest_url' = true,
  'extra_parameters_as_query_string' = true,
));
$this - routes[2] - compile();
$this - routes[3] = new sfRoute(/audit/:id,array (
  'module' = 'gwProjectAuditLog',
  'action' = 'edit',
));
$this - routes[3] - setDefaultOptions(array (
  'load_configuration' = true,
  'suffix' = '',
  'default_module' = 'default',
  'default_action' = 'index',
  'debug' = '1',
  'logging' = '1',
  'generate_shortest_url' = true,
  'extra_parameters_as_query_string' = true,
));
$this - routes[3] - compile();
$this - routes[4] = new sfRoute(/profile,array (
  'module' = 'gwProjectUser',
  'action' = 'profile',
));
$this - routes[4] - setDefaultOptions(array (
  'load_configuration' = true,
  'suffix' = '',
  'default_module' = 'default',
  'default_action' = 'index',
  'debug' = '1',
  'logging' = '1',
  'generate_shortest_url' = true,
  'extra_parameters_as_query_string' = true,
));
$this - routes[4] - compile();
$this - routes[5] = new sfRoute(/issues,array (
  'module' = 'gwProjectIssue',
  'action' = 'list',
));
$this - routes[5] - setDefaultOptions(array (
  'load_configuration' = true,
  'suffix' = '',
  'default_module' = 'default',
  'default_action' = 'index',
  'debug' = '1',
  'logging' = '1',
  'generate_shortest_url' = true,
  'extra_parameters_as_query_string' = true,
));
$this - routes[5] - compile();
$this - routes[6] = new sfRoute(/issue/:issue_number,array (
  'module' = 'gwProjectIssue',
  'action' = 'view',
));
$this - routes[6] - setDefaultOptions(array (
  'load_configuration' = true,
  'suffix' = '',
  'default_module' = 'default',
  'default_action' = 'index',
  'debug' = '1',
  'logging' = '1',
  'generate_shortest_url' = true,
  'extra_parameters_as_query_string' = true,
));
$this - routes[6] - compile();
$this - routes[7] = new 

Re: [symfony-users] Tutorial - Day 3 - Doctrine_Connection_Sqlite_Exception

2010-07-13 Thread Eno
On Tue, 13 Jul 2010, czaku wrote:

 This is the error I get...
 
 500 | Internal Server Error | Doctrine_Connection_Sqlite_Exception
 
 SQLSTATE[HY000]: General error: 1 no such table: jobeet_job. Failing
 Query: SELECT j.id AS j__id, j.category_id AS j__category_id, j.type
 AS j__type, j.company AS j__company, j.logo AS j__logo, j.url AS
 j__url, j.position AS j__position, j.location AS j__location,
 j.description AS j__description, j.how_to_apply AS j__how_to_apply,
 j.token AS j__token, j.is_public AS j__is_public, j.is_activated AS
 j__is_activated, j.email AS j__email, j.expires_at AS j__expires_at,
 j.created_at AS j__created_at, j.updated_at AS j__updated_at FROM
 jobeet_job j
 
 HELP ME :(

Looks self-explanatory: there is jobeet_job table in your database.



--


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en