Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: mathieu31 on September 10, 2020, 06:50:40 pm

Title: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: mathieu31 on September 10, 2020, 06:50:40 pm

Hi everyone :)
i am using enterprise architect as system modeling tool and i export some diagrams/packages via export HTML throught native sparx export. (i use default web style template in Resources)
it worked well until new browsers decided to consider access to file system as a security threat.
With last versions of web browsers (chrome, edge, firefox 68+...), it seems file system protocol is not authorized anymore including for example navigation to file:// URLs from non-file:// URLs. As a consequence, when HTML export tries to load its table of content and related elements of this export, it does not work.
Is there a way to bypass this problem ?
re-code javascript ?
access throught HTTP protocol via local web server ?
 Is there smb facing same issues ?

thx in advance for your valuable advice
best regards :)
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Geert Bellekens on September 10, 2020, 07:14:42 pm
There's two ways to solve this

1. Start Chrome with the parameter to allow local access "--allow-file-access-from-file" (thus exposing you to that security risk)
2. Publish the html model with a webserver like IIS (or upload them to sharepoint)

Geert
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: mathieu31 on September 10, 2020, 10:42:04 pm
thx geert for your answer.
I suspected it

best regards

mat
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Uffe on September 10, 2020, 11:30:52 pm
Hello,

3. Publish to Joomla.
4. Buy the cloud server and use WebEA.

Not saying these are better, but they are alternatives.

/Uffe
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Richard Freggi on September 11, 2020, 01:00:45 pm
There's two ways to solve this

1. Start Chrome with the parameter to allow local access "--allow-file-access-from-file" (thus exposing you to that security risk)
2. Publish the html model with a webserver like IIS (or upload them to sharepoint)

Geert

I thought the html documentation would not work in sharepoint because sharepoint disables javascript and hyperlinks between files?  Asking for a friend.
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Geert Bellekens on September 11, 2020, 02:31:32 pm
I thought the html documentation would not work in sharepoint because sharepoint disables javascript and hyperlinks between files?  Asking for a friend.
It does. I've had a number of clients who published the HTML export on sharepoint.
Don't know the technical details though.

Geert
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Prolaborate Support on December 05, 2020, 04:34:03 pm
Hi Mathieu,

If in case you are interested in publishing live diagrams in SharePoint that doesn't need any republishing efforts, check out these videos (https://www.youtube.com/watch?v=DKziKt6Mbz4&list=PLzgMKV20hWv-wBVtmZcCtma5-tzVRkF5r)
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Huub on December 15, 2020, 02:17:08 am
apparently there seems to be a problem in the displayToc.js
Chrome allows opening a local htm file but in the Console (F12) you'll find this error:
Quote
Uncaught DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
    at changeCSS (file:///[yourPATH]/js/displayToc.js:52:32)
    at initPreLoad (file:///[yourPATH]/js/displayToc.js:409:3)
    at initLoad (file:///[yourPATH]/js/displayToc.js:127:3)
    at onload (file:///[yourPATH]/index.htm:9:84)

Does anybode have a solution for that? (using EA 14 here)


p.s. is the HTML Report offcially depricated in Enterpriprise Architect? This question came to mind as the F12 Console also shows a warning for the doctype uses:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
was for XHTML1 Transitional. This was a standard set in 2002. It has since long been succeeded by HTM5.....
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Geert Bellekens on December 15, 2020, 04:59:34 am
deprecated? I hope not.

For those interested. If you want to publish to sharepoint (cloud) you either have

- export to .aspx extension
- either manually upload it though the web dialog, or change the templates to include the comment sharepoint adds to the files when uploading.

We chose to change the templates, and we can now upload a new version by synchronizing with Onedrive

Apparently sharepoint needs those comments to know it should show the contents, rather then download the files.

Geert
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: steen.jensen on April 13, 2022, 05:59:21 pm
When I change to use extension .aspx in HTML generation, the Javascript is working in both Teams & SharePoint :)

So now we can publish selected models to Teams & Sharepoint by copy the whole filestructure (i.ex c:\temp\ea) to a selected FileFolder in Teams and then connect an tab to a WebSite (The copied files in Teams url), so when a user klick on the Tab in Teams the Published EA Models aperar.

One other way is to create an OneDrive shortCut to the selected fileFolders in SharePoint and Publish your HTML från Sparx EA direct to this OneDrive ShortCut, the the model can be accessed from Both Teams & SharePoint using a Tab as above
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Geert Bellekens on April 13, 2022, 06:53:25 pm
the Javascript is woring in SharePoint :)
What do you mean by that exactly?

Geert
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: wivel on April 14, 2022, 06:08:32 am
Modern browsers do not allow opening the HTML generated in EA 15.2 or earlier. In EA 16.x the HTML generator and templates have been upgraded to overcome that.

In the mean time, you can start Chrome with the parameter to allow local access "--allow-file-access-from-file", or, if you use Microsoft Edge, configure it to allow Internet Explorer compatibility (Settings -> Default Browser -> ...)

Henrik
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Geert Bellekens on April 14, 2022, 02:29:27 pm
Modern browsers do not allow opening the HTML generated in EA 15.2 or earlier
... directly from the file system. They have no problem opening the HTML if it is served from a webserver (as Mother Nature intended)

Geert
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: wivel on April 14, 2022, 10:14:42 pm
Modern browsers do not allow opening the HTML generated in EA 15.2 or earlier
... directly from the file system. They have no problem opening the HTML if it is served from a webserver (as Mother Nature intended)

Geert
True. Important info that I left out, and I agree. Using a WebServer is strongly recommended. Thanks Geert.

Henrik
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: Graham_Moir on April 15, 2022, 02:14:14 am
Modern browsers do not allow opening the HTML generated in EA 15.2 or earlier. In EA 16.x the HTML generator and templates have been upgraded to overcome that.

Just for interest, do we know how this was achieved in EA 16.x ?
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: wivel on April 15, 2022, 10:45:55 pm
Modern browsers do not allow opening the HTML generated in EA 15.2 or earlier. In EA 16.x the HTML generator and templates have been upgraded to overcome that.

Just for interest, do we know how this was achieved in EA 16.x ?
It seems to me that it was achieved changing both the generator in EA and the HTML Templates. I tried, for fun, to export the EA 16 templates and import them into EA 15.2 to see if it would work, and it didn't. I can see that there were several new macro options, e.g. the breadcrumbs that waste expanded by the generator and the navigation didn't work either.

Might be possible to tweak the EA 16 templates to work in EA 15.x but making changes to the HTML templates seems to be more of a black magic craft than a skill.

Henrik
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: wivel on April 15, 2022, 10:48:56 pm
Modern browsers do not allow opening the HTML generated in EA 15.2 or earlier
... directly from the file system. They have no problem opening the HTML if it is served from a webserver (as Mother Nature intended)

Geert
On the other hand. I have used file based HTML exports in cases for sending a model or parts of it, out for review to people that didn't have EA indtalled.

Henrik
Title: Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
Post by: steen.jensen on April 20, 2022, 11:16:02 pm
When I change to use extension .aspx in HTML generation, the Javascript is working in both Teams & SharePoint :)

So now we can publish selected models to Teams & Sharepoint by copy the whole filestructure (i.ex c:\temp\ea) to a selected FileFolder in Teams and then connect an tab to a WebSite (The copied files in Teams url), so when a user klick on the Tab in Teams the Published EA Models aperar.

One other way is to create an OneDrive shortCut to the selected fileFolders in SharePoint and Publish your HTML från Sparx EA direct to this OneDrive ShortCut, the the model can be accessed from Both Teams & SharePoint using a Tab as above