[symfony-users] admin generator - sorting

2010-11-17 Thread qp
list:
title: Card Reloads
display: [=transaction_no, card_no, amount_received,
reload_fee, net_reload, reload_value, status]
sort: [ transaction_no, desc]
object_actions:
  #_edit: ~
  _edit: ~


I've set the configurations for the listing in the generator.yml as
above, but the sorting option is not working.


2. For virtual columns, the related labels are not sortable! i.e the
titles are inactive


Any pointers?

-- 
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] admin generator - sorting

2010-11-17 Thread Daniel Lohse
Hey there,

1. clear your cache, so the sort can take effect

2. Take a look at ahAdminGeneratorThemesPlugin


Cheers, Daniel

Sent from my iPhone4

On Nov 17, 2010, at 10:20 AM, qp quentin.p...@gmail.com wrote:

 list:
title: Card Reloads
display: [=transaction_no, card_no, amount_received,
 reload_fee, net_reload, reload_value, status]
sort: [ transaction_no, desc]
object_actions:
  #_edit: ~
  _edit: ~
 
 
 I've set the configurations for the listing in the generator.yml as
 above, but the sorting option is not working.
 
 
 2. For virtual columns, the related labels are not sortable! i.e the
 titles are inactive
 
 
 Any pointers?
 
 -- 
 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: admin generator - sorting

2010-11-17 Thread qp
Thanks Daniels, indeed it works.

Also for virtual columns, i realized i needed to configure the
original field name as opposed to the virtual field I had defined for
the same.



On Nov 17, 12:44 pm, Daniel Lohse annismcken...@googlemail.com
wrote:
 Hey there,

 1. clear your cache, so the sort can take effect

 2. Take a look at ahAdminGeneratorThemesPlugin

 Cheers, Daniel

 Sent from my iPhone4

 On Nov 17, 2010, at 10:20 AM, qp quentin.p...@gmail.com wrote:

  list:
         title: Card Reloads
         display: [=transaction_no, card_no, amount_received,
  reload_fee, net_reload, reload_value, status]
         sort: [ transaction_no, desc]
         object_actions:
           #_edit: ~
           _edit: ~

  I've set the configurations for the listing in the generator.yml as
  above, but the sorting option is not working.

  2. For virtual columns, the related labels are not sortable! i.e the
  titles are inactive

  Any pointers?

  --
  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] Admin generator - removing all delete links

2010-11-17 Thread Manu
Hello, I'm building some admin pages for a blog, and I would like to
prevent users from deleting things that have been posted.

I removed the delete link from the list page, but I just found out
that there is a delete link at the bottom of every edit page ... How
do I remove that one ?

-- 
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] umlaut not shown right

2010-11-17 Thread symfony
Hi guys,

In one of my modules letters with umlaut are shown incorrectly. #65533;
is shown where ė should be. In all other modules the umlaut is shown
correctly. How can I change this?

I'm trying to translate the pages from Dutch to English using i18n. Can I
use the HTML equivalent for the letters with umlaut? I've tried but the
text is not translated so if its possible, how can I do that?

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] How to disable the modules/action routes?

2010-11-17 Thread Javier Garcia
Hi,

how to disable the module/action routes? I mean i just want the
short routes work, for example www.mysite.com/login will work, but
www.mysite.com/sfGuardAuth/signin will not work.


Javi

-- 
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] How to disable the modules/action routes?

2010-11-17 Thread noel guilbert
Hi,

Just remove the default routes from the routing.yml file.

++

On Wed, Nov 17, 2010 at 11:36 AM, Javier Garcia tirengar...@gmail.comwrote:

 Hi,

 how to disable the module/action routes? I mean i just want the
 short routes work, for example www.mysite.com/login will work, but
 www.mysite.com/sfGuardAuth/signin will not work.


 Javi

 --
 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




-- 
Noël GUILBERT
http://www.noelguilbert.com/
Twitter : http://twitter.com/noelguilbert
http://www.sensiolabs.com
http://www.symfony-project.com
Sensio Labs
Tél: +33 1 40 99 80 80

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

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


Re: [symfony-users] Re: Symfony2 and Translation

2010-11-17 Thread noel guilbert
It does not work because you're trying to load the locale named en, which
is different of en_US or en_EN. That's why your translations are not
loaded. There's no such default locale thing that would load en when
en_US does not exist.

++


On Mon, Nov 15, 2010 at 7:21 PM, Bertrand Zuchuat
mailingl...@funstaff.chwrote:

 Hi,

 Thanks for your answer.

 This solution work but it's strange.

 Bertrand

 Le 15 nov. 2010 à 15:05, HTC a écrit :

  I had a similar issue and solve by renaming the translation files in
 
  messages.en_EN.php
  messages.de_DE.php
  messages.en_US.php
 
  but still don't know why it doesn't work with just '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




-- 
Noël GUILBERT
http://www.noelguilbert.com/
Twitter : http://twitter.com/noelguilbert
http://www.sensiolabs.com
http://www.symfony-project.com
Sensio Labs
Tél: +33 1 40 99 80 80

-- 
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] How to disable the modules/action routes?

2010-11-17 Thread Gareth McCumskey
But what if you have, for example, a module called blog with an action
called add and a module called comment with an action called add and a
module called author with an action called add?

On Wed, Nov 17, 2010 at 12:36 PM, Javier Garcia tirengar...@gmail.comwrote:

 Hi,

 how to disable the module/action routes? I mean i just want the
 short routes work, for example www.mysite.com/login will work, but
 www.mysite.com/sfGuardAuth/signin will not work.


 Javi

 --
 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




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
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] Task with DB access

2010-11-17 Thread Pierre-Yves LEBECQ
The database name you put as the argument of getDatabase method has to be
the name in the database.yml file, not the actual database name.

By default, it's doctrine or propel depending of the ORM you're using.




2010/11/16 man mixi mixi...@gmail.com

 When there is access to external systems, using a task that I want to
 log SymfonyDB access.

 When I execute There is no open connection that would have errors.
 What did you do wrong?

 >  $databaseManager = new sfDatabaseManager($this-configuration);
 >  $connection = $databaseManager-getDatabase('links')-
 getConnection();
 I tried to add code.
 But still error occurs.

 「 Database links does not exist.」
 links is correct DB name.



 C:\MyProject\linkphp symfony link:access user01 111.111.111.111

 #accessTask.class.php
 ?php

 class accessTask extends sfBaseTask
 {
 public function configure()
 {
 $this-namespace = 'link';
 $this-name = 'access';
 $this-addArgument('username', sfCommandArgument::OPTIONAL);
 $this-addArgument('ip', sfCommandArgument::OPTIONAL);
 }

 public function execute($arguments = array(), $options = array())
 {

 $access = new Accesslog();
 $access-setUsername($arguments['username']);
 $access-setIp($arguments['ip']);
 $access-save();
 $this-log('access from '. $arguments['ip']);
 }
 }

 --
 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] Re: Performances issues

2010-11-17 Thread Remi
AllowOverride was already set to none.
Database functionnality is set to off in settings.yml.

But I've tried to tweak some APC configuration keys with :
--
# Do not need to check for file changes : we only update them with a
new release deployed in another versionned directory
apc.stat=0
apc.file_update_protection=0
# I've tried it but, as expected, nothing changes
apc.optimization=2
# I check on on f our production server this morning and we had 497
files in cache
apc.num_files_hint=500
# Symfony is doing lots of include so it could be worth trying to
optimize this
apc.include_once_override=1
# We were at the limit of the 32 M (28 M used this morning). I've
increased it to 128M, just to be sure
apc.shm_size=128
-
I've also tried to check for large files but did not find any larger
than 1M.
This new configuration has ran for 3 hours now on one of our Apache
and it didn't change response time on it (we monitor closely : Apache
by Apache using some Nagios plugins)
I've also checked our APC version : we are using APC 3.0.19 with MMAP
memory method (which is recommended according to APC guidelines).

I didn't have time to try memcache over APC : it's not as easy as
adding some key into apc.ini and restart Apache :) Moreover, we have
some code that depends on APC and I have to check if it's easy to port
it to memcache (it should since it's supposed to use the sfCache
interface).

In the meantime, we have moved forward on our timer method and we
discovered that rendering templates took us about 200ms. Don't you
think this is huge ?
Thanks anyway !

Rémi

On Nov 16, 8:33 pm, pghoratiu pghora...@gmail.com wrote:
 On Nov 16, 7:17 pm, Remi remi.alv...@gmail.com wrote: - we don't use any 
 .htaccess file : everything goes directly to an
  httpd.conf

 =
 Also have
 AllowOverride none
 in apache config to not search for .htaccess files.

  - we don't use ORM since we don't use databases : only Webservices

 =
 Make sure you disable database functionality in the 
 settings.ymlhttp://www.symfony-project.org/reference/1_4/en/04-Settings#chapter_0...

  - how can I be sure that APC is well configured ? Do I have a way to
  easily check if APC is working well ?

 =
 APC stats are available in browser via some web pages generate by APC
 itself.

 The configuration key to change the max php file size within 
 APC:http://www.php.net/manual/en/apc.configuration.php#ini.apc.max-file-size
 by default is set to 1 M. Check in the cache dir if you have php files
 larger than 1M
 find . -type f -size +1000k
 If you have change the value of this key to something larger.

 Make sure you restart Apache after making the changes.

  - from what I heard, memcache and APC are not such different one from
  another in term of performances. Was it a crapy advice ? We are
  already using APC for the few objects we can store on cache.

 
 The two are different in the way they store the cache, where APC uses
 local SHM cache, Memcache uses
 a centralized model with a single server holding the cache. When using
 multiple machines having a single
 centralized cache (may) make more sense.

  - I thought that Symfony 2 was absolutly not ready for production
  environment ? Can we expect a huge performance increase (or decrease
  depending the side you are :) ) ?

 
 There are crazy people already using it for production, the trick is
 to use the stable parts of it :), and from what
 I understood you don't need the components that are not yet complete.
 According to the benchmarks published by Fabien it is faster than
 1.4.xhttp://symfony-reloaded.org/fast

 Do you use the routing component, that's one of the slowest when it
 comes to processing?

 My suggestion for you is to establish some baseline measurements to
 see where you are, what's the best performance that you can achieve:
 a. measure how many requests can you do when requesting a static web
 page
 b. measure the overhead of php processing -  have that page served by
 PHP (echo a template with symfony and separately by plain php)
 This way you can see if the overhead is with PHP, symfony or both.

 Realistically speaking a framework has quite an overhead compared to
 plain PHP so you can never achive the raw PHP speed with it.

 I remember reading somewhere about a presentation at the London
 Symfony Meetup on how to scale Symfony to process thousand requests
 per second, I don't remember the details, maybe some other member in
 this group can share more info about this.

     gabriel

-- 
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

[symfony-users] Re: Symfony2 and Translation

2010-11-17 Thread Florian
Yes there is.

When a translation does not exist for a locale, the translator tries
to find the translation for the language (fr when the locale is fr_FR
for instance); if it also fails, it looks for a translation for the
fallback locale.

quote from http://docs.symfony-reloaded.org/master/guides/translation.html

If your session.locale is en_EN, The waited behavior should load:
  - messages.en_EN.xml
  -  if not found messages.en.xml
  - and finally the default translatable.fallback

On 17 nov, 12:18, noel guilbert noelguilb...@gmail.com wrote:
 It does not work because you're trying to load the locale named en, which
 is different of en_US or en_EN. That's why your translations are not
 loaded. There's no such default locale thing that would load en when
 en_US does not exist.

 ++

 On Mon, Nov 15, 2010 at 7:21 PM, Bertrand Zuchuat
 mailingl...@funstaff.chwrote:









  Hi,

  Thanks for your answer.

  This solution work but it's strange.

  Bertrand

  Le 15 nov. 2010 à 15:05, HTC a écrit :

   I had a similar issue and solve by renaming the translation files in

   messages.en_EN.php
   messages.de_DE.php
   messages.en_US.php

   but still don't know why it doesn't work with just '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...@goog 
  legroups.com
  For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 Noël GUILBERThttp://www.noelguilbert.com/
 Twitter 
 :http://twitter.com/noelguilberthttp://www.sensiolabs.comhttp://www.symfony-project.com
 Sensio Labs
 Tél: +33 1 40 99 80 80

