PathPrefix and media and users folder problem

Author Message

Xavier Dutoit

Monday 16 January 2006 12:55:11 am

Hi all,

I have two websites that share the same users and media folders but that have different content.

What I did was to create to siteaccess (siteA and siteB) and two main folders under content siteA and SiteB.

All the content for the site a is under the siteA folder, same goes for site b.

To avoid having /sitea/thepage, I put into the siteA site.ini.append:

[SiteAccessSettings]
PathPrefix=siteA

Works great for all the content, but I can't access anymore the content into the media and users folder !

I guess that's because the PathPrefix also applies to /media (and it tries to look at /siteA/media). I've tried to cheat and add a location for the media folder and put it under siteA and SiteB, but it doesn't work (error message).

Is there a way to exclude media and users from the PathPrefix ? Any idea to solve it ?

Thanks in advance,

X+

http://www.sydesy.com

Christiane Kloss

Monday 06 March 2006 7:54:12 am

Hello Xavier,

I ran into the same problem...
Did you find a satisfactory solution?

Greetings
Christiane

Jean Gaudel

Tuesday 14 March 2006 8:34:38 am

Hi,

I've the same problem too.
Did you find a solution ?

Christiane Kloss

Wednesday 15 March 2006 5:48:23 am

Hi,

As I understand it in the meantime, there are two beginner-ways:

1. with pathprefix: niceurls for content, system-urls ( content/view/...) for media and user

2. without pathprefix: niceurls everywhere, but one more level in the url...

You could give your first-level folders a very short name, "a" for example, ...
or reorganize the folder-structure (like I did)

Or you have to do some scripting...
;-))

Greets Christiane

Xavier Dutoit

Wednesday 15 March 2006 6:24:30 am

Hi,

That's what I did: I overrided a few classes display in the sections user and media. Now, instead of using node.nice_url it uses content/view/full/{$node.node_id}

That's not very elegant, but it works.

X+

http://www.sydesy.com

André R.

Tuesday 21 March 2006 11:51:48 am

Hi Xavier,

I've been playing around with PathPrefix myself latly, and found out that my code for producing bradcrumb and title does not take this into account.

{foreach $module_result.path as $pathindex => $item}
	{if gt($pathindex, 1)}
    {if $item.url}
        {if is_set($item.url_alias)}
            <a href={$item.url_alias|ezurl}>{$item.text|wash}</a> /
        {else}
            <a href={$item.url|ezurl}>{$item.text|wash}</a> /
        {/if}
    {else}
		{if gt($pathindex, 2)}
	        {$item.text|wash}
		{/if}
    {/if}
	{/if}
{/foreach}

Have you encountered the same thing ?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Xavier Dutoit

Tuesday 21 March 2006 11:58:06 am

Hi,

I filed a bug report, and it's been confirmed. Hopefully that's going to be fixed soon...

http://ez.no/bugs/view/8003

http://www.sydesy.com

Xavier Dutoit

Tuesday 21 March 2006 12:01:02 pm

@André R.

What version of ez do you use ?

I have to admit I never use ezurl anymore, as all my sites are with mod_rewrite.

I simply do href="/{$node.url_alias}" as I've had problem in the past (read 3.1 or 3.2) with intempestive index.php that where added here and there.

Bad habit dies hard ;)

X+

http://www.sydesy.com

André R.

Friday 24 March 2006 6:29:28 am

I'm using 3.7.5svn 23.03.06

take a look here:
http://bisv.sbio.no/stillinger/dnb_nor_markets_aksjehandel_analyseassitent

PathPrefix=ekstern/bisv/

see the url for the "Bisv /" link, so seems the problem is only for links to the "root" of the given siteaccess

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Valentin Doroschuk

Wednesday 05 July 2006 3:07:48 am

Fixed in
3.6.9 (stable/3.6 rev. 16344),
3.7.7 (stable/3.7 rev. 16343),
3.8.2 (stable/3.8 rev. 16345),
3.9.0alpha1 (trunk rev. 16346).

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

Main resources:

Total runtime1.0277 sec
Peak memory usage4,096.0000 KB
Database Queries84

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 595.2578152.6406
Module start 'layout' 0.00520.0053 747.898439.4766
Module start 'content' 0.01051.0159 787.3750749.9063
Module end 'content' 1.02640.0013 1,537.281324.1250
Script end 1.0277  1,561.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4063160.0003
Check MTime0.00180.1784160.0001
Mysql Total
Database connection0.00070.070710.0007
Mysqli_queries0.916289.1467840.0109
Looping result0.00080.0776820.0000
Template Total0.970494.420.4852
Template load0.00240.232520.0012
Template processing0.968094.190120.4840
Template load and register function0.00010.009610.0001
states
state_id_array0.00400.387310.0040
state_identifier_array0.00150.145120.0007
Override
Cache load0.00230.2241780.0000
Sytem overhead
Fetch class attribute can translate value0.00070.064350.0001
Fetch class attribute name0.00310.3037140.0002
XML
Image XML parsing0.01331.295750.0027
class_abstraction
Instantiating content class attribute0.00000.0038190.0000
General
dbfile0.01271.2384340.0004
String conversion0.00000.001040.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
9content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
8content/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: 52
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs