Bug 831295 - running "updatebook" fails with a list of Invalid Topic Title errors
Summary: running "updatebook" fails with a list of Invalid Topic Title errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Topic Tool
Classification: Other
Component: FUDCon Docs Hack
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Joshua Wulf
QA Contact: Joshua Wulf
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-12 17:35 UTC by Joshua Wulf
Modified: 2014-10-19 23:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-08 14:38:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-06-12 17:35:12 UTC
Symptom:

When "updatebook" is run after a book has been edited, it fails with a list of errors like this:

ERROR: Line 53: Invalid Topic! Existing topic title doesn't match.
       -> Specified: "Try before you buy": Live CD and USB [225]
       -> Topic 225: Try Fedora easily with no risk: Live CD and USB
ERROR: Line 56: Invalid Topic! Existing topic title doesn't match.
       -> Specified: Create Live USB [238]
       -> Topic 238: Create Live USB on Microsoft Windows
ERROR: Line 64: Invalid Topic! Existing topic title doesn't match.
       -> Specified: The Red Hat Package Manager - rpm [179]
       -> Topic 179: The RPM Package Manager

Cause: 

The topic titles in the database and the names in the content spec must match, to ensure that reused topics are actually the ones that you mean to use. Imagine a situation where you reuse a topic, but accidentally enter the wrong topic ID. Your book would not come out as expected. A validation check when the spec is pushed ensures that what you want is what you get.

After extensive editing, however, it is common that topic titles are refined, changed, or fixed through editing. In this case you might wish to accept all changes into your content spec automatically.

Fix: 

There is a --permissive mode that rewrites all topic titles in your content spec to match the current titles in the database. Use this with care. 

To activate this option, add the option in the bin/updatebook script, like this:

 java -jar $HOME/csprocessor.jar push -p --config $HOME/csprocessor.ini --host http://127.0.0.1:8180/TopicIndex -u writer

Comment 1 Joshua Wulf 2012-06-12 17:47:22 UTC
Usually you will want to run the updatebook script first, check the error messages, then run in permissive mode.

In that case, add this to the updatebook script:

 java -jar $HOME/csprocessor.jar push $1 --config $HOME/csprocessor.ini --host http://127.0.0.1:8180/TopicIndex -u writer

Now you can call updatebook with -p, like so:

updatebook -p

to get permissive mode (rewrite all topic titles in the content spec with titles from the database)

and:

updatebook

to get an error report about topic titles that have been changed in the database since the content was last pushed.


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