After a recent update from TYPO3 6.1 to 6.2 on a site that makes use of the new sys_category function, I noticed a strange behaviour:
Even though categories were shown in the front end and, if viewed with the list tool in the backend, also showed as defined, they were not selected on their according pages.
In page-edit view, the pages would not have their categories attached - none of the categories were checked. But the correct categories were shown on these pages in the front end.
Back in the list view of the categories, a click on info on a category would show that indeed pages are attached to that category.
If I then re-checked a category (back in page edit), to attach this page to the category, it now would be displayed twice in the front end on that page.
After comparing "old" and "new" (i.e. re-checked) categories directly in the database, it turned out that the old categories that had been defined in TYPO3 6.1, had no value in the column "fieldname" in the database table "sys_category_record_mm".
After manually inserting the string "category" in that column for the "old" categories, everything works as expected.
I am sure I ran all the upgrade wizards in the install tool and let it handle all of the database changes needed during the upgrade from 6.1 to 6.2 - seems like the 'category' string needed in the "sys_category_record_mm.fieldname" column slipped somehow.