| Summary: | [p2] The site generated by the "Update Site Project" doesn't work in Chrome/Chromium | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Matias Emanuel Serrano <matutetandil> |
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | aniefer, curtis.windatt.public, matutetandil, Shalini.Gupta |
| Version: | 4.2 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
|
Description
Matias Emanuel Serrano
I find a solution for that. I copy paste my new index.html, with the fix I found. I Commented the fix
<html>
<head>
<title>Oromix Development Environment</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>@import url("web/site.css");</style>
<script type="text/javascript">
var returnval = 0;
var stylesheet, xmlFile, cache, doc;
function init(){
// NSCP 7.1+ / Mozilla 1.4.1+ / Safari
// Use the standard DOM Level 2 technique, if it is supported
if (document.implementation && document.implementation.createDocument) {
xmlFile = document.implementation.createDocument("", "", null);
stylesheet = document.implementation.createDocument("", "", null);
if (xmlFile.load){
xmlFile.load("site.xml");
stylesheet.load("web/site.xsl");
xmlFile.addEventListener("load", transform, false);
stylesheet.addEventListener("load", transform, false);
} else { /////////////////////// THIS IS THE FIX ///////////////////////
//alert("Document could not be loaded by browser.");
// Chrome
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("GET","site.xml",false);
xmlhttp.send(null);
xmlFile = xmlhttp.responseXML.documentElement;
xmlhttp.open("GET","web/site.xsl",false);
xmlhttp.send(null);
stylesheet = xmlhttp.responseXML.documentElement;
// I HAVE TO CALL TWICE THIS FUNCTION, BECAUSE IT HAS A COUNTER THAT MUST BE 2 (THIS MAY BE FIXED TOO)
transform();
transform();
} /////////////////////////// END OF THE FIX ///////////////////////////
}
//IE 6.0+ solution
else if (window.ActiveXObject) {
xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
xmlFile.async = false;
xmlFile.load("site.xml");
stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
stylesheet.async = false;
stylesheet.load("web/site.xsl");
cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
cache.stylesheet = stylesheet;
transformData();
}
}
// separate transformation function for IE 6.0+
function transformData(){
var processor = cache.createProcessor();
processor.input = xmlFile;
processor.transform();
data.innerHTML = processor.output;
}
// separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+
function transform(){
returnval+=1;
if (returnval==2){
var processor = new XSLTProcessor();
processor.importStylesheet(stylesheet);
doc = processor.transformToDocument(xmlFile);
document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
}
}
</script>
</head>
<body onload="init();">
<!--[insert static HTML here]-->
<div id="data"><!-- this is where the transformed data goes --></div>
</body>
</html>
var xmlhttp = new window.XMLHttpRequest();
xmlhttp.open("GET","site.xml",false);
xmlhttp.send(null);
xmlFile = xmlhttp.responseXML.documentElement;
xmlhttp.open("GET","web/site.xsl",false);
xmlhttp.send(null);
stylesheet = xmlhttp.responseXML.documentElement;
transform();
transform();
To the else branch of the
I believe the html page is generated by pde/ui. This is old update-site stuff which should probably be updated for p2. Perhaps the html creation should be turned off entirely as update is no longer included. Obviously a p2 implementation would be neat, but there isn't enough committer time for it. Everything I read about xslt in Chrome is that the browser has a security policy prevent loading files from within other pages. See the following: http://stackoverflow.com/questions/2981524/how-can-i-make-xslt-work-in-chrome However, the page fails to load off of eclipse.org. I also tried an example from a web site, but it does not work either: http://www.w3schools.com/xsl/xsl_client.asp I also tried the code from comment #1, but that didn't fix the issue locally or on the server. This is not old update manager code, so there isn't a need to remove it. However, I can't put any more time into trying to get this to work for 4.3. We are using Eclipse Version: 4.2.1 , In this we are facing same problem. site generated by Update site project works properly in Firefox but does not work in any other browser i.e chrome,IE,safari. Please do needful. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug was marked as stalebug a while ago. Marking as wontfix. If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag. |