Bug 821193 - CSP/Skynet allows invalid titles
Summary: CSP/Skynet allows invalid titles
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-12 23:16 UTC by Joshua Wulf
Modified: 2014-10-19 23:00 UTC (History)
2 users (show)

Fixed In Version: 0.24.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-07 01:30:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-05-12 23:16:33 UTC
You can specify a title: 

???

in the CSP, and Skynet will create the topic. However, when you try to build the book you get:


FATAL ERROR: XInclude:1604 in Chapter-Additional_Things.xml on line 19: could not load topics/.xml, and no fallback was found
 at /usr/bin/publican line 622


So, perhaps the CSP should enforce the same rules that XPointer does on topic titles.

Comment 1 Joshua Wulf 2012-05-12 23:24:41 UTC
Having two sections in a content spec like this:

Section C

Section C++

Causes this error on build:


FATAL ERROR: validity:513 in Chapter-Software_Development_with_Fedora.xml on line 64: ID Section-C already defined
 at /usr/bin/publican line 622

Comment 2 Lee Newson 2012-05-15 07:17:54 UTC
Fixed for the CSP in both cases in 0.24.0

This will still need to be fixed in Skynet.

Note: I won't be able to push this version up until the new version of skynet goes live due to fully re-implementing the builder.

Issue 1:

Cause:

Only checking that the topic title wasn't empty.

Consequence:

When the title was escaped it became an empty string. This in turn would cause publican builds to break.

Fix:

Add an extra validation step to ensure the string is still valid after escaping it.

Issue 2:

Cause:

Comparing title before they were escaped.

Consequence:

When the titles were escaped they became the same string and resulted in skipping the unique ids pass and having the same id.

Fix:

Compare the titles after escaping them.

Comment 3 Lee Newson 2012-05-15 07:18:49 UTC
See Bug #821627 for the invalid topic titles in the skynet queue.

Comment 4 Joshua Wulf 2012-05-15 10:43:12 UTC
Lee, I'm currently running the latest version of Skynet (for FUDCon), and need a csprocessor that works with it.

Can i build this one from source? (I have the build environment set up on my machine). Is there an svn tag for it?

Alternatively, is there a package I can download?

Comment 5 Lee Newson 2012-05-15 22:50:44 UTC
Josh, the changes are more then likely too large to work with the latest version as they require the changes made to the Commons Utilities library. As for a tag atm its in the git csprocessor-maven branch (however at the time of writing this its only committed locally and hasn't been pushed upstream).

In saying that though I'll have a look at fixing the 0.23.4 master branch so you can use it at fudcon.

Comment 6 Lee Newson 2012-05-15 23:38:07 UTC
I've added the fixes to 0.23.4 (see the master branch)

Comment 7 Lee Newson 2013-06-07 01:30:16 UTC
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.


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