Bug 831295 - running "updatebook" fails with a list of Invalid Topic Title errors
running "updatebook" fails with a list of Invalid Topic Title errors
Status: CLOSED CURRENTRELEASE
Product: Topic Tool
Classification: Other
Component: FUDCon Docs Hack (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Joshua Wulf
Joshua Wulf
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 13:35 EDT by Joshua Wulf
Modified: 2014-10-19 19:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-08 10:38:54 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 Joshua Wulf 2012-06-12 13:35:12 EDT
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 13:47:22 EDT
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.