Flare 9 HTML5 and TocPath in page links

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

WHY HAS THIS NOT BEEN TURNED OFF IN FLARE 12 ??!?!?!

ZOMFG

Now I have to find that code again...

*sigh*
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

It's the same code again:

Code: Select all

if(L!=null&&O){var T=y(W,true);L+=encodeURIComponent("?"+O+"Path="+T)}
Change it to this:

Code: Select all

/*if(L!=null&&O){var T=y(W,true);L+=encodeURIComponent("?"+O+"Path="+T)}*/
This time the file is in Program Files, not Program Files (x86):

Code: Select all

C:\Program Files\MadCap Software\MadCap Flare 12\Flare.app\Resources\WebHelp2\Desktop\Scripts\MadCapAll.js
Have tested it & it still works.
Rona Kwestel
Sr. Propeller Head
Posts: 212
Joined: Wed Apr 04, 2007 11:50 am

Re: Flare 9 HTML5 and TocPath in page links

Post by Rona Kwestel »

Thanks for the warning, 3lliot. I haven't upgraded yet, but will make a note to comment out that crufty code when I do.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Flare 9 HTML5 and TocPath in page links

Post by doc_guy »

I'd be curious to see what happens if you have a topic in the TOC multiple times, if the synchronize TOC feature still works with this code missing.
Paul Pehrson
My Blog

Image
rpa
Propeller Head
Posts: 36
Joined: Mon Jun 10, 2013 3:47 am
Location: Thurgau, Switzerland
Contact:

Re: Flare 9 HTML5 and TocPath in page links

Post by rpa »

Since the Version 2016 r2, you need to change the following code in MadCapAll.js

Code: Select all

if(L!=null&&P&&O){var U=y(X,true);L+=encodeURIComponent("?"+P+"Path="+U)}
Change into this:

Code: Select all

/*if(L!=null&&P&&O){var U=y(X,true);L+=encodeURIComponent("?"+P+"Path="+U)}*/
I tested it and it worked for me
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

Same code change tested & working for Flare 2017 also.

File is C:\Program Files\MadCap Software\MadCap Flare 13\Flare.app\Resources\WebHelp2\Desktop\Scripts\MadCapAll.js

Why we still have to do this for every release is beyond me
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

AAAAAAGH

why is this still happening

*facepalm*
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

The code has changed.

I suspect it's possibly this that now needs to be commented out:

if(MadCap.Utilities.HasRuntimeFileType("TriPane")){L+=encodeURIComponent("?"+Q+"Path="+V)}

If anyone with JS chops can verify that would be great.

I'll have to leave it on for now & subject many thousands of users to crappy URLs for a while.
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

In 2017 r2 they also apparently un-checked 'upload log file' for HTML5 destinations, which has been particularly annoying.
Michael Cohen
Propeller Head
Posts: 36
Joined: Fri May 06, 2011 6:35 am

Re: Flare 9 HTML5 and TocPath in page links

Post by Michael Cohen »

Has anyone found a solution to this yet? The Flare 2017 code changed so this old fix no longer works.
Kathy_123
Propeller Head
Posts: 39
Joined: Thu Oct 04, 2012 9:40 am

Re: Flare 9 HTML5 and TocPath in page links

Post by Kathy_123 »

This is SO UGLY. I really want a fix to this. It's embarrassing to send someone the URL to a specific help page when the URL looks like utter trash.
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

I asked technical support about it, this was the reply:

"It is not a recommended workflow to alter the Flare source files and is not covered under the umbrella of support. I will not be able to provide this workaround or updated versions of this workaround if/when it changes in future version. Apologies for the inconvenience that this TocPath string is causing."

Could anyone that doesn't like the crappy URLs please log it as a feature request https://www.madcapsoftware.com/feedback ... quest.aspx, it only takes 2 minutes.
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

Kathy_123 wrote:It's embarrassing to send someone the URL to a specific help page when the URL looks like utter trash.
You can just chop off the tocPath string after the filename - it's a PITA though when you have to deal with a lot of URLs.
Kathy_123
Propeller Head
Posts: 39
Joined: Thu Oct 04, 2012 9:40 am

Re: Flare 9 HTML5 and TocPath in page links

Post by Kathy_123 »

