content fails when user logged in

Author Message

Matthew Carroll

Wednesday 17 May 2006 9:31:43 am

i'm seeing what may be a bug, but i'm having trouble narrowing it down at all and would appreciate any help / ideas. it seems that when some users are logged in the content fails to be fetched. php gives a warning at this line in ezcontentobjecttreenode.php:

$sqlPartPart[] = 'ezcontentobject.contentclass_id in (' . implode( ', ', $limitationArray[$ident] ) . ')';

...consequently causing lots of errors in the sql queries:

Warning: PHP  	May 17 2006 16:47:53

implode(): Bad arguments. in /home/gv/public_html/ezsvn/kernel/classes/ezcontentobjecttreenode.php on line 1443

Error: eZMySQLDB 	May 17 2006 16:47:53

Query error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near ')) OR (ezcontentobject.section_id in (36)) OR (ezcontentobject.. Query: SELECT ezcontentobject.*,
                       ezcontentobject_tree.*,
                       ezcontentclass.name as class_name,
                       ezcontentclass.identifier as class_identifier
                       
                       , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                   FROM
                      ezcontentobject_tree,
                      ezcontentobject,ezcontentclass
                      , ezcontentobject_name 
                      
                      
                      
                   WHERE
                       path_string like '/1/43/1102/%' and  depth = 3  and  
                      
                      
                      
                      ezcontentclass.version=0 AND
                      
                      ezcontentobject_tree.contentobject_id = ezcontentobject.id  AND
                      ezcontentclass.id = ezcontentobject.contentclass_id AND
                      
                      
                       ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                                   ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                                   ezcontentobject_name.content_translation = 'eng-GB' 
                      AND ezcontentobject_tree.is_invisible = 0
                       AND ((ezcontentobject.section_id in (1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 6, 9)) OR (ezcontentobject.contentclass_id in ()) OR (ezcontentobject.section_id in (36)) OR (ezcontentobject.section_id in (36))) 
                 ORDER BY  path_string ASC

...the really strange thing is that if i clear all caches it works ok for a while, then breaks again later. it seems to be dependent on which user is logged in. if i log in with a different account, or remain anonymous, then it works again, switch back to the other account and it breaks.

any ideas?

thanks
matthew

http://carroll.org.uk

Matthew Carroll

Sunday 21 May 2006 10:12:04 am

Hmmm, looks like the issue was caused by multiple locations for the same user meaning the same access permissions were assigned twice to the user. The site is running the latest svn 3.6, so I'll see if I can reproduce on 3.8 later. Strange bug.

http://carroll.org.uk

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:21:34
Script start
Timing: Jan 19 2025 03:21:34
Module start 'layout'
Timing: Jan 19 2025 03:21:34
Module start 'content'
Timing: Jan 19 2025 03:21:35
Module end 'content'
Timing: Jan 19 2025 03:21:35
Script end

Main resources:

Total runtime1.2851 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.1797152.6250
Module start 'layout' 0.00490.0024 741.804739.4453
Module start 'content' 0.00731.2762 781.2500494.1641
Module end 'content' 1.28350.0015 1,275.414112.1563
Script end 1.2850  1,287.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2612160.0002
Check MTime0.00150.1130160.0001
Mysql Total
Database connection0.00090.067410.0009
Mysqli_queries1.238596.3777520.0238
Looping result0.00050.0396500.0000
Template Total1.258998.020.6294
Template load0.00200.159020.0010
Template processing1.256897.802320.6284
Template load and register function0.00010.010710.0001
states
state_id_array0.00070.052310.0007
state_identifier_array0.00100.079920.0005
Override
Cache load0.00170.1304150.0001
Sytem overhead
Fetch class attribute can translate value0.00210.159910.0021
Fetch class attribute name0.00190.145130.0006
XML
Image XML parsing0.00170.134010.0017
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00200.1572160.0001
String conversion0.00000.000440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs