Ibrahim Awwal wrote:
Hi guys,
I have this weird issue where my category pages seem to get populated with
duplicates of the pages in that category. Eg. If I have a category:Foo, and
pages Bar and Baz, on the page Category:Foo, I see
*Bar
*Bar
*Bar
*Baz
*Baz
Anyone know why this might happen? I have a hunch that it happened in the
past when I ran the upgrade script, because newer pages in that category
don't have duplicates yet.
In the case that there are problems with my database, what would be the best
course of action? I posted here a couple days ago about database errors
during the upgrade process, so I'm wondering if there is some bug in the
database that keeps getting propagated by the upgrade scripts. The data in
the wiki is pretty critical and backed up on a regular basis.
Thanks!
-Ibrahim Awwal
cl_from,cl_to is a primary key. Having the a page on the category twice
shouldn't be allowed by the database.
What's the output of this query?
SELECT page_namespace, page_title, cl_to FROM page JOIN categorylinks
WHERE cl_from = page_id AND cl_to = 'Foo';