-- 
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] Doctrine Batch procesing

2010-11-17 Thread Luciano A. Andrade
I am using as I understand the doctrine equivalet of doSelectStmt (or
doSelectRS) witch is much more elegant in doctrine, but i get memory
leaks or memory that is not retorned to the OS, and not reused by PHP,
aparently this is corrected on Doctrine 2
http://www.doctrine-project.org/blog/doctrine2-batch-processing
but i can´t find an apropied solution for doctrine 1.2, Sadly it seams
like is not a doctrine bug, but a PHP bug trigered by doctrine use of
references.

2010/11/17 Gareth McCumskey gmccums...@gmail.com:
 This is ridiculous. You mean Doctrine has no resultset function? Using
 Propel you normally build your criteria for a query and then run a doSelect
 call which returns your hydrated array. BUT. There is a more memory
 efficient call (doSelectRS for Propel 1.2 and doSelectStmt for Propel 1.3
 and above) that essentially returns the resultset that you can while loop
 through to get your data. Using these calls we have been able to load up the
 results of 100's of thousands of rows from our DB at a time with minimal
 memory usage.
 Take a look at the doctrine documentation. There must be something!

 On Tue, Nov 16, 2010 at 10:56 PM, Luciano A. Andrade
 andrade.luci...@gmail.com wrote:

 Thanks Daniel for the response, i am using PHP 5.3.2-1ubuntu4.5 with
 Suhosin-Patch (cli) (built: Sep 17 2010 13:41:55), read some bug
 reports related to circula reference and the garbage colector, but
 they suld be fixed for 5.3.

 OnDemand hydration did't help, i am currently doing it, i am procesing
 batches of 100 objects inside a method and i can currently hold the
 objects but i only can call this method about 18 times until it run
 out of memory.

 Incresing memory of the server may be a valid option but is not
 sustentable, so i like to try other options.

 gc_collect_cycles may help a little but didn't change the situation.

 The only options is to implement a Fork/Subtask (Following the sample
 provided by Rich).

 It's a shame since i could do this on propel with any problem :(.

 2010/11/16 Daniel Lohse annismcken...@googlemail.com:
  That's unfortunate because you really have few options — I know because
  I've been there just this week.
 
  So, array hydration is out of the question, fine, let's see what other
  options you have:
 
  1. Increase memory of the server (sorry, but it's one option)
 
  2. Use the latest PHP 5.3.x and try to call gc_collect_cycles(); after
  each iteration — this will slow down your script some but could help.
  Unfortunately, while garbage collection has certainly improved with PHP 
  5.3,
  you can't rely on this because PHP is not forced to garbage collect and
  sometimes can't; tricky stuff.
 
  3. Fork another process after, say, 1000 objects. Each PHP process has
  its own memory limit. I know of one project that uses this — you'll have to
  go look for it, though. The update-search-index task of the Apostrophe CMS
  is using this technique to work around this problem, you can find the 
  source
  on svn.apostrophenow.org. Sorry for not being more specific. :(
 
  4. Only process a given amount of objects per call and work your way
  through the queue, flagging objects you've finished processing along the
  way.
 
  5. Try to use the OnDemand object hydrator and see if that helps.
 
  If you already tried all options I listed above (and failed ;-)), you'll
  need to tell us more about the process, about why they don't/won't work —
  maybe we can then come up with a solution.
 
 
  I feel your pain, cheers, Daniel
 
  Sent from my iPad
 
  On Nov 16, 2010, at 8:48 PM, Luciano A. Andrade
  andrade.luci...@gmail.com wrote:
 
  I am tyring to make a batch processing for synchronization of two
  databases, and i am running on limitation of the memory usage. I like
  to be able to process 3 objects, i can't use arrays for the
  hydration, since i have some logic i need to execute. I only need one
  of this object at any time, but it looks like theres no way to
  liberate the used objects, so memory usage grow rapidly. Any one has
  be able to free some memory, i am using
  $object-free(true);
  unset($object);
 
  so i run out of ideas. Any one?
 
  --
  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] Re: Performances issues

2010-11-17 Thread pghoratiu
 In the meantime, we have moved forward on our timer method and we
 discovered that rendering templates took us about 200ms. Don't you
 think this is huge ?
 Thanks anyway !
=
Does this include the time to wait for the XML data source?

On my dev machine it takes about 17 ms to process factories, 6 ms for
configuration so about 23 ms of overhead is always present.
For a simple page that is constructed by 5 db accesses it takes aprox.
5 ms to process the action and 65 ms to render the view and 100 ms to
render
the rest of the layout, components on the page, in total about 193 ms.
I think that 200 ms can be large but again depends on what code do you
have in the view.

Check out also this optimization flag, I did not try out myself, maybe
it helps you:
http://www.symfony-project.org/tutorial/1_4/en/whats-new#chapter_a2fae23c9403b0e9ec99806fccf6b53e_sub_project_optimize

You did not say anything about the routing, if you use it or not?
How do you share session information across machines?

I'm curious what you'll find to be the bottleneck :)

gabriel

-- 
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: Admin generator - removing all delete links

2010-11-17 Thread Massimiliano Arione
On 17 Nov, 11:24, Manu emmanuel.parf...@gmail.com wrote:
 I removed the delete link from the list page, but I just found out
 that there is a delete link at the bottom of every edit page ... How
 do I remove that one ?

Use generator.yml to hide delete actions (see docs)
Then, you should also override delete actions in your controller.

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: WkHtmlToPdf in Symfony

2010-11-17 Thread ming
Do you have tried SnappyBundle on Symfony2?
It give me this error:
Undefined property: appDevDebugProjectContainer::$snappyPdf

Probably I've missed some configuration parameters or setted it
wrongs.
I've downloaded and placed Snappy php5 lib on src/vendor dir as
reported in the Requirements section of the readme

## Requirements
You should have [Snappy](http://github.com/knplabs/snappy) (php5.3
branch) installed in your src/vendor dir and registered in your
autoload.

In my autoload.php
I've added:
'Snappy' = $vendorDir.'/snappy/src'
and also registered the Bundle in registerBundles method of my
AppKernel.php
new Bundle\SnappyBundle\SnappyBundle(),

wkhtmltopdf lib is correctly installed under my Ubuntu machine. I use
it without problem both from shell and from symfony 1.4 applications
too.


On 19 Ott, 09:25, Florian sideral.undergro...@gmail.com wrote:
 Hi,

 If you're talking of Symfony2, there is a bundle for that 
 :http://symfony2bundles.org/knplabs/SnappyBundle

 It uses the Snappy php5 lib, which is a wrapper for 
 wkhtml2pdf.http://github.com/knplabs/snappy

 On 19 oct, 09:03, fxsymfony fari...@gmail.com wrote:

  Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
  (in works on command line) but don't know how to use in Symfony to
  generate pdf files.



-- 
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: WkHtmlToPdf in Symfony

2010-11-17 Thread Florian
Seems like a DIC configuration problem.

You should open app/cache/dev/appDevDebugProjectContainer.php at line
mentionned and watch.

Maybe your app/config/config.yml doesn't load the extension:

snappy.image: ~
snappy.pdf: ~

Try to add these two lines in your config and see.

