[symfony-users] Strange Pager Problem...

2007-09-22 Thread Jonathan Franks

I'm having a strange problem with the sfpropelpager. I'm getting the 
right results but the wrong result count.

Using the debug tool bar, I can see the database query that is being 
made

SELECT (various columns)
FROM holloware_item, maker, status, holloware_type, material, town
WHERE holloware_item.SHOP=1 AND holloware_item.PUBLISHED=1 AND 
holloware_type.NAME='Animals' AND holloware_item.MAKER_ID=maker.ID AND 
holloware_item.STATUS_ID=status.ID AND 
holloware_item.TYPE_ID=holloware_type.ID AND 
holloware_item.MATERIAL_ID=material.ID AND holloware_item.TOWN_ID=town.ID
ORDER BY holloware_item.PRICE ASC LIMIT 20

If I run the query directly through mysql, I get the expected resultset 
which in this case has 74 results. However, $pager-getNbResults() 
returns a count of 1050 objects. $pager-getLinks(), returns links for 
enough pages for 1050 results. If I navigate through the pages, I see 
the expected results first and then I just get empty pages.

Any suggestions?? thanks // jonathan

--~--~-~--~~~---~--~~
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: Strange Pager Problem...

2007-09-22 Thread Fabian Lange

Hi,
It is highly likely that you have the wrong count method:
$pager-setPeerMethod('doSelectJoinUser');
$pager-setPeerCountMethod('doCountJoinUser');

Most likely you haven't specified the count method at all.
By doing so your join in the critera gets executed but not for counting how
many items you get :)

Should be easy to fix. If you cannot figure out this yourself, please paste
the php code
.: Fabian

-Original Message-
From:
[EMAIL PROTECTED]
om
[mailto:[EMAIL PROTECTED]
groups.com] On Behalf Of Jonathan Franks
Sent: Samstag, 22. September 2007 13:58
To: symfony-users@googlegroups.com
Subject: [symfony-users] Strange Pager Problem...


I'm having a strange problem with the sfpropelpager. I'm getting the 
right results but the wrong result count.

Using the debug tool bar, I can see the database query that is being 
made

SELECT (various columns)
FROM holloware_item, maker, status, holloware_type, material, town
WHERE holloware_item.SHOP=1 AND holloware_item.PUBLISHED=1 AND 
holloware_type.NAME='Animals' AND holloware_item.MAKER_ID=maker.ID AND 
holloware_item.STATUS_ID=status.ID AND 
holloware_item.TYPE_ID=holloware_type.ID AND 
holloware_item.MATERIAL_ID=material.ID AND holloware_item.TOWN_ID=town.ID
ORDER BY holloware_item.PRICE ASC LIMIT 20

If I run the query directly through mysql, I get the expected resultset 
which in this case has 74 results. However, $pager-getNbResults() 
returns a count of 1050 objects. $pager-getLinks(), returns links for 
enough pages for 1050 results. If I navigate through the pages, I see 
the expected results first and then I just get empty pages.

Any suggestions?? thanks // jonathan



--~--~-~--~~~---~--~~
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: After clearing cache, application always fail for the first time

2007-09-22 Thread Haris Zukanovic'

What was your large mem limit again?

Tamcy wrote:
 This morning the problem appears again suddenly, with the patched
 sfCompileConfigHandler
 and tokenizer enabled. I have to set memory limit to the old large
 value.

 On Sep 14, 11:06 am, Tamcy [EMAIL PROTECTED] wrote:
   
 Hi all,

 I'm sorry that I'm not able to help because my system admin had
 rebuilt the php yesterday and
 seems he enabled tokenizer support in this build, so even the
 unpatched code works. What an
 coincidence.

 Tamcy

 On Sep 13, 3:29 pm, noel guilbert [EMAIL PROTECTED] wrote:

 
 Hi,
   
 Fabien had just committed a patch 
 (http://trac.symfony-project.com/trac/changeset/5061), related to a similar
 issue discussed in the forum
 (http://www.symfony-project.com/forum/index.php/t/4167/
 ).
   
 Please, can you try it and tell us if it fixes the problem?
   
 If you don't use the /branches/1.0/ subversion repository, you can change
 the sfCompileConfigHandler.class.php by this one 
 here:http://trac.symfony-project.com/trac/browser/branches/1.0/li
 b/config/sfCompileConfigHandler.class.php?format=txt
 http://trac.symfony-project.com/trac/browser/branches/1.0/lib/config/...
   
 On 9/11/07, Haris Zukanovic' [EMAIL PROTECTED] wrote:
   
  What is the recommended mem size?
 
 Tamcy wrote:
 
 Dustin,
 
 Thank you very much. Disable strip_comments doesn't help,
 but increasing memory limit solves the problem :)
 
 Tamcy
 
 On Sep 7, 11:57 pm, Dustin Whittle [EMAIL PROTECTED]
 project.com [EMAIL PROTECTED] wrote:
 
  Tamcy,
 
 Increase memory limit or disable strip_comments in settings.yml
 , this issue is being worked on.
 
 - Dustin
 
 On 9/7/07 1:33 PM, Tamcy [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I found my Linux server always emitting a 500 internal server error
 (symfony decorated one) at the first request after clearing symfony
 cache (symfony cc), and goes away at the second. There isn't any
 significant problem, but this glitch doesn't make me feel good. This
 doesn't happen on my development machine, which makes me difficult to
 trace it out.
 
  There may be some hints - the error occurs on controllers with
 SF_DEBUG set to false. Another hint is, this is a symfony 1.0
 application migrated from 0.6 long time ago.
 
  Any suggestion on what may cause this happening?
 
  Thanks in advance.
 
  Tamcy
 
 --
 Haris Zukanovic
 CEO
 Software development and research
 International Business Development, SOFTING ltd.
 
 office  +387 36 318 339
 GSM +387 61 839 069
 
 http://www.eu-softing.com
 
 CONFIDENTIALITY NOTICE
 This e-mail and any attached files, sent by a company e - mail system, 
 contains company confidential and/or privileged information and is 
 intended only for the person or entity to which it is addressed and only 
 for the purposes therein set forth. If you are not the intended recipient 
 (or have received this e-mail in error) please notify the sender 
 immediately and destroy this e-mail. Any unauthorized copying, disclosure, 
 distribution or other use of, or taking of any action in reliance upon, 
 the material in this e-mail by persons or entities other than the intended 
 recipient is strictly forbidden.
 
 --
 Noel
   


 
   


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