Updating Jquery Plugin

Having trouble installing Oxygen? Got a bug to report? Post it all here.
vinny604
Posts: 10
Joined: Thu Mar 16, 2017 9:58 pm

Updating Jquery Plugin

Post by vinny604 »

Hi,

I'm trying to update the existing jquery-1.8.2.min.js to a more update-to-date jquery.min.js for my classic webhelp transformation output due to a customer request.

I've been trying to follow the instructions in this post:

topic13877.html,

but I'm afraid my folder structure and html files don't appear to be a match. I copied the latest jquery.min.js file to this location:

C:\Program Files\Oxygen XML Editor 17\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\js

I'm just not sure which html or xls files I need to edit to make sure jquery is updated accordingly in the actual webhelp transformation.

I am using the built-in DITA-OT, WebHelp plug-in for OxygenXML Editor 17.1.

Thanks in advance.

Vincent.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Updating Jquery Plugin

Post by bogdan_cercelaru »

Hello,

The procedure described in the topic mentioned by you is for the WebHelp Responsive output, not for the classic output.
For Oxygen v17, you have to follow these steps:
- Copy the new jQuery file in the "${DITA_OT_DIR}/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/js" directory
- Modify the following files by replacing "jquery-1.8.2.min.js" with the name of the newer jQuery file: ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\install\index1.php, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\admin.html, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\confirm.html, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\js\log.js, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\moderate.html, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\removeInstallDir.html, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\xsl\common-mobile.xsl, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\xsl\createMainFiles.xsl, ${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\xsl\dita\desktop\common.xsl

Please note that the WebHelp output generated with Oxygen v17 has not been tested with other version of jQuery library than the one included in Oxygen (jQuery version 1.8.2).

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
vinny604
Posts: 10
Joined: Thu Mar 16, 2017 9:58 pm

Re: Updating Jquery Plugin

Post by vinny604 »

Hi Bogdan,

Thank you for taking the time to reply and assist. I have updated references to the updated jquery file in all the files you've listed (all 9).

I've generated a new WebHelp output, but the player is now unable to display content in the main pane.[

The rest of the webhelp display, including the TOC, works normally. Do you know what the cause might be? Am I missing a step?

Thanks so much,

Vincent.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Updating Jquery Plugin

Post by bogdan_cercelaru »

Hello,

Probably some of the JavaScript code or other libraries used in WebHelp are not compatible with the new version of jQuery plugin.
To enable debugging, open the "${DITA_OT_DIR}\plugins\com.oxygenxml.webhelp\oxygen-webhelp\resources\js\log.js" and replace

Code: Select all


var log= new Log(Level.NONE);
with

Code: Select all


var log= new Log(Level.DEBUG);
Now, load your WebHelp output from a WEB server and a new window will be opened where you can find debug messages and JavaScript errors.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
vinny604
Posts: 10
Joined: Thu Mar 16, 2017 9:58 pm

Re: Updating Jquery Plugin

Post by vinny604 »

Thank you Bogdan.

I also want to add that the WebHelp appears normally in Chrome.....the main pane only disappears in IE/Edge.
vinny604
Posts: 10
Joined: Thu Mar 16, 2017 9:58 pm

Re: Updating Jquery Plugin

Post by vinny604 »

Hi Bogdan,

I wanted to give everyone a quick update on this issue.

The debug suggestion you gave helped tremendously, but it also led to more questions as our fix may have been a fluke.

The debugger gave the following error message:

2017:4:15 15:46:42.492 ERROR [JS]: Unable to get property 'msie' of undefined or null reference in page: file:///C:/Users/####/Documents/vSOC/trunk/OXML/out/webhelp/oxygen-webhelp/resources/js/splitter.js al line: 257

We went to line 257 in the code for splitter.js:

if (!$.browser.msie )

We changed the conditional statement to

if (1)

Luckily, it worked and IE now renders the classic webhelp output as it should with our latest jquery....however, we're not entirely sure what the root cause was for that line of code?

Thanks,

Vincent.
Post Reply