Page 1 of 1

commons.js no more visible

Posted: Wed Oct 09, 2019 4:24 pm
by Bruno.Ballarin
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?

Re: commons.js no more visible

Posted: Thu Oct 10, 2019 9:14 am
by Radu
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