404 error when launching generated HTML

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Mady Dady
Posts: 13
Joined: Thu Mar 20, 2008 11:47 am

404 error when launching generated HTML

Unread post by Mady Dady »

404.png
I've published HTML version of my documentation. When it starts automaticaly i catch 404 error. When i click links in TOC all pages open. When i try UP button on navigation panel it is 404 again. So i think it is something wrong with HREF_DEFAULT_PAGE. I set its value as "index.html", type - HTML. I also tried to delete HREF_DEFAULT_PAGE from Text Variables. Doesnt help.

I use no skin, but changed default page template and layout in publishing opttions. May be i ve done smth wrong?

Here is a piece of code in HTML Page template > Default

<IF_TOPIC_HEADER>
<table style="max-width:1024px; border:none; border-spacing:0px; padding:5px; background:#FFFFFF">
<tr style="vertical-align:middle">
<td style="width:70%; text-align:left">
<%TOPIC_HEADER%>
</td>
<td style="text-align:right">
<a href="<%HREF_DEFAULT_PAGE%>">&#1053;&#1072;&#1074;&#1077;&#1088;&#1093;</a>&nbsp;
<IF_PREVIOUS_PAGE><a href="<%HREF_PREVIOUS_PAGE%>">&#1053;&#1072;&#1079;&#1072;&#1076;</a>&nbsp;</IF_PREVIOUS_PAGE>
<IF_NEXT_PAGE><a href="<%HREF_NEXT_PAGE%>">&#1042;&#1087;&#1077;&#1088;&#1077;&#1076;</a></IF_NEXT_PAGE>
</td>
</tr>
</table>
</IF_TOPIC_HEADER>



And here is my Webhelp Layout

<!DOCTYPE html>
<html>
<head>
<title><%TITLE%></title>
<meta http-equiv="Content-Type" content="text/html; charset=<%DOCCHARSET%>">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="helpman_settings.js"></script>
<script type="text/javascript" src="helpman_navigation.js"></script>
<script type="text/javascript" src="<%CONTEXTID_JS_FILE%>"></script>

<link type="text/css" href="<%STYLESHEET%>" rel="stylesheet" />

<style type="text/css">
html,body { margin:0;padding:0;height:100%;overflow:hidden;
background:#FFFFFF;
}

#hmheadbox {
position: absolute;
left: 0px;
right: 0px;
top: 5px;
height: 60px;
background: #FFFFFF;
background-image:url('<%HEADER-IMAGE%>');
border-bottom: 1px solid #C0C0C0;
}

#hmheadbox p {
font-size: 160%;
font-weight: bold;
margin-top: 16px;
margin-left: 8px;
}

#hrule {
position: absolute;
width: 100%;
top: 65px;
height:30px;
background: #8f9da3;
align: right;
}

#hrule span {
font-family: Helvetica;
font-style: oblique;
font-weight: 400;
font-size: 10pt;
color: #FFFFFF;
margin-left: 20px;
}

#hmnavbox {
position: absolute;
left: 5px;
width: 400px;
min-width: 50px;
top: 95px;
bottom: 5px;
border-right: 1px solid #C0C0C0;
}

#hmcontentbox {
position: absolute;
top: 95px;
right: 5px;
bottom: 5px;
left: 420px;
text-align: justify;
border: 0px solid #C0C0C0;
}

iframe {
position: absolute;left:0;top:0;width:100%;height:100%;border:none;
}
</style>

<script type="text/javascript">
$(document).ready(function(){
if (!hmSupportsAbspos()) {
$(window).bind("resize", function() {
hmNoAbsposResize($("#hmheadbox"), true, false);
hmNoAbsposResize($("#hmnavbox"), false, true);
hmNoAbsposResize($("#hmcontentbox"), true, true);
});
$(window).trigger("resize");
}
hmCreateVSplitter($("#hmnavbox"),$("#hmcontentbox"));
});
</script>

</head>
<body>
<div id="hmheadbox">
<span style="margin-left: 20px; margin-top: 5px"><a href="http://www.mfms.ru"><img src="logo.png" width="200px"></a></span>
<!-- <span><%TITLE%></span> -->
</div>
<div id="hrule"><span>Онлайн документация. Версия 1.0</span></div>
<div id="hmnavbox">
<iframe name="hmnavigation" id="hmnavigation" src="<%HREF_CONTENT_PAGE%>" seamless="seamless" title="Navigation Pane" frameborder="0"></iframe>
</div>

<div id="hmcontentbox" >
<script type="text/javascript">
var defaulttopic="<%HREF_DEFAULT_PAGE%>";
var query = window.location.search.substring(1), hash = window.location.hash, xssTest = /'|'|"|"|&sol;|&colon;|&apos;|"|&rpar;|&lpar;|&#61;|&#x3D;|%27|%22|%3d|&#58;|&#x3a;|http|=|%3a|3a;|58;|:|\"|\/|'|"/i, cntxRX = /contextid=\d*/, cntxMatch = cntxRX.exec(query), cntxSrc = "";
if (query != "") {
if (typeof(hmGetContextId) != "undefined") {
if (cntxMatch != null) {
cntxSrc = hmGetContextId(cntxMatch[0]);
};
if (cntxSrc != "") {
defaulttopic = cntxSrc;
} else {
if (!xssTest.test(query) && !xssTest.test(hash))
defaulttopic = query + hash;
}
}
}
document.write('<iframe name="hmcontent" id="hmcontent" src="'+defaulttopic+'" seamless="seamless" title="Content Page" frameborder="0"></iframe>');
</script>
<noscript>
<iframe name="hmcontent" id="hmcontent" src="<%HREF_DEFAULT_PAGE%>" seamless="seamless" title="Content Page" frameborder="0"></iframe>
</noscript>
</div>
</body>
</html>
You do not have the required permissions to view the files attached to this post.
Mady Dady
Posts: 13
Joined: Thu Mar 20, 2008 11:47 am

Re: 404 error when launching generated HTML

Unread post by Mady Dady »

Managed it! I should have set a default topic in my TOC
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: 404 error when launching generated HTML

Unread post by Tim Green »

Mady Dady wrote:Managed it! I should have set a default topic in my TOC
Exactly... :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply