Forums / Setup & design / PathPrefix and media and users folder problem

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).