Bug 1071059 - Misleading error message in Pressgang Import Tool
Summary: Misleading error message in Pressgang Import Tool
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: ImportTool
Version: 1.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.5
Assignee: Matthew Casperson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-28 03:43 UTC by Ruediger Landmann
Modified: 2014-08-04 22:28 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-01 21:40:00 UTC
Embargoed:


Attachments (Terms of Use)
publican zip file with invalid source dir (5.86 KB, application/zip)
2014-04-01 03:32 UTC, Matthew Casperson
no flags Details

Description Ruediger Landmann 2014-02-28 03:43:47 UTC
Description of problem:
When I tried to upload a zip file of a Publican-based book, the uploader failed with a message that "The ZIP file did not contain a publican.cfg file."

The Zip files did contain a publican.cfg file; however the directory containing the book's XML was named incorrectly ("xml" instead of "en-US")

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Create a Zip file containing a Publican-based book, including its Publican.cfg file, but with the XML directory misnamed.
2. Select "Publican" as the input source
3. (keep clicking "Next", accepting defaults"
4. Attempt to upload the Zip file you created

Actual results:
Import stops with error "The ZIP file did not contain a publican.cfg file."

Expected results:
PressGang reports that it can't find the XML directory that's specified by the "xml_lang:" parameter in the publican.cfg file. 


Additional info:

Comment 1 Matthew Casperson 2014-03-14 03:19:24 UTC
The message has been changed to "The ZIP file did not contain a publican.cfg file in the root folder of the ZIP archive."

Comment 2 Lee Newson 2014-04-01 02:22:09 UTC
I get that error message now when the publican.cfg is in another directory. However renaming the "en-US" directory to "xml" produces no error and just gives me an empty list. Additionally from the empty list I can click next and it continues without any problem.

Comment 3 Matthew Casperson 2014-04-01 03:32:04 UTC
Created attachment 881198 [details]
publican zip file with invalid source dir

Comment 4 Matthew Casperson 2014-04-01 03:32:27 UTC
When no files are found in the language dir, an error message is displayed.

Comment 5 Matthew Casperson 2014-04-01 03:32:37 UTC
Fixed in 201404011324

Comment 6 Lee Newson 2014-04-01 04:56:03 UTC
I got the error message:

The source ZIP file has no XML files under the en-US directory.

However this indicates that the directory exists when it in fact doesn't, so we should probably use the above when no XML files are found in the xml_lang directory, and use something like

Cannot find the en-US directory in the supplied source ZIP.

Comment 7 Matthew Casperson 2014-04-01 22:59:10 UTC
Fixed in 201404020837

Different messages are produce if the directory is missing, and if it is empty.

Comment 8 Lee Newson 2014-04-02 01:42:53 UTC
I now get different errors, however the error makes me restart the entire import which is annoying.

Additionally it doesn't look like importing from a directory works any more on Chrome, as I just keep getting the following error:

The source ZIP file has no en-US directory.

Comment 9 Matthew Casperson 2014-04-02 02:59:09 UTC
The API that interacts with the file system uses slightly different filenames for a directory than the library the reads zip files. The logic that checks to see if the directory exists now accounts for this difference.

Comment 10 Matthew Casperson 2014-04-02 03:22:28 UTC
The fix for the incorrect empty directory message is live in 201404021320.

Comment 11 Matthew Casperson 2014-04-02 03:41:32 UTC
Fixed in 201404021340

When a zip file or directory is selected without the required files, you are prevented from continuing instead of the import process restarting.

Comment 12 Lee Newson 2014-04-02 04:42:40 UTC
Verified


Note You need to log in before you can comment on or make changes to this bug.