Missing toolbar buttons in search results

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Missing toolbar buttons in search results

Post by Zerozeddy »

Hi - not sure what I've (not) done here.

My skins are all set up nicely, with a Home, forward, back, custom PDF and search buttons.

However after performing a search, all but the search element disappear:
surcz.png
Some setting I've missed?
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6404
Joined: Mon Mar 05, 2007 8:33 am

Re: Missing toolbar buttons in search results

Post by NorthEast »

I'm assuming your topics use a master page which includes the toolbar proxy.

If you're using Flare's default search results page, then I don't think that uses your master page.

Create a new topic (which uses your master page) and insert a search results proxy - then Flare will automatically use that topic for search results, and will use your master page.
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Missing toolbar buttons in search results

Post by Zerozeddy »

Thanks for that - proved "Nearly, but not quite".

I created my own topic, which was successfully used... but with the same result. As a test I used the same topic but without the proxy, to confirm it was using the correct master page:
surcz2.png
Note also that that Search_results.htm file only worked when put in the TOC. When it isn't (despite still being in the project) Flare generates its own Search.htm. And if I create my own Search.htm and put it in the same place, it generates Search(1).htm.
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6404
Joined: Mon Mar 05, 2007 8:33 am

Re: Missing toolbar buttons in search results

Post by NorthEast »

Ok, I thought that might have worked.
I don't use a toolbar proxy, so have never come across this issue. So, I guess that's a bug.

BTW, the search results topic is not being included in the output because you're using the target setting "Exclude content not linked directly...".
Another reason why I always avoid using that setting like the plague.
medea
Propeller Head
Posts: 11
Joined: Wed Mar 28, 2018 10:06 am

Re: Missing toolbar buttons in search results

Post by medea »

I'm also using a topic toolbar in my master page. Flare generated the default Search.html and used the master page that I have defined, but it did not read in the topic toolbar. Any thing else I put in the master page - text, graphics, whatever - all appeared on the generated search results page. Just not the topic toolbar, which seems like a bug to me. (I also do NOT have the 'Exclude content not linked directly or indirectly from the target' option selected, as was suggested as a toolbar omission reason by other forum topics.)
NorthEast
Master Propellus Maximus
Posts: 6404
Joined: Mon Mar 05, 2007 8:33 am

Re: Missing toolbar buttons in search results

Post by NorthEast »

This issue came up in the Slack group MadCap Flare User Groups. I found the bug that causes it and posted a fix:
https://madcapflareusergroups.slack.com ... =C5CTN95BP
Dave Lee wrote:If I insert a topic toolbar proxy in my search results topic, the search results topic uses the correct master page, but it doesn't display the topic toolbar.The reason the topic toolbar doesn't show is because MadCap includes some hard-coded CSS that sets it not to display.

If you look at the search results topic in the output, Flare will add a .templateTopic class to the topic's html tag, and in TextEffects.css (built by Flare) there is the following CSS: .templateTopic .buttons { display: none; }.

So Flare is hiding the topic toolbar (.buttons) on the search results page, and whatever other pages Flare adds this templateTopic class to.
Anyway, to fix this, I added the following to my own stylesheet, and the topic toolbar will then appear:

Code: Select all

.templateTopic .buttons { display: block !important; }
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Missing toolbar buttons in search results

Post by Nita Beck »

The Flare Slack community is by invitation-only, rather than self-join, in order to keep out the spammers and email harvesters. But anyone in the community can send anyone else an invitation. So, to the OP, if you are interested PM Dave or me here in the forums and give us your email address to which to send the invitation. Please tell us where you’re located, too, so we can put you in the closest “locale” channel.

To those who will read this thread months or years from now, the nature of discussions in any [well, any free] Slack community is ephemeral, not historical. Unlike threads here on the forums, our Slack discussions are not held indefinitely. Older posts automatically make way for newer posts. Therefore, Dave’s link will someday lead nowhere.

Thanks, Dave, for copying your solution here for the benefit of forum members.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
NorthEast
Master Propellus Maximus
Posts: 6404
Joined: Mon Mar 05, 2007 8:33 am

Re: Missing toolbar buttons in search results

Post by NorthEast »

Yep, I should have mentioned that the Slack link won't give you any extra information on the subject, it's just for reference.

As Nita said, old Slack content will gradually disappear, which is why I prefer to answer questions in these forums!
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Missing toolbar buttons in search results

Post by Zerozeddy »

Great, thanks!

(In fact I'd forgotten about this problem until returned to the forum for another question...)
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Missing toolbar buttons in search results

Post by Zerozeddy »

Dave Lee wrote:....
Anyway, to fix this, I added the following to my own stylesheet, and the topic toolbar will then appear:

Code: Select all

.templateTopic .buttons { display: block !important; }
Worked straight away with no faffing about. Brilliant. Thank you very much for your help.
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Missing toolbar buttons in search results

Post by Zerozeddy »

Ah. Not out of the woods yet, after all that :(

Although the toolbar appears correctly now we have that line of code, the Home button URL is different to that in the "normal" toolbar by one level.

Instead of

Code: Select all

Target_folder/My_User_Guide/Resources/MasterPages/HOME.htm
it's looking for

Code: Select all

Target_folder/Resources/MasterPages/HOME.htm
Any ideas?
NorthEast
Master Propellus Maximus
Posts: 6404
Joined: Mon Mar 05, 2007 8:33 am

Re: Missing toolbar buttons in search results

Post by NorthEast »

Zerozeddy wrote:Any ideas?
The simple answer is to have a separate Home toolbar button for use on the search results page (and set the proxy to include this new button instead of the original).

The harder answser is to make your Home button script more intelligent and point to the location of the root help topic. For example, your script could maybe get it from the data-mc-path-to-help-system attribute on the html tag.
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Missing toolbar buttons in search results

Post by Zerozeddy »

Duh. I noticed that the automatically-generated Search.htm always sits at the top level of the folder structure, whereas the URL in the skin directs you to a different level ../../ etc. So simply using my own search results topic now works, given the templateTopic line that I wasn't using originally. All good now. Thanks again.
Post Reply