Bug 988192 - Bug: Conditions are not working
Bug: Conditions are not working
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: DocBook-builder (Show other bugs)
1.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lee Newson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 00:33 EDT by Misha H. Ali
Modified: 2013-09-16 01:40 EDT (History)
2 users (show)

See Also:
Fixed In Version: 0.33.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-05 21:15:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Misha H. Ali 2013-07-25 00:33:38 EDT
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 01:05:47 EDT
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 19:52:26 EDT
0.33.6 has now been released.
Comment 3 Misha H. Ali 2013-08-05 21:03:20 EDT
The conditions display as expected on the docbuilder.
Comment 4 Lee Newson 2013-09-16 01:40:38 EDT
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.