policy limitation by subtree AND node

Author Message

Sebastiaan van der Vliet

Friday 27 August 2010 6:24:26 am

The function "policyLimitationFilterQuery" in 2.1.0-final does not know how to deal with policies that include both subtree and node restrictions for content read. It combines both using "AND", which returns no results, but "OR" does. I can change the following on line 1425:

if ( count( $filterQueryPolicyLimitations ) > 0 )
            {
                $filterQueryPolicies[] = '( ' . implode( ' AND ', $filterQueryPolicyLimitations ) . ')';
            }

to:

if ( count( $filterQueryPolicyLimitations ) > 0 )
            {
                $filterQueryPolicies[] = '( ' . implode( ' OR ', $filterQueryPolicyLimitations ) . ')';
            }

but that solution is only good for testing. Any suggestions on how to fix this?

Thanks in advance.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

Paul Borgermans

Friday 27 August 2010 8:15:46 am

Its a known bug, and the solution a tad more complex. I have it on my todo list for eZ Find 2.3.

Cheers

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Sebastiaan van der Vliet

Friday 27 August 2010 8:19:24 am

Thanks Paul.

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

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 18 2025 05:22:06
Script start
Timing: Jan 18 2025 05:22:06
Module start 'layout'
Timing: Jan 18 2025 05:22:06
Module start 'content'
Timing: Jan 18 2025 05:22:06
Module end 'content'
Timing: Jan 18 2025 05:22:06
Script end

Main resources:

Total runtime0.0217 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.1953152.6406
Module start 'layout' 0.00710.0064 741.835939.4766
Module start 'content' 0.01350.0061 781.312590.4453
Module end 'content' 0.01960.0021 871.757834.3047
Script end 0.0216  906.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.1695140.0002
Check MTime0.00115.1272140.0001
Mysql Total
Database connection0.00114.909410.0011
Mysqli_queries0.006228.771930.0021
Looping result0.00000.203510.0000
Template Total0.00167.410.0016
Template load0.00094.037010.0009
Template processing0.00073.316510.0007
Override
Cache load0.00062.748910.0006
General
dbfile0.00062.648880.0001
String conversion0.00000.046240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs