Upgraded to Drupal 6 a while back and the book hierarchy is empty (at www.domainname.com/book ) on my site. I don't know exactly when it occurred (my hobby site is quite low traffic), but the admin user nor any other user that can edit books, and the anonymous (not logged in users) can't see them.

The pages are accessible via google indexing that was done previously and they are findable in the search.

If I go to a book page and click Outline, the book outline box has no book selected, and the drop down list box of books is empty. It's like the pages still exist but aren't attached to anything and the site admin apparently doesn't have rights to even see any books to attach to each other hierarchically.

The book table looks like this in my PostgreSQL database and it has data in it:

Table "public.book"
 Column |     Type     |     Modifiers
--------+--------------+--------------------
 mlid   | int_unsigned | not null default 0
 nid    | int_unsigned | not null default 0
 bid    | int_unsigned | not null default 0
Indexes:
    "book_pkey" PRIMARY KEY, btree (mlid)
    "book_nid_key" UNIQUE, btree (nid)
    "book_bid_idx" btree (bid)

I suspect it's missing its sequence, as other tables did before I manually fixed them, but I don't get an error in the logs about it.

Comments

pmunn’s picture

Check constraints are missing from my upgraded drupal versus a new install of 6.17 on postgresql.

Check constraints:
    "book_bid_check" CHECK (bid >= 0)
    "book_mlid_check" CHECK (mlid >= 0)
    "book_nid_check" CHECK (nid >= 0)
pmunn’s picture

Added them thusly:

ALTER TABLE book ADD CONSTRAINT book_bid_check CHECK (bid >= 0);
ALTER TABLE book ADD CONSTRAINT book_mlid_check CHECK (mlid >= 0);
ALTER TABLE book ADD CONSTRAINT book_nid_check CHECK (nid >= 0);

But they appear differently on my table:

Table "public.book"
 Column |     Type     |     Modifiers
--------+--------------+--------------------
 mlid   | int_unsigned | not null default 0
 nid    | int_unsigned | not null default 0
 bid    | int_unsigned | not null default 0
Indexes:
    "book_pkey" PRIMARY KEY, btree (mlid)
    "book_nid_key" UNIQUE, btree (nid)
    "book_bid_idx" btree (bid)
Check constraints:
    "book_bid_check" CHECK (bid::integer >= 0)
    "book_mlid_check" CHECK (mlid::integer >= 0)
    "book_nid_check" CHECK (nid::integer >= 0)
pmunn’s picture

I'm still not seeing anything at /admin/content/book either.

No errors in the db, no problems elsewhere. Checked on content settings, can't figure this one out. Suggestions, please?

pmunn’s picture

Assigned: Unassigned » pmunn

Aha this is a duplicate of: http://drupal.org/node/645214

Hm, how do I mark it as such...

pmunn’s picture

Assigned: pmunn » Unassigned
Status: Active » Closed (duplicate)