Styles lost when added to project

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Styles lost when added to project

Post by bash7012 »

Hi guys,

Could anyone help with this problem?
Everything looks great when I build my .chm and view it on my machine but when our developers add the .chm to the product build, all the styles are lost and the file looks terrible :(

I don't know why this would happen as our developers do not make any changes to the file, they don't even rename it. They just add it to the rest of the project and do the build.

Has anyone else had this problem?

Kind regards,
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Styles lost when added to project

Post by RamonS »

Are you sure that they added the right file and not some old build that didn't have the style sheet? Also, the CHM Viewer uses as main component Internet Explorer and it is possible with a browser to override styles locally. I'd try it on a different system or in a clean VM and see what happens. I assume the CHM looks OK on your system. Once the application is installed, just swap the chm file and see if that makes any difference. The CHM doesn't have to come through the installer. Basically, anything the CHM needs is in that one file, but since IE is the one displaying the content all bets are off.
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: Styles lost when added to project

Post by Richard Ferrell »

I would run this patch on your machine and then see if that works for you.

http://kb.madcapsoftware.com/default_CSH.htm#PATF3103
Richard Ferrell

Certified Madcap Trainer
Image
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

Hi, thanks for the responses.
I tried that patch and it worked for one build and then, with the next build, the styles were lost again :cry:
And I'm starting to panic now.
bash7012
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: Styles lost when added to project

Post by Richard Ferrell »

I would be sure that all of your build machines have that patch applied. Once appliced it should work on all systems
Richard Ferrell

Certified Madcap Trainer
Image
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

I'm confused. My machine is the only one building the .chm and the only one with Flare.
Our developers take the .chm I give them and put it into their product build.
bash7012
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: Styles lost when added to project

Post by Richard Ferrell »

If you try to view the CHM on a different machine, not after its been added to the build, does it look correct?
Richard Ferrell

Certified Madcap Trainer
Image
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

It does. The styles display normally when viewed on another machine before placing it in the build.
bash7012
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Styles lost when added to project

Post by KevinDAmery »

Ok, just to clarify, which kind of build are we talking about here? I.e. Flare building the CHM works the first time and not the second, or the developer building your app and including the CHM works the first time and not the second time?
Until next time....
Image
Kevin Amery
Certified MAD for Flare
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

Flare builds .chm and it looks great on my pc and on other pcs, it gets added to the product by a developer and the styles break.

Problem: The developer is adding it in the same way as he did before but this style issue is a new one.
bash7012
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Styles lost when added to project

Post by KevinDAmery »

It sounds like the developer may not be adding the updated version of the CHM. Is he/she getting the CHM from source control, or just taking the file you send over? If its from source control, make sure that the latest version of the CHM is in the location in source control that they're pulling the file from.

One tip: you can add a visual confirmation that the included CHM is the correct one by putting a date in the help file. I have a Date variable at the bottom of my master page preceded by the phrase "Help compiled on:". This way we can tell simply by looking at the bottom of a topic which version of the help file we're looking at. If the date is wrong (or not there at all) you know the developer is including an old copy of the CHM.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Styles lost when added to project

Post by RamonS »

You can also just write "TEST" as first word on the default topic. That way you don't have to tinker around with the master page. Just don't forget to take it out once it is ready for release.

So, the CHM looks styleless even when you install the new build on your PC? In that case, replace the CHM that got installed with the one from the Flare output folder and try accessing the help from within the application. If that doesn't work then we really have a very bizarre case here.
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

Hi,

I'm sorry to tell you that I already know they've included the correct version of the build as it contains new topics that weren't in the old version.
replace the CHM that got installed with the one from the Flare output folder and try accessing the help from within the application.


Here is what I have been doing...

> I zip the file in the Flare Output folder and e-mail it to the developer.
> She includes it in the product build.
> I install the new build of the product/application and access the help from within it.
> The styles don't work :(
bash7012
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Styles lost when added to project

Post by RamonS »

OK, now copy the CHM file on your system from your output folder to the folder of the application where the help file is located. Then open the copy of the CHM file in the application folder by double-clicking on it. At that point the styles ought to work. Then start the application and access the help.
What you could also do is a binary compare between the CHM in the Flare output folder and see if there really isn't a difference between the files. Also, any way to provide the developer with the CHM through other means than email? It wouldn't be the first time that I come across email servers altering attachments. Alternatively, you can also try to add a password on the archive and then remove the file extension. That is usually sufficient to make any security application keep its fingers off your files. I'm just guessing here as to what might happen, no need to be sorry.
Pete Lees
Sr. Propeller Head
Posts: 150
Joined: Thu Feb 09, 2006 12:33 pm
Location: Bracknell, Berkshire, UK

Re: Styles lost when added to project

Post by Pete Lees »

Hi, bash7012,

From what you've written so far, it sounds like this problem is evident only when you call the help file from the application. Is that correct? That the contents of the help file look OK when it is opened by double-clicking in Windows Explorer but wrong when the file is called from the application? If so, the following thread appears to be describing the same problem:

CHM not finding CSS - Revisited

It would be useful to know:
  • How each of the topics is linked to the style sheet. If you open the help file, right-click a topic in the right-hand topic pane and then select View Source on the context menu, what do the <link> elements at the top of the HTML file contain?
  • The code that the developers are using to call the help file. Can you get this from them?
Pete
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

Hi all,

Thank you for the help.

The following worked: our project leader put the chm file in the same folder as the program executable and the styles are fine.

Note: we are using a .NET based program and we launch the help using the following code:

Code: Select all

System.Windows.Forms.Help.ShowHelp(this, pathAndFullName);
The issue appears to be that “pathAndFullName” is a subdirectory and not the same folder where the application is stored.
As a workaround for our project, our build managers will move the help file to the main directory.

! Problem: The Search function no longer works. No matter what terms I enter, I get a "No Topics Found" result.

Could the move have broken the Search link?

Kind regards,
bash7012
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

Oh dear,

The broken search function is not linked to moving the .chm.
The Search works from within the program, which is using a build I created on my machine before my machine was rebuilt.

I've recently had my machine rebuilt and had madcap Flare version 3.1 installed cleanly on my machine.

Now none of my .chm builds' Search functions work.

:cry:
bash7012
Pete Lees
Sr. Propeller Head
Posts: 150
Joined: Thu Feb 09, 2006 12:33 pm
Location: Bracknell, Berkshire, UK

Re: Styles lost when added to project

Post by Pete Lees »

Hi,

Have a look at this Knowledge Base article:

No Search results in HTML Help file

Pete
bash7012
Propeller Head
Posts: 30
Joined: Tue Mar 14, 2006 3:43 am

Re: Styles lost when added to project

Post by bash7012 »

Thank You Very Much Pete :D

And thank you Ramon, Kevin and Richard.

All is working well now. I REALLY appreciate your help.
bash7012
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: Styles lost when added to project

Post by Richard Ferrell »

Glad to Help!
Richard Ferrell

Certified Madcap Trainer
Image
Post Reply