jquery.min.js interfering with madcap.js in Flare 13 R3

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

jquery.min.js interfering with madcap.js in Flare 13 R3

Postby mddent01 on Thu Jan 18, 2018 3:49 am

Has anyone encountered an issue with using jquery.min.js in Flare 13 R3.

We use the breadcrumb and menu proxies in the master page but they are not displayed when we build the output. Madcap have confirmed that they cannot ensure that the jquery.min.js. gets run at a time that doesn’t interfere with the madcap.js .

Is there a way we can control when the scripts are run? I have changed the order of the scripts in the head of the master page but no luck so far.

Look forward to hearing from you.

Kind regards
Michelle
mddent01
Propeller Head
 
Posts: 17
Joined: Tue Feb 28, 2017 10:04 am

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby Dave Lee on Thu Jan 18, 2018 4:06 am

mddent01 wrote:Is there a way we can control when the scripts are run? I have changed the order of the scripts in the head of the master page but no luck so far.


What scripts are in the head of your master page?

If you're adding a link to your own version of jquery in the master page, then it probably isn't going to work.

Flare already includes jquery (and a number of other scripts) when it builds the output - but you can't see that anywhere in the source files.
And AFAIK, you can't change the order of any of these scripts in the output.
Dave Lee
Master Propellus Maximus
 
Posts: 5265
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby mddent01 on Thu Jan 18, 2018 4:26 am

We use quite a few JS files as we have Online Help that sits in our broader company website.

I don't understand why the actual Madcap proxies are not displaying as expected.
mddent01
Propeller Head
 
Posts: 17
Joined: Tue Feb 28, 2017 10:04 am

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby Dave Lee on Thu Jan 18, 2018 5:12 am

mddent01 wrote:We use quite a few JS files as we have Online Help that sits in our broader company website.

I don't understand why the actual Madcap proxies are not displaying as expected.


Where are the errors? Is anything reported in the console log in the browser?
Did it work previously, and if so what have you changed?

I'd suggest testing to see if it works without your JS files - e.g. comment out all the JS links in your master page.
If the MadCap proxies work ok without your extra JS files, then you know the problem is with the JS files that you've added.
Dave Lee
Master Propellus Maximus
 
Posts: 5265
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby Jess77 on Wed Feb 14, 2018 7:17 am

I am having the exact same problem. Support is telling me that the only way to get the breadcrumb back is to remove all my scripts. I am waiting to confirm that they mean the jquery scripts because they didn't say, but I am assuming they mean the jquery scripts.

It worked in 2017 just fine. Now, the breadcrumbs won't appear in r2 or r3 without removing all the jquery I spend weeks building.

Does jQuery not work in Flare anymore? Has anyone solved this?
Jessabean
Technical Writing Consultant
Jess77
Sr. Propeller Head
 
Posts: 128
Joined: Thu May 01, 2014 3:19 pm
Location: Florida

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby Dave Lee on Wed Feb 14, 2018 9:00 am

Jess77 wrote:Does jQuery not work in Flare anymore? Has anyone solved this?


jQuery is still included in the Flare output, and still works fine.

Same suggestions as before...

Dave Lee wrote:Where are the errors? Is anything reported in the console log in the browser?
Did it work previously, and if so what have you changed?

I'd suggest testing to see if it works without your JS files - e.g. comment out all the JS links in your master page.
If the MadCap proxies work ok without your extra JS files, then you know the problem is with the JS files that you've added.
Dave Lee
Master Propellus Maximus
 
Posts: 5265
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby Jess77 on Wed Feb 14, 2018 9:38 am

Checking the scripts - The breadcrumb trail does work when the scripts are removed, so it must be the scripts. However, I haven't changed the scripts at all from when I added them in Flare 2017... and they worked in Flare 2017. I published right before I upgraded.

Checking the console in the browser - The console in the browser just says that there is no content in the Div for the breadcrumb trail.

Checking the build log - There is one warning (but no error) that says "The js ID has been used more than once in a document."

I'm using a Plugins folder I added to the Resources folder, so the script looks like this: "../Plugins/jquery-latest.js". Do I need to change that script?
Jessabean
Technical Writing Consultant
Jess77
Sr. Propeller Head
 
Posts: 128
Joined: Thu May 01, 2014 3:19 pm
Location: Florida

Re: jquery.min.js interfering with madcap.js in Flare 13 R3

Postby Dave Lee on Thu Feb 15, 2018 12:28 am

OK, a few things here:
Jess77 wrote:Checking the console in the browser - The console in the browser just says that there is no content in the Div for the breadcrumb trail.

So does your script do something to/with the breadcrumbs?
If so, then in 2017r3 the breadcrumb links are no longer included at build time (in the HTML source), but are loaded dynamically by MadCap's scripts at run time. This means any scripts you run that affect the breadcrumb proxy (or menu proxy) will have to wait until the MadCap scripts have populated the links in the proxies. You do this by waiting for the the "loaded" event, before you run your own script.
See kb article: http://kb.madcapsoftware.com/Content/Mi ... _Menus.htm
The examples are for the menu, but presumably the same technique can be used for breadcrumbs - if you're not sure, ask MadCap support.

Jess77 wrote:I'm using a Plugins folder I added to the Resources folder, so the script looks like this: "../Plugins/jquery-latest.js". Do I need to change that script?

Flare already includes its own copy of jQuery in the output, so that means you're now loading two copies (and different versions) of jQuery. Do not add your own version of jQuery.
Dave Lee
Master Propellus Maximus
 
Posts: 5265
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Web-based Outputs

Who is online

Users browsing this forum: Google [Bot] and 5 guests