Yah, that's the problem. Our support people like to send the URL to the FAQ pages.
Jeanne_W
Propeller Head
Posts: 13
Joined: Mon Jun 27, 2016 11:50 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by Jeanne_W »

Hi, after upgrading to the latest 2017 r2 release, this workaround is no longer working. When I asked MadCap support about this, I got the following response:
The string that existed in the previous version is no longer available in r2. We are not able to provide a new workaround for this behavior, you would need to consult the forums as this is not an officially supported workflow. Sorry about the inconvenience.
Has anyone discovered a way to remove the path information in page links in the latest release?

Thanks,
Jeanne
3lliot
Sr. Propeller Head
Posts: 105
Joined: Wed Mar 23, 2011 8:45 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by 3lliot »

I've requested a feature to switch off the tocpath string multiple times with no success. If more people make the request, we might get it into the next build.

https://www.madcapsoftware.com/feedback ... quest.aspx

Why they proactively removed the only workaround is a mystery.
bgilliland
Propeller Head
Posts: 13
Joined: Fri Sep 11, 2015 12:44 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by bgilliland »

It appears that our wishes have been granted! I've had this forum topic bookmarked for years, but now there's an actual on/off toggle for this in 2017 r2!

http://help.madcapsoftware.com/flare201 ... ntries.htm

Target Editor > Advanced > Synchronize Navigation Elements with TOC Entries
"With this option enabled, you will notice that the URL paths for your topics are quite a bit longer and more complex...With the option disabled, the paths are much more streamlined."

I haven't tested it yet myself, as I've not committed to the r2 upgrade yet, but thought I'd share anyway and see how other's fare with the new feature.

Beth
Fred Jongeneel
Jr. Propeller Head
Posts: 2
Joined: Fri Jan 09, 2015 1:22 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by Fred Jongeneel »

I did install 2017 R2 to test this. Turns out that this setting only seems to be applicable for the TopNav layout. The TriPane output will show the TocPath string regardless of the setting of this flag. Of course we are using TriPane.

One of the biggest challenges we have with the TOC string (apart from it being ugly and confusing) is that it makes the URL go past 255 characters which is creating problems in other places like SharePoint that don't like long URL's. With R2 no longer having the option to edit the .js file we are now stuck on our current version (which seems to be V12).

Guess we might as well discontinue our service contract that entitles us to version updates....

Anybody at MadCap actually reading the forums? This has been going on for a few years now. Can you either include a flag to switch this off for the TriPane output or at least let us know if there is any way of disabling this through one of the .js files?

I'll have also entered a feature request to make the flag work for the TriPane output as well.
yonatanlehman
Propeller Head
Posts: 51
Joined: Mon Sep 18, 2017 6:14 am

Re: Flare 9 HTML5 and TocPath in page links

Post by yonatanlehman »

It's now 2018 - has this not been solved ?
yonatanlehman
Propeller Head
Posts: 51
Joined: Mon Sep 18, 2017 6:14 am

Re: Flare 9 HTML5 and TocPath in page links

Post by yonatanlehman »

I tried to look for the code to change it
I found MadCapAll.js in three places
C:\Program Files\MadCap Software\MadCap Flare 13\Flare.app\Resources\WebHelpMobile\Advanced\Resources\Scripts
C:\Program Files\MadCap Software\MadCap Flare 13\Flare.app\Resources\WebHelp\Content\SkinSupport
C:\Program Files\MadCap Software\MadCap Flare 13\Flare.app\Resources\WebHelp2\Desktop\Scripts

Do I need to make the changes in all of these files ?

Unfortunately, I didn't find the line

if(L!=null&&O){var T=y(W,true);L+=encodeURIComponent("?"+O+"Path="+T)}

Has anyone solved this problem on Flare 13 ?
yonatanlehman
Propeller Head
Posts: 51
Joined: Mon Sep 18, 2017 6:14 am

Re: Flare 9 HTML5 and TocPath in page links

Post by yonatanlehman »

OK problem solved

in your "target" got to the advanced tab, and uncheck "Synchronize navigation elements with TOC entries"
that's it - they ugly URL is gone
BUT - if you want to reference the same topic from two places in the ToC - you can't do this.
I suppose the solution is to put the content in a snippet and just access the snippet from two topics - one per ToC entry (although they will have different URLs)

Too bad Customer Support didn't know the answer to this question - I asked them and got a "feature request"
jbkalla
Propeller Head
Posts: 57
Joined: Tue Nov 06, 2012 11:53 am
Location: Denver, CO, USA
Contact:

Re: Flare 9 HTML5 and TocPath in page links

Post by jbkalla »

Like the previous poster mentioned, it doesn't work in TriPane. This is effing annoying! I can uncheck the box, but nothing happens.
bgilliland
Propeller Head
Posts: 13
Joined: Fri Sep 11, 2015 12:44 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by bgilliland »

3lliot wrote:The code has changed.

I suspect it's possibly this that now needs to be commented out:

if(MadCap.Utilities.HasRuntimeFileType("TriPane")){L+=encodeURIComponent("?"+Q+"Path="+V)}

If anyone with JS chops can verify that would be great.
Why I don't have any JS chops per se, I did a little hunting and pecking with Flare 2018 (just released) and I think I stumbled upon a possible code fix for those of us still on HTML5 TriPane. (Use at your own risk! TEST TEST TEST!)

Find this:

Code: Select all

if(MadCap.Utilities.HasRuntimeFileType("TriPane")){M+=encodeURIComponent("?"+S+"Path="+X)}else{var N=new MadCap.Utilities.Url(M);if(O){M=N.PlainPath+encodeURIComponent("?"+S+"Path="+X)+N.Fragment}else{M=N.PlainPath+"?"+(S+"Path="+X)+N.Fragment}}
Change it to this:

Code: Select all

/*if(MadCap.Utilities.HasRuntimeFileType("TriPane")){M+=encodeURIComponent("?"+S+"Path="+X)}else{var N=new MadCap.Utilities.Url(M);if(O){M=N.PlainPath+encodeURIComponent("?"+S+"Path="+X)+N.Fragment}else{M=N.PlainPath+"?"+(S+"Path="+X)+N.Fragment}}*/
File located here:

Code: Select all

C:\Program Files\MadCap Software\MadCap Flare 14\Flare.app\Resources\WebHelp2\Desktop\Scripts\MadCapAll.js
I've been stuck on 2017 r1, and would love to finally upgrade. Can anyone else corroborate this change above and get clean URLs in your output?

Beth
tdewolf
Jr. Propeller Head
Posts: 4
Joined: Wed Feb 01, 2017 7:44 am

Re: Flare 9 HTML5 and TocPath in page links

Post by tdewolf »

@bgilliland commenting that code snippet seems to do the trick on Flare 2018

without: Output/HTML5/staging-dgc-release-notes-html5/Default.htm#ReleaseNotes/ref_known-issues.htm%3FTocPath%3D_____5

commenting the code snippet: Output/HTML5/dgc-release-notes-html5/Default.htm#ReleaseNotes/ref_known-issues.htm

It does not give issues when using a topic multiple times in a TOC
bgilliland
Propeller Head
Posts: 13
Joined: Fri Sep 11, 2015 12:44 pm

Re: Flare 9 HTML5 and TocPath in page links

Post by bgilliland »

For Flare 2018 r2:

File located here:

Code: Select all

C:\Program Files\MadCap Software\MadCap Flare 14\Flare.app\Resources\WebHelp2\Desktop\Scripts\MadCapAll.js
Find this:

Code: Select all

if(MadCap.Utilities.HasRuntimeFileType("TriPane")){Q+=encodeURIComponent("?"+Y+"Path="+X)}else{var R=new MadCap.Utilities.Url(Q);if(S){Q=R.PlainPath+encodeURIComponent("?"+Y+"Path="+X)+R.Fragment}else{Q=R.PlainPath+"?"+(Y+"Path="+X)+R.Fragment}}
Change it to this:

Code: Select all

/*if(MadCap.Utilities.HasRuntimeFileType("TriPane")){Q+=encodeURIComponent("?"+Y+"Path="+X)}else{var R=new MadCap.Utilities.Url(Q);if(S){Q=R.PlainPath+encodeURIComponent("?"+Y+"Path="+X)+R.Fragment}else{Q=R.PlainPath+"?"+(Y+"Path="+X)+R.Fragment}}*/
Post Reply