You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Thursday, April 12th 2018, 12:32pm

how to delete the link to file in the screen of a fatal mistake?

Problem: at emergence of a fatal mistake (the black screen) on the screen the complete absolute path to the file which could not be loaded (for example - http://.........../plugins/webvr.xml) is displayed. To us it is very important that nobody has seen the link to file (our hosting).

Whether there is an opportunity to make that at such mistakes the way to the file was not displayed?
It is very important for us. Very much we ask for help.
Maybe somebody faced such problem?


Saturday, April 14th 2018, 9:37pm


you could use the new onxmlerror event to implement a custom error handling:

When this event will be set, no krpano error message related to xml-loading/parsing will be shown.

And about fixing that problem - I would say just upload that missing xml...

Best regards,


Tuesday, April 17th 2018, 9:51pm

<krpano version="1.19" title="Virtual Tour" >

Thanks! I tried to make so, here a part of my tour.xml:

<events name="onxmlerror" keep="true" onxmlerror="xmlerror();" />

<action name="xmlerror" >
set(layer[xmlerror].url, %CURRENTXML%/skin/fatalerror.jpg);
set(layer[xmlerror].keep, true);
set(layer[xmlerror].zorder, 99);
set(layer[xmlerror].align, center);
set(layer[xmlerror].width, 100%);
set(layer[xmlerror].height, 100%);

But it doesn't work...
If there is no xml, for example webvr.xml, or because of a bad connection of WiFi couldn't be loaded, then there is a standard option of a mistake which is formed by the main tour.js module
We have a problem that under no circumstances nobody has to see an absolute path to our files (to our hosting).
If for example there is a mistake when loading tour .xml, then the method with won't help. And such mistake is theoretically possible.
Can be to eat some team which can be added for example to the index.html file instead of a line - <script src="tour.js"></script> ?


Wednesday, April 18th 2018, 11:02am


you could:
  • use 'null' as startup xml
  • use the onready callback
  • set the onxmlerror event there
  • and then load the first xml.

Source code

embedpano({xml:null, ..., onready:function(krpano)
   krpano.set("events.onxmlerror", function(){ console.log("error:"+krpano.get("lasterror")); });"loadpano(tour.xml);");

Best regards,


Wednesday, April 18th 2018, 1:00pm

It is a shame to me to admit, but I don't know a basis of HTML of programming at all... :( Very much I ask to help to resolve this very important issue up to the end.
I have added your example to index.html, but the standard option of a mistake from tour.js is all the same displayed...
Here is how my index.html looks now:

<!DOCTYPE html>
<title>krpano - 9</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
@-ms-viewport { width:device-width; }
@media only screen and (min-device-width:800px) { html { overflow:hidden; } }
html { height:100%; }
body { height:100%; overflow:hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#000000; }

<script src="tour.js"></script>

<script src="html5sound/js/howler.core.min.js"></script>
<script src="html5sound/js/howler.effects.min.js"></script>

<div id="pano" style="width:100%;height:100%;">
<noscript><table style="width:100%;height:100%;"><tr style="vertical-align:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
embedpano({swf:"tour.swf", xml:null, target:"pano", html5:"auto", mobilescale:1.0, onready: function (tour)
tour.set ("events.onxmlerror", function () {console.log ("error:" + tour.get ("lasterror"));}); ( "loadpano (tour.xml);");



Wednesday, April 18th 2018, 1:52pm

The code looks okay (assuming that onxmlerror will not be redefined in the xml itself).
Are you sure that use krpano version 1.19-pr16?
In older versions there is no onxmlerror event!


Wednesday, April 18th 2018, 1:58pm

I have krpano version 1.19-pr14 now
Shouldn't work?


Wednesday, April 18th 2018, 2:41pm

No - as said it need to be 1.19-pr16 (or to be exact: pr15 or higher) - the onxmlerror event is NEW and was first added there:
krpano 1.19-pr15 / pr16


Wednesday, April 18th 2018, 3:36pm

I have now updated all files in a tour to the version 1.19-pr16, and now began to work :) Now at a fatal mistake just black screen. I have added the command and now the black screen with the inscription "ERROR".

Thanks a lot for the help, Klaus! I didn't know in the new version there is such opportunity :)