Bug 1017511 - In articles 'Section:' is ignored unless nested in another section
In articles 'Section:' is ignored unless nested in another section
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: Web-UI (Show other bugs)
1.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lee Newson
mmurray
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 00:57 EDT by mmurray
Modified: 2013-10-10 02:14 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.0.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-10 02:14:55 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 mmurray 2013-10-10 00:57:46 EDT
Description of problem:
For articles 'Section:' is ignored unless nested in another section. So overall section numbering isn't as expected.

Example:
Would expect this content spec snippet [cs 12561, type=article]

Goal [12563]
Section: Documentation Plan
  Priority One Documentation Items [12852]
  Priority Two Documentation Items [12851]
Alpha and Beta Documentation [13164]
Section: Content Specification
  Content Specifications [12717]
  Section: JBoss BRMS 6
    BRMS Getting Started Guide [12574]
    BRMS Installation Guide [12571]

To come out something like
1. Goal
2. Documentation Plan
  2.1 Priority One
  2.2 Priority Two
3. Alpha and Beta Documentation
4. Content Specification
  4.1 Content Specifications
  4.2 JBoss BRMS 6
    4.2.1 BRMS Getting Started Guide
    4.2.2 BRMS Installation Guide 

But get
1. Goal
2. Priority One
3. Priority Two
4. Alpha and Beta Documentation
5. Content Specifications
6. JBoss BRMS 6
  6.1 BRMS Getting Started Guide
  6.2 BRMS Installation Guide

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

How reproducible:
Also see cs 22485
Comment 1 Lee Newson 2013-10-10 01:09:04 EDT
Looking into this now. At a first glance it looks like it's not creating the root level section elements. ie

The XML is:

<section>
  <title>Goal</title>
  ...
</section>
<section>
  <title>Priority One</title>
  ...
</section>
...

When it should be:

<section>
  <title>Goal</title>
  ...
</section>
<section>
  <title>Documentation Plan</title>
  <section>
    <title>Priority One</title>
    ...
  </section>
</section>
...
Comment 2 Lee Newson 2013-10-10 01:42:28 EDT
Fixed in csprocessor 1.0.6

The problem was caused by the way the content was being added to the DOM Document, where the child elements were being added to the root element and as such it was producing incorrect XML.
Comment 4 mmurray 2013-10-10 02:08:51 EDT
Looks to be fixed in csprocessor 1.0.6:
* sections (eg, 1.) exist within document
* section topics (eg, 1.2) are correctly numbered
* sub-section topics (eg, 1.2.3) are correctly numbered

But noticed that sub-subsections are not included in table of contents. Perhaps not listing sub-subsections in table of contents is just how articles work? 

Example output:

So content spec
Alpha and Beta Documentation [13164]
Section: Content Specification
  Content Specifications [12717]
  Section: JBoss BRMS 6
    BRMS Getting Started Guide [12574]
    BRMS Installation Guide [12571]
    BRMS Administration and Configuration Guide [12575]
  Section: JBoss BPMS 6
    BPMS Getting Started Guide [12572]

results in
1. Alpha and Beta Documentation
2. Content Specification
  2.1 Content Specifications
  2.2 JBoss BRMS 6
  2.3 JBoss BPMS 6

Setting back to assigned for table of content behavior verification
Comment 5 Lee Newson 2013-10-10 02:14:55 EDT
Moving to CLOSED CURRENTRELEASE since that is a publican feature.

If you want more than a toc depth of 2 you need to add "toc_section_depth: <NUM>" to the publican.cfg, where <NUM> is the depth you want (2 is the default which is why subsections aren't displayed).

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