Author Topic: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)  (Read 6469 times)

mathieu31

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile

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 :)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
« Reply #1 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

mathieu31

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
« Reply #2 on: September 10, 2020, 10:42:04 pm »
thx geert for your answer.
I suspected it

best regards

mat

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
« Reply #3 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
My theories are always correct, just apply them to the right reality.

Richard Freggi

  • EA User
  • **
  • Posts: 390
  • Karma: +14/-7
    • View Profile
Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
« Reply #4 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Issue with EXPORT HTML and new browsers version (edge, chrome, firefox 68+)
« Reply #5 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

Prolaborate Support

  • Prolab Moderator
  • EA User
  • *
  • Posts: 317
  • Karma: +22/-0
    • View Profile
    • Visit us
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

Huub

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
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.....

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
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

steen.jensen

  • EA User
  • **
  • Posts: 161
  • Karma: +6/-1
    • View Profile
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
« Last Edit: April 20, 2022, 11:14:25 pm by steen.jensen »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
the Javascript is woring in SharePoint :)
What do you mean by that exactly?

Geert

wivel

  • EA User
  • **
  • Posts: 137
  • Karma: +9/-1
  • Driven by Models
    • View Profile
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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11849
  • Karma: +460/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
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

wivel

  • EA User
  • **
  • Posts: 137
  • Karma: +9/-1
  • Driven by Models
    • View Profile
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

Graham_Moir

  • EA User
  • **
  • Posts: 746
  • Karma: +9/-15
    • View Profile
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 ?