When I output my project to PDF, things go well. No errors.
However, when I output my project to Web, I get the dreaded "Build failed: The specified path, file name, or both are too long."
Why am I getting this error for Web output but not for PDF output?
Build Failed: The "too long" error
-
ccardimon
- Propellus Maximus
- Posts: 1571
- Joined: Fri Jan 11, 2008 1:30 pm
- Location: Horsham, Pennsylvania
Build Failed: The "too long" error
Craig
Lost in Disturbia
Lost in Disturbia
Re: Build Failed: The "too long" error
In my experience this happens when the name of a file or folder within the project is so long that when Flare attempts to copy it into the output folder, the file path for the copy exceeds the Windows limit of 260 characters for a file path. This doesn't happen for your PDF output because there you are just making a single file and not making a copy of the file at a longer path.
Typically, your source files might be at a location such as
C:\yaddayadda\Documentation\Current\product_name\project_name\Content\html\topicname.htm
When you build the output, the files get copied to
C:\yaddayadda\Documentation\Current\product_name\project_name\Output\username\targetname\Content\html\topicname.htm
Or, if you are pulling in subprojects, a topic in merged output might end up at:
C:\yaddayadda\Documentation\Current\product_name\project_name\Output\username\targetname\Subsystems\subproject_name\Content\html\topicname.htm
As you can see, this is quite a long path, and depending on the lengths of target and project names can be longer than the source file by 40 or more characters.
Windows does not allow the creation of a file such that this entire path exceeds 260 characters. That is what causes this bug.
Now that said, my example is only 140 characters. But with long folder and topic names, you can reach the limit. One of my fellow writers encountered this problem and discovered there was a topic in the project named
isthereanydifferencebetweeninstallingthedistributedmimiserversoftwareonanntserverstationversusanntworkstation_.htm
which was apparently generated from a Word source project in Doc-to-Help or RoboHelp back when people used Windows NT. The project was being built into CHM until recently being imported into Flare and generated as HTML5, at which time this issue occurred.
Typically, your source files might be at a location such as
C:\yaddayadda\Documentation\Current\product_name\project_name\Content\html\topicname.htm
When you build the output, the files get copied to
C:\yaddayadda\Documentation\Current\product_name\project_name\Output\username\targetname\Content\html\topicname.htm
Or, if you are pulling in subprojects, a topic in merged output might end up at:
C:\yaddayadda\Documentation\Current\product_name\project_name\Output\username\targetname\Subsystems\subproject_name\Content\html\topicname.htm
As you can see, this is quite a long path, and depending on the lengths of target and project names can be longer than the source file by 40 or more characters.
Windows does not allow the creation of a file such that this entire path exceeds 260 characters. That is what causes this bug.
Now that said, my example is only 140 characters. But with long folder and topic names, you can reach the limit. One of my fellow writers encountered this problem and discovered there was a topic in the project named
isthereanydifferencebetweeninstallingthedistributedmimiserversoftwareonanntserverstationversusanntworkstation_.htm
which was apparently generated from a Word source project in Doc-to-Help or RoboHelp back when people used Windows NT. The project was being built into CHM until recently being imported into Flare and generated as HTML5, at which time this issue occurred.
-
ccardimon
- Propellus Maximus
- Posts: 1571
- Joined: Fri Jan 11, 2008 1:30 pm
- Location: Horsham, Pennsylvania
Re: Build Failed: The "too long" error
Thanks for replying. I have some detective work to do.
Craig
Lost in Disturbia
Lost in Disturbia
-
smajors
- Sr. Propeller Head
- Posts: 180
- Joined: Mon Oct 21, 2013 9:28 am
- Location: Midwest United States
Re: Build Failed: The "too long" error
What would suddenly be causing this error? I have not changed the file path or the name of the project. The error doesn't specify if it's a specific topic/file within the project. The last successful build was a few days ago and nothing changed since then.
Technical Writer
Training & Development Team/Marketing Department
Training & Development Team/Marketing Department
Re: Build Failed: The "too long" error
Hello all,
I know this thread is an old one and that the "too long error" has been discussed for years, but I keep getting this error and it's driving me really crazy! Here is a short description of my project:
My only solution today is to change the target names, publish to another private directory, run a batch rename on the generated pdfs, and move them to the correct public directory (where they are automatically published in our EDM. This is really bad, specially since those targets will also go through translation via Lingo and I get the same problem on other languages.
The longest path/file I could find while building these pdfs is this one:
C:\0_MC\Flare\PartnerProgram\Output\Maf\ARCHI-GED-CTR-2016-AppendixETrainingCertificationUnitedKingdom-en-US\ARCHI-GED-CTR-2016-AppendixETrainingCertificationUnitedKingdom-en-US.mclog
Which is "only" 183 characters long so I am quite far from the 260 or even the 248 character limit.
So my question is: is there a way to know what path/file is causing the problem??? I looked in the build logs and I couldn't find any mention of the culprit. And I could not find where the temporary files are. It would really help to know where I can cut on paths or filenames. Any idea anybody or shall I submit as a bug to get some help from Madcap support ?
I know this thread is an old one and that the "too long error" has been discussed for years, but I keep getting this error and it's driving me really crazy! Here is a short description of my project:
- it's a project that outputs more than 50 different targets
- Outputs are only Pdf, no HTML5
- I have shorten my local path to the bare minimum: C:\0_MC\Flare\ProjectName
- My target names are long but there is nothing I can do about it because they must follow our strict naming convention:
e.g. for the longest target: ARCHI-GED-CTR-2016-AppendixETrainingCertificationUnitedKingdom-en-US - I use Source Control (TFS) and Global Project Linking
My only solution today is to change the target names, publish to another private directory, run a batch rename on the generated pdfs, and move them to the correct public directory (where they are automatically published in our EDM. This is really bad, specially since those targets will also go through translation via Lingo and I get the same problem on other languages.
The longest path/file I could find while building these pdfs is this one:
C:\0_MC\Flare\PartnerProgram\Output\Maf\ARCHI-GED-CTR-2016-AppendixETrainingCertificationUnitedKingdom-en-US\ARCHI-GED-CTR-2016-AppendixETrainingCertificationUnitedKingdom-en-US.mclog
Which is "only" 183 characters long so I am quite far from the 260 or even the 248 character limit.
So my question is: is there a way to know what path/file is causing the problem??? I looked in the build logs and I couldn't find any mention of the culprit. And I could not find where the temporary files are. It would really help to know where I can cut on paths or filenames. Any idea anybody or shall I submit as a bug to get some help from Madcap support ?
Re: Build Failed: The "too long" error
Hourray ! I found the solution for my problem : MadCap was using a veeeeeeery long path to compile its build logs..
I went to file/options in Flare and set a short path in the build section (C:\0_MC\Logs) and the problem went away for ever !!! what a relief !
Hope this helps people in the future
I went to file/options in Flare and set a short path in the build section (C:\0_MC\Logs) and the problem went away for ever !!! what a relief !
Hope this helps people in the future
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Build Failed: The "too long" error
Eventually, the DOS era limitation is supposed to get removed in a Win 10 update. It was included in an Insider build in May. Hey, there is one positive thing to say about Win 10!
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U