Hi Mark,
Thanks for your reply. The broken link on http://www.ago.net/hands-on-centre/ is not due to an unpublished page. If you mouse over it you will see that the url is http://www.ago.net/hands-on-centre/weston-family-learning-centre/ but it should be http://www.ago.net/weston-family-learning-centre/. In some cases the alias is being appended to the end of the current alias which causes the page not found error. Changing it to <a href="/[~ID~]"> fixes it however in the case of this page http://www.ago.net/marina-abramovic-and-ulay-rest-energy, the specified link uses the </a><a href="[~ID~]"> syntax and it is resolving properly to the root of the site and is not broken.
The chart page is very odd in that it seems to alternate between working and not working. At the moment, all the links in the chart are not working for me. I had someone outside the office test yesterday and they were also broken for him.
Here is the code in the config.inc.php
// automatically assign base_path and base_url
if(empty($base_path)||empty($base_url)||$_REQUEST['base_path']||$_REQUEST['base_url']) {
$sapi= 'undefined';
if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
$script_name= $_SERVER['PHP_SELF'];
} else {
$script_name= $_SERVER['SCRIPT_NAME'];
}
$a= explode("/manager", str_replace("\\", "/", dirname($script_name)));
if (count($a) > 1)
array_pop($a);
$url= implode("manager", $a);
reset($a);
$a= explode("manager", str_replace("\\", "/", dirname(__FILE__)));
if (count($a) > 1)
array_pop($a);
$pth= implode("manager", $a);
unset ($a);
$base_url= $url . (substr($url, -1) != "/" ? "/" : "");
$base_path= $pth . (substr($pth, -1) != "/" && substr($pth, -1) != "\\" ? "/" : "");
}
// assign site_url
$site_url= ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? 'https://' : 'http://';
$site_url .= $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80)
$site_url= str_replace(':' . $_SERVER['SERVER_PORT'], '', $site_url); // remove port from HTTP_HOST
$site_url .= ($_SERVER['SERVER_PORT'] == 80 || (isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? '' : ':' . $_SERVER['SERVER_PORT'];
$site_url .= $base_url;
Any help you could provide is much appreciated.
Cristina</a>
Quote from: cmdias at May 02, 2013, 08:51 AMHi Mark,
Thanks for your reply. The broken link on http://www.ago.net/hands-on-centre/ is not due to an unpublished page. If you mouse over it you will see that the url is http://www.ago.net/hands-on-centre/weston-family-learning-centre/ but it should be http://www.ago.net/weston-family-learning-centre/. In some cases the alias is being appended to the end of the current alias which causes the page not found error. Changing it to <a href="/[~ID~]"> fixes it however in the case of this page http://www.ago.net/marina-abramovic-and-ulay-rest-energy, the specified link uses the </a><a href="[~ID~]"> syntax and it is resolving properly to the root of the site and is not broken.
The chart page is very odd in that it seems to alternate between working and not working. At the moment, all the links in the chart are not working for me. I had someone outside the office test yesterday and they were also broken for him.
Here is the code in the config.inc.php
// automatically assign base_path and base_url
if(empty($base_path)||empty($base_url)||$_REQUEST['base_path']||$_REQUEST['base_url']) {
$sapi= 'undefined';
if (!strstr($_SERVER['PHP_SELF'], $_SERVER['SCRIPT_NAME']) && ($sapi= @ php_sapi_name()) == 'cgi') {
$script_name= $_SERVER['PHP_SELF'];
} else {
$script_name= $_SERVER['SCRIPT_NAME'];
}
$a= explode("/manager", str_replace("\\", "/", dirname($script_name)));
if (count($a) > 1)
array_pop($a);
$url= implode("manager", $a);
reset($a);
$a= explode("manager", str_replace("\\", "/", dirname(__FILE__)));
if (count($a) > 1)
array_pop($a);
$pth= implode("manager", $a);
unset ($a);
$base_url= $url . (substr($url, -1) != "/" ? "/" : "");
$base_path= $pth . (substr($pth, -1) != "/" && substr($pth, -1) != "\\" ? "/" : "");
}
// assign site_url
$site_url= ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? 'https://' : 'http://';
$site_url .= $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80)
$site_url= str_replace(':' . $_SERVER['SERVER_PORT'], '', $site_url); // remove port from HTTP_HOST
$site_url .= ($_SERVER['SERVER_PORT'] == 80 || (isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port) ? '' : ':' . $_SERVER['SERVER_PORT'];
$site_url .= $base_url;
Any help you could provide is much appreciated.
Cristina</a>
One other thought: I noticed permission on the file /manager/includes/config.inc.php are set to -rw-------. Is this correct?
<base href="[(site_url)]" />/code]
Ah.
You need to add this to your when you use alias paths (ie multiple /levels/in/the/url with friendly urls):
<base href="[(site_url)]">/code][/quote] Thanks Mark. I actually found this solution yesterday and forgot to reply to the post. We were not using this in the past. Did something change in the latest version that now requires the use of base href? Thanks, Cristina
Base href has been a requirement for a long time, but only if you use alias paths (some/resource/here.html). Revolution lets you change the default_tag_scheme setting to "abs" in which case it's not required anymore, but Evo doesn't have this.