On Nov 17, 5:11 pm, ming minga...@gmail.com wrote:
 Do you have tried SnappyBundle on Symfony2?
 It give me this error:
 Undefined property: appDevDebugProjectContainer::$snappyPdf

 Probably I've missed some configuration parameters or setted it
 wrongs.
 I've downloaded and placed Snappy php5 lib on src/vendor dir as
 reported in the Requirements section of the readme

 ## Requirements
 You should have [Snappy](http://github.com/knplabs/snappy) (php5.3
 branch) installed in your src/vendor dir and registered in your
 autoload.

 In my autoload.php
 I've added:
 'Snappy'                         = $vendorDir.'/snappy/src'
 and also registered the Bundle in registerBundles method of my
 AppKernel.php
 new Bundle\SnappyBundle\SnappyBundle(),

 wkhtmltopdf lib is correctly installed under my Ubuntu machine. I use
 it without problem both from shell and from symfony 1.4 applications
 too.

 On 19 Ott, 09:25, Florian sideral.undergro...@gmail.com wrote:







  Hi,

  If you're talking of Symfony2, there is a bundle for that 
  :http://symfony2bundles.org/knplabs/SnappyBundle

  It uses the Snappy php5 lib, which is a wrapper for 
  wkhtml2pdf.http://github.com/knplabs/snappy

  On 19 oct, 09:03, fxsymfony fari...@gmail.com wrote:

   Has anyone used WkHtmlToPdf in Symfony? I have it set up on my server
   (in works on command line) but don't know how to use in Symfony to
   generate pdf files.

-- 
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: Performances issues

2010-11-17 Thread Remi
What I call rendering templates is only the view part of the MVC
model. Waiting for XML and reading them is definitly between Model
(beans) and Controler (actions and readers). But our templates are a
bit complex : depending on the offer size, we have 12 different main
templates to render an offer. And for each one, we need about 10
partials to render some common field on our offers.

I will have a closer look tomorrow at the project:optimize task. It
could be usefull even if IO does not seem to be the bottleneck (we
monitor them with some Nagios scripts and IO are not an issue for the
moment).

About the routing we are using it, using it a lot in fact ! But I've
added a timer inside the url_for method and it does not cost
anything at all. We already made the choice to reference routes by Id
and not module/action so it prevents Symfony to perform useless array
searches.

We don't share session across servers : we only save a few information
inside cookies and we try to have as few cookie as possible since they
are consuming some bandwidth and, so, some performances for our
customer. We are basically working with only two cookies : one for
storing an uniqueId (very usefull for statistics) and the other to
track the traffic source (SEO, SEM, spontaneous, partnership, ...). We
did the choice to be sessionless to avoid having to deal with sharing
sessions between servers (ort even datacenters) : it's costly and
often hard to maintain (even with a session warehouse).
Thanks again ! I think my next moves will be to : test XHProf, refine
my timer usage to track closely what happened in some costly
algorithms (like templates) and, finally, contact Sensio to discuss
about having an expert working with us for a few days. But I'll let
this last part to my CTO :)

Rémi

On 17 nov, 16:30, pghoratiu pghora...@gmail.com wrote:
  In the meantime, we have moved forward on our timer method and we
  discovered that rendering templates took us about 200ms. Don't you
  think this is huge ?
  Thanks anyway !

 =
 Does this include the time to wait for the XML data source?

 On my dev machine it takes about 17 ms to process factories, 6 ms for
 configuration so about 23 ms of overhead is always present.
 For a simple page that is constructed by 5 db accesses it takes aprox.
 5 ms to process the action and 65 ms to render the view and 100 ms to
 render
 the rest of the layout, components on the page, in total about 193 ms.
 I think that 200 ms can be large but again depends on what code do you
 have in the view.

 Check out also this optimization flag, I did not try out myself, maybe
 it helps 
 you:http://www.symfony-project.org/tutorial/1_4/en/whats-new#chapter_a2fa...

 You did not say anything about the routing, if you use it or not?
 How do you share session information across machines?

 I'm curious what you'll find to be the bottleneck :)

     gabriel

-- 
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] Loading fixtures in transaction ?

2010-11-17 Thread Mateusz Kaczmarek
Hello,

Is there a way to load fixtures in DBMS transaction ? When my fixtures
became more complicated time to load test data into database is quite
to long, and I think put all inserts into one transaction will resolve
that problem.

-- 
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: Multiple CREATE TABLE when generating SQL from a Doctrine model using Inheritance

2010-11-17 Thread kerdany
I seem to have found the problem on Doctrine's JIRA.
I'ts an unresolved issue: http://www.doctrine-project.org/jira/browse/DC-536

