Well it looks ike the error is with the seo_urls.php script but not sure where yet!
Tried a few things such as:
SEO URLS > OFF (All links on all pages/domains now follow normal oc structure.)
Turn on SEO Urls and it breaks again.
Links in the html are being shown as: <a href="://index.php/my-account">My Account</a> whereas working links show as <a href="http://www.domain.co.uk/shopping-cart">Shopping Cart</a> (On multistore domains the working links correctly show the current domain)
So... I can only assume the issue is somewhere in the seo_urls.php. I'll have a dig around and let you know if I come up with anything.
Tried a few things such as:
SEO URLS > OFF (All links on all pages/domains now follow normal oc structure.)
Turn on SEO Urls and it breaks again.
Links in the html are being shown as: <a href="://index.php/my-account">My Account</a> whereas working links show as <a href="http://www.domain.co.uk/shopping-cart">Shopping Cart</a> (On multistore domains the working links correctly show the current domain)
So... I can only assume the issue is somewhere in the seo_urls.php. I'll have a dig around and let you know if I come up with anything.
return $url_data['scheme'] . '://' . $url_data['host'] . (isset($url_data['port']) ? ':' . $url_data['port'] : '') . str_replace('/index.php', '', $url_data['path']) . $url . $query; is not returning the correct url for multistore sites on some links. eg:
http://www.domain.co.uk/wishlist
://index.php/my-account
http://www.domain.co.uk/shopping-cart
://index.php/checkout
Seems that $url_data['host'] is empty for only some links on multistore domains. Any ideas where that would be getting its data?
http://www.domain.co.uk/wishlist
://index.php/my-account
http://www.domain.co.uk/shopping-cart
://index.php/checkout
Seems that $url_data['host'] is empty for only some links on multistore domains. Any ideas where that would be getting its data?
The following line get it's data from $link
$url_data = parse_url(str_replace('&', '&', $link));
Now to find where link get's it's data from for the malformed url's on multi-stores
$url_data = parse_url(str_replace('&', '&', $link));
Now to find where link get's it's data from for the malformed url's on multi-stores
I've hacked together a quick fix which seems to work, so unless you see anything else I can live with it!
For info here's my change:
in seo_urls.php
Find:
And replace with:
Seems to work ok but i'm open to suggestions?
For info here's my change:
in seo_urls.php
Find:
Code: Select all
return $url_data['scheme'] . '://' . $url_data['host'] . (isset($url_data['port']) ? ':' . $url_data['port'] : '') . str_replace('/index.php', '', $url_data['path']) . $url . $query;
Code: Select all
if( false !== strpos( $url_data['path'], "/" ) ){
return $url_data['scheme'] . '://' . $url_data['host'] . (isset($url_data['port']) ? ':' . $url_data['port'] : '') . str_replace('/index.php', '', $url_data['path']) . $url . $query;
} else {
return 'http://' . $_SERVER["HTTP_HOST"] . str_replace('index.php', '', $url_data['path']) . $url . $query;
}
I was looking at something similar but dumped it due to being unable to determine which links should have https scheme like my account when viewed from a standard page
I am determined to find the root cause of this and will revisit on the morrow after catching some much needed zzzz's
I am determined to find the root cause of this and will revisit on the morrow after catching some much needed zzzz's
Yes, sorry I forgot to add that I dont use ssl so as $url_data['scheme'] was empty for those links I just hard coded it. All payments are taken offsite at processor so never felt need for one. Certainly doesn't seem to affect business.
I'd still be interested in finding out root cause so may play around bit more 2m evening. Will report back.
I'd still be interested in finding out root cause so may play around bit more 2m evening. Will report back.
I did also notice that in catalog/controller/common/header.php
the urls that dont work in seo_urls are actually constructed differently:
$this->data['account'] = $this->url->link('account/account', '', 'SSL'); = Doesn't rewrite
$this->data['account'] = $this->url->link('account/account'); = Does rewrite.
Any idea why this would be?
the urls that dont work in seo_urls are actually constructed differently:
$this->data['account'] = $this->url->link('account/account', '', 'SSL'); = Doesn't rewrite
$this->data['account'] = $this->url->link('account/account'); = Does rewrite.
Any idea why this would be?
Ok, decided to keep digging!
I changed the following code:
system>library>url.php
Changed:
public function link($route, $args = '', $connection = 'NONSSL') {
if ($connection == 'NONSSL') {
$url = $this->url;
} else {
$url = $this->ssl;
}
To:
public function link($route, $args = '', $connection = 'SSL') {
if ($connection == 'SSL') {
$url = $this->url;
} else {
$url = $this->ssl;
}
All urls now work on main domain and all multistores.
I changed the following code:
system>library>url.php
Changed:
public function link($route, $args = '', $connection = 'NONSSL') {
if ($connection == 'NONSSL') {
$url = $this->url;
} else {
$url = $this->ssl;
}
To:
public function link($route, $args = '', $connection = 'SSL') {
if ($connection == 'SSL') {
$url = $this->url;
} else {
$url = $this->ssl;
}
All urls now work on main domain and all multistores.
Who is online
Users browsing this forum: No registered users and 38 guests