commons.js no more visible

Post here questions and problems related to oXygen frameworks/document types.
Bruno.Ballarin
Posts: 25
Joined: Thu Aug 07, 2014 3:40 pm

commons.js no more visible

Post by Bruno.Ballarin » Wed Oct 09, 2019 4:24 pm

Hi,

following a company stylesheet update many of my topics failed to open in Oxygen Author, with message "cannot load the associated CSS files.

The root cause appear to be linked to the absence of the following attributes in the Topic elements of many of my topics:
xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" ditaarch:DITAArchVersion="1.2"

My IT department advised to add a "DITA - Extension" in the Options\Preferences\Document type association with the following "Public ID": *-//STM//DTD DITA 1.3*

Now I can open my topics but some of the toolbar buttons (that I have developed using JSOperation) are not working anymore. I got the following error message when I clicked this custom buttons in the Author toolbar:

"Could not evaluate script: ReferenceError: "rotatecell" is not defined. (asthttps://dcam.st.com/astoria/currentScript.js#1)

It seems the "commons.js" where I have stored my custom functions called by JSOperation is somehow not visible anymore.

Could it be that there is an interference between the Astoria version management plugin and the my framework customizations? How can I have both cohabiting?

Radu
Posts: 6507
Joined: Fri Jul 09, 2004 5:18 pm

Re: commons.js no more visible

Post by Radu » Thu Oct 10, 2019 9:14 am

Hi,
The root cause appear to be linked to the absence of the following attributes in the Topic elements of many of my topics:
xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" ditaarch:DITAArchVersion="1.2"
Yes, exactly, that's the problem. The specialization DTD needs to be changed to properly define this "DITAArchVersion" default attribute on the root element.
That attribute is used both when Oxygen tries to match an XML document to a document type association (and indeed you can overcome this by adding those extra association rules) but might also be used in other parts of our code where Oxygen needs to decide if an XML document is DITA or not.
Now I can open my topics but some of the toolbar buttons (that I have developed using JSOperation) are not working anymore. I got the following error message when I clicked this custom buttons in the Author toolbar:

"Could not evaluate script: ReferenceError: "rotatecell" is not defined. (asthttps://dcam.st.com/astoria/currentScript.js#1)

It seems the "commons.js" where I have stored my custom functions called by JSOperation is somehow not visible anymore.

Could it be that there is an interference between the Astoria version management plugin and the my framework customizations?
This is probably because of the DITA framework extension you created. Thing is that when Oxygen executes a "JSOperation" it indeed looks for a "commons.js" but it looks for it in the current framework folder. As your framework is an extension of the base "DITA" framework, Oxygen will no longer look in the "frameworks/dita" folder.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply