Bug 988192 - Bug: Conditions are not working
Summary: Bug: Conditions are not working
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: DocBook-builder
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: 2013-07-25 04:33 UTC by Misha H. Ali
Modified: 2013-09-16 05:40 UTC (History)
2 users (show)

Fixed In Version: 0.33.6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-06 01:15:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Misha H. Ali 2013-07-25 04:33:38 UTC
A topic is shared between two books for two separate products. Conditions ("JDG" for JBoss Data Grid and "WFK" for Web Framework Kit) are added to the topic to ensure a different paragraph appears for each book.

In the docbuilder, the WFK book displays the topic correctly (See the material under the "Reader Strategies" section title):

http://docbuilder.usersys.redhat.com/14189/#sect-Reader_Strategies

The JDG book shows no content for the same topic:

http://docbuilder.usersys.redhat.com/14318/#sect-Reader_Strategies

It looks like the conditions are correctly implemented in the topic and the CSP Maps.

Comment 1 Lee Newson 2013-07-25 05:05:47 UTC
Fixed in 0.33.6

The problem was caused by the way the builder copies the Topic DOM document into the section/chapter Document and actually had nothing to do with the conditions. You could replicate this by using a complex topic as the Front Matter topic and then you should see some of the content at the bottom of the topic will not exist.

Technical Notes:

When you are append/import nodes from another document the nodes are actually removed from the original Document/NodeList and then placed in the new one. Because of this you can't copy content by just doing a for loop and using NodeList.get(int) to copy the nodes. Instead you need to either work in reverse or loop making sure to get the initial element until the NodeList is empty.

Comment 2 Lee Newson 2013-07-28 23:52:26 UTC
0.33.6 has now been released.

Comment 3 Misha H. Ali 2013-08-06 01:03:20 UTC
The conditions display as expected on the docbuilder.

Comment 4 Lee Newson 2013-09-16 05:40:38 UTC
Note: There was a regression in 1.0.0 and 1.0.1 that caused this to happen again. It has been fixed in 1.0.2 which has just been released.


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