I'm facing this error when using django-filer along with django_cms:
Error during template rendering
In template /opt/xxx/local/lib/python2.7/site-packages/filer/templates/admin/filer/tools/clipboard/clipboard_item_rows.html, error at line 1
django_polymorphic: result objects do not have unique primary keys - model <class 'filer.models.filemodels.File'>
Database used is postgress
It occurs whenever I try to access a filer related page and only with one single user.
Didn't have the chance to dig yet, just filling an issue here if someone already knows better.
Sorry for the delayed response @johnraz. Are you still having this issue?
Can you provide more details and package versions (django-filer, django, django_polymorphic)
Hello @stefanfoulis , no worries we all are very busy.
My package versions:
User is trying to upload a file with cms_plugin. Somehow it fails and from then the user cannot acces the admin at all.
This is cause by an assert in django-polymorphic that says that there is a conflict in pk:
I commented, the raise (yea dirty), and everything seems to be ok.
This occured only for one of my customer using firefox for mac ... So as I don't own a mac, I wasn't able to reproduce, just to play with the actual broken database...
Maybe this not unique pk rings any bell ?
I had same problem and solved it by deleting everything from 'filer_clipboarditems' table. Strange thing it had some rows with same 'file_id' value
+1 for clearing out the filer_clipboarditem table fixing this issue. The following query finds the (possibly) offending rows: select file_id, count(file_id) from filer_clipboarditem group by file_id having (count(file_id) > 1);