Hi Gustaf,
I order to test your hypothesis, I've used the following query:
select x.item_id,
c.name,
c.parent_id,
c2.name,
c3.folder_id,
c3.package_id
from xowiki_form_pagei x
inner join cr_items c on x.item_id = c.item_id
inner join cr_items c2 on c.parent_id = c2.item_id
inner join cr_folders c3 on c.parent_id = c3.folder_id
order by x.item_id desc;
In all the cases I could find, the xowiki_form_page parent_id is the same value as the xowiki root content_folder. The funny thing about it is that I had, a while ago, one problem where some pages where going to other folders different from the xowiki root one. Do you think these issues can be related?
I'll try to find out if there are any other xowiki pages or objects in other folders different from the package root. Maybe this is a good investigation line.