Closed Bug 495544 Opened 15 years ago Closed 14 years ago

tiki_pages and tiki_objects should be related on a primary key

Categories

(support.mozilla.org :: General, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: cww, Unassigned)

References

Details

tiki_objects stores all objects so they can be categorized and given permissions and translated etc.  tiki_pages stores the wikipages themselves.

Each page should have a single entry in tiki_objects AND there should be an easy way to relate the two.

Right now the only common column is tiki_pages.pageName and tiki_objects.itemId which doesn't use a primary key from either table.  So you're not sure that you only get unique results and you're affecting the right row when you do things like change permissions on pages.  Unfortunately for some tiki_pageName, there are multiple tiki_objects rows and for some there are zero.

SELECT tp.pageName, count(distinct(tob.objectId)) as count FROM tiki_pages tp LEFT OUTER JOIN tiki_objects tob ON tp.pageName = tob.itemId AND tob.type = 'wiki page' group by tp.pageName HAVING NOT count = 1 order by count desc; returns 183 rows.

This bug is to relate the two using a primary key so that the link between tiki_pages and things like permissions and categories and translations is unique.  It should also clean up the 183 broken or multiple links returned by the query above.
Blocks: 504663
Severity: normal → major
Bugs in tikiwiki, going away.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.