Combining uri and host i matchorder

Author Message

Mads Ovesen

Tuesday 09 October 2007 7:32:22 am

Does anybody have experience in combining host and uri in siteaccesses? In the documentation under site.ini it is stated that the MatchOrder variable can take several matching types:

MatchOrder= match_type1[; match_type2]...

Lets imagine we want the following 3 siteaccess:
1) testsite.no (siteacces=test (host))
2) admin.testsite.no (siteaccess=admin (host))
3) testsite.no/front (siteacces=test (uri))

In the site.ini the following should be:

MatchOrder=uri;host
HostMatchType=map
HostMatchMapItems[]=testsite.no;test
HostMatchMapItems[]=admin.testsite.no;test
URIMatchType=map
URIMatchMapItems[]=front;test

Here are my thoughts:
uri must come before host, because in the last case (3) it must match the uri before the host. In all other cases there is no uri to match, so it must fall back to host. When I look at the function AccessType in access.php it iterates over the different matchorders. But if uri is the first element in this iteration (as in the example) it will always return with this siteaccess. It will return either in the switch statement in line 119 or after the switch statement in line 261 or line 266. In other words, the above example will never work. Is this a bug or did I misunderstand something?

/m

Mads Ovesen

Saturday 13 October 2007 5:56:02 am

I will report this as a bug then...

/m

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 00:12:05
Script start
Timing: Jan 19 2025 00:12:05
Module start 'layout'
Timing: Jan 19 2025 00:12:05
Module start 'content'
Timing: Jan 19 2025 00:12:05
Module end 'content'
Timing: Jan 19 2025 00:12:05
Script end

Main resources:

Total runtime0.6111 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 588.0313152.6406
Module start 'layout' 0.00490.0024 740.671939.4609
Module start 'content' 0.00730.6022 780.1328455.6953
Module end 'content' 0.60950.0015 1,235.82818.1563
Script end 0.6110  1,243.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5309160.0002
Check MTime0.00130.2052160.0001
Mysql Total
Database connection0.00060.105410.0006
Mysqli_queries0.564692.4013520.0109
Looping result0.00050.0739500.0000
Template Total0.585095.720.2925
Template load0.00200.324420.0010
Template processing0.583095.408820.2915
Template load and register function0.00030.043110.0003
states
state_id_array0.00090.145510.0009
state_identifier_array0.00070.110320.0003
Override
Cache load0.00160.2609150.0001
Sytem overhead
Fetch class attribute can translate value0.00070.112810.0007
Fetch class attribute name0.00180.289220.0009
XML
Image XML parsing0.00010.020410.0001
class_abstraction
Instantiating content class attribute0.00000.002020.0000
General
dbfile0.00200.3218100.0002
String conversion0.00000.001140.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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
2content/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: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs