File overwriting issue when reimporting a revised word file

This forum is for all Flare issues related to importing files or projects.
Post Reply
ophil
Jr. Propeller Head
Posts: 4
Joined: Thu Mar 29, 2007 12:39 am

File overwriting issue when reimporting a revised word file

Post by ophil »

Flare version : 4.0.16

Procedure:
1) Make & build a webhelp project by importing an ms word file.
2) Revise the word file.
3) Reimport the word file.

Issue:
In general, the Flare asks me whether to overwrite the css/htm/fltoc files or not.
However, frequently, flare doesn’t ask me this, even if some css/htm files are modified.
In this case (case of doesn’t asking), the revised topic htm files are overwritten.
And the revised css file is newly generated with the filename suffix “1” (ex: my_word_style1.css), and the old css file (ex: my_word_style.css) is removed by flare.
However, the topic htm files still refer the old css file.
As a result, Flare generates link errors when building target, or the output webhelp with wrong style. The Master Style of this project is set to “my_word_style.css” at the first time when the project is made.
Last edited by ophil on Mon Sep 29, 2008 9:03 pm, edited 1 time in total.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: File overwriting issue when reimport a revised ms word file

Post by RamonS »

A workaround is to clear the output folder before generating new output. You can do that from within Flare or use Explorer or the command line. Besides that, you may want to get in touch with support. Maybe it some setting or even a bug that is worth checking out.
ophil
Jr. Propeller Head
Posts: 4
Joined: Thu Mar 29, 2007 12:39 am

Re: File overwriting issue when reimport a revised ms word file

Post by ophil »

I think the workaround will not work.
That overwriting issue is at the time of importing word file, not building output.

That is,
\Flareproject1\Content\Resources\Stylesheets\*.css
\Flareproject1\Content\importingname\*.htm

Not the output folder.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: File overwriting issue when reimport a revised ms word file

Post by RamonS »

Oh, sorry, I couldn't get that from your first post.
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: File overwriting issue when reimport a revised ms word file

Post by GregStenhouse »

ophil wrote:However, the topic htm files still refer the old css file.
Funny, I have the same problem but in reverse. Flare does not create a new CSS (there is only Styles.css in the folder), but the topics are referring to Styles1.css Same result as you (errors when building), and the topics have no formatting as they can't find the css. I am importing from Frame.

I raised a support ticket, but they can't recreate the issue.
SusanL
Propeller Head
Posts: 77
Joined: Thu Nov 13, 2008 6:50 am
Location: Atlanta metro

Re: File overwriting issue when reimporting a revised word file

Post by SusanL »

I have the same problem as the original poster, although a slightly different scenario. Everything seemed to be working fine until I added a new Word file to the original import file. I don't recall getting a warning message that my files were getting overwritten. Then it created a second TOC file by adding a 1 at the end of the original file, and in the same way created a second CSS file. But the project was still looking for the original TOC and CSS files and couldn't find them when generating. Once I changed the project settings to use the new TOC and CSS files, it worked again.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: File overwriting issue when reimporting a revised word file

Post by KevinDAmery »

I would use a different import file if you need to add different Word files to the project later. The easiest way to do that would be to copy the original .flimp, then remove the existing Word files from it and add the new one(s). This way adding new files won't interfere with existing content.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
SusanL
Propeller Head
Posts: 77
Joined: Thu Nov 13, 2008 6:50 am
Location: Atlanta metro

Re: File overwriting issue when reimporting a revised word file

Post by SusanL »

KevinDAmery wrote:I would use a different import file if you need to add different Word files to the project later. The easiest way to do that would be to copy the original .flimp, then remove the existing Word files from it and add the new one(s). This way adding new files won't interfere with existing content.
I'm a little confused by this. If I want to reimport revised Word files, I want them to overwrite the original files. Are you saying to delete the files from the import file that are to be revised? At what stage does the file get replaced with new information? I am trying to avoid the creation of a new TOC and stylesheet.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: File overwriting issue when reimporting a revised word file

Post by KevinDAmery »

Guess I misunderstood. I thought you said you had a new Word document that wasn't part of the original import (i.e. originally you imported documents A, B, and C, and now you have to add document D to the project). My suggestion was a way to import document D without impacting content from documents A-C. If that isn't what you're describing, the steps I provided won't be appropriate.

For the stylesheet, set the import files up to NOT take their style information from the Word documents. Instead, you'll attach the content from the documents to an existing css. Then you can map the Word styles to the styles in that css.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: File overwriting issue when reimporting a revised word file

Post by wclass »

I have also come across this issue, but have only just been able to repeat it (recent testing with the v4.1 upgrade).

If you have the following settings on the Stylesheet tab of the import screen you can repeat the problem on RE-IMPORT:
  • Stylesheet selected, for example, myStyles.css
  • "Preserve Word styles" selected.
When you first import a Word file with these settings you are effectively saying:
  • "When importing, map the styles of the imported paragraphs to those found in my stylesheet called myStyles.css"
  • "But update the styles with what you find in the document"
Which is possibly a little confusing, but you can say it. What happens is the new topics are linked to the specified style sheet, and any new styles that need to be created are added to the end of the existing stylesheet. The sorts of styles/classes that get created are "h1.Heading1" and "p.p_1" - which means the original "h1" or "p" styles are not overwritten, but new classes are created that inherit those settings (this does depend on your paragraph mapping).
OK, this makes sense so far.

When you do a re-import, Flare makes a copy of the stylesheet and adds a suffix of "1" (or the next number - I got up to 4 with some combinations before I called a halt!), and adds any new styles it finds to the new style sheet. You now have 2 stylesheets with duplicated styles, and some topics mapped to one and some to the other.
This is NOT a good thing - the major problem at this point is the duplicated styles in the different style sheets.

And if you update the files and re-import again, you get a suffix of 2 and the styles1 file is deleted, or if you import other documents as well and map to the same style sheet you get extras created - this is getting worse - deleting stylesheets that some topics are connected to is a problem.

Now this is certainly a bug, and to fix the bug, I'd first suggest that the duplicate style sheets should not be created - and we need to know why that is happening. But it is probably worth re-assessing the import options, because you might just be able to avoid the problem if you don't map and preserve at the same time.

I'll post a separate topic on Word import scenarios as it is too big to add here - see http://forums.madcapsoftware.com/viewto ... 821#p43855
Margaret Hassall - Melbourne
Post Reply