On Nov 16, 8:48 pm, kerdany kerd...@gmail.com wrote:
 Below are two schemas, these are simplified schemas where the problem
 occurs consistently:

 In summary:
 - Schema1: Class Entity is a base entity, ChildA   ChildB
 extend Entity, and there's a One to Many relation between ChildB
 and Other (Other has many ChildB).
 - Schema2: Class Entity is a base entity, ChildA   ChildB
 extend Entity

 Schema1:
 
 detect_relations: false
 Entity:
   columns:
     column_x: { type: string(255) }
 ChildA:
   inheritance: { extends: Entity, type: column_aggregation, keyField:
 type, keyValue: 1 }
   columns:
     column_a: { type: string(255) }
 ChildB:
   inheritance: { extends: Entity, type: column_aggregation, keyField:
 type, keyValue: 2 }
   columns:
     column_b: { type: string(255) }
     other_id: { type: integer, notnull: true }
   relations:
     other: { class: Other, local: other_id, foreign: id, foreignType:
 many, type: one }
 Other:
   columns:
     column_y: { type: string(255) }

 Generated SQL:
 #
 CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x`
 VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b`
 VARCHAR(255), `other_id` BIGINT NOT NULL, PRIMARY KEY(`id`)) ENGINE =
 INNODB;
 CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x`
 VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b`
 VARCHAR(255), `other_id` BIGINT NOT NULL, INDEX `other_id_idx`
 (`other_id`), PRIMARY KEY(`id`)) ENGINE = INNODB;
 CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x`
 VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b`
 VARCHAR(255), `other_id` BIGINT NOT NULL, INDEX `tbl_entity_type_idx`
 (`type`), PRIMARY KEY(`id`)) ENGINE = INNODB;
 CREATE TABLE `tbl_other` (`id` BIGINT AUTO_INCREMENT, `column_y`
 VARCHAR(255), PRIMARY KEY(`id`)) ENGINE = INNODB;
 ALTER TABLE `tbl_entity` ADD CONSTRAINT
 `tbl_entity_other_id_tbl_other_id` FOREIGN KEY (`other_id`) REFERENCES
 `tbl_other`(`id`);

 you'll find that tbl_entity has 3 CREATE TABLE statements.

 A simpler example goes as follows:

 Schema2:
 
 detect_relations: false
 Entity:
   columns:
     column_x: { type: string(255) }
 ChildA:
   inheritance: { extends: Entity, type: column_aggregation, keyField:
 type, keyValue: 1 }
   columns:
     column_a: { type: string(255) }
 ChildB:
   inheritance: { extends: Entity, type: column_aggregation, keyField:
 type, keyValue: 2 }
   columns:
     column_b: { type: string(255) }

 Generated SQL:
 #
 CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x`
 VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b`
 VARCHAR(255), PRIMARY KEY(`id`)) ENGINE = INNODB;
 CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x`
 VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b`
 VARCHAR(255), INDEX `tbl_entity_type_idx` (`type`), PRIMARY KEY(`id`))
 ENGINE = INNODB;

 you'll find that tbl_entity has 2 CREATE TABLE statements.

 On Nov 16, 1:19 pm, Alexandre Salomé alexandre.sal...@gmail.com
 wrote:







  Could you show us your schema ? Can be because of a misconfigured schema.

  2010/11/15 Hany El-Kerdanykerd...@gmail.com

   Dear All,

   I'm using inheritance in my Doctrine model (column_aggregation).
   When I generate the SQL from Models (using symfony's doctrine:generate
   --all), I find that there's a redundant CREATE TABLE statement (all for 
   the
   same table, since I'm using column_aggregation)..
   This seems like a bug to me, and running the generated SQL on a MySQL
   client like (Query Analyzer) generates an error when attempting to run the
   second CREATE TABLE statement.

   Is there a workaround for this? Should I perhaps create the SQL myself?

   --
   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...@goog
legroups.com
   For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en

  --
  Alexandre Saloméhttp://alexandre-salome.fr

-- 
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