eZ Community » Forums » General » ezURL returning links with "//" when...
expandshrink

ezURL returning links with "//" when removing default access.

ezURL returning links with "//" when removing default access.

Monday 11 March 2013 1:44:15 am - 3 replies

Hi,

I'm running a standalone install of the legacy stack of 2013.1 and have found that ezURL() is returning url's with "//" in them when you enable

[SiteAccessSettings]
RemoveSiteAccessIfDefaultAccess=enabled 

I have ended up hacking ezuri.php and placing

$href = str_replace('//', '/', $href);

On line 633.

I don't like hacking into core files like that though. Is there something I am missing here?

Monday 11 March 2013 2:04:37 am

Hello Daniel,

Can you  include how ezurl() is being used in your override template and an example of your malformed url? 

Regards,
Duffy 

Modified on Monday 11 March 2013 6:55:08 am by Duffy Walsh

Monday 11 March 2013 3:09:31 am

Hi Duffy,

It's all url's on the site. Here's an example of the link in my nav.

<a {if eq( $ui_context, 'browse' )}href={concat("content/browse/", $node.node_id)|ezurl}{else}href={$node.url_alias|ezurl}{/if}{if $is_edit} onclick="return false;"{/if} title="{$node.name|wash()}" rel={$node.url_alias|ezurl}>{$node.name|wash()}</a> 

An example of what's happening is:

I've got the SiteURL setting with no trailing slash.

I've never had the problem before up until the last 2 sites i've been working on.

Cheers,
Dan 

Modified on Monday 11 March 2013 3:11:24 am by Daniel Clements

Monday 18 March 2013 3:49:09 am

Hi all,

I've further found this to be an issue on a clean stand alone install of 2012.11

I have installed it using just the ezpublish_legacy stack and there is no ezp 5 kernel installed.

I've found this to be an issue on 2012.11 and 2013.1

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from