Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#21791 closed Bug (worksforme)

RelatedFieldWidgetWrapper object has no attribute decompress

Reported by: Dylann CORDEL Owned by: nobody
Component: contrib.admin Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hi,

I'm still a newbie with Django, Django CMS and even Python... So, I apologize if it's not a "bug" but a misunderstanding of how it works.

The easiest way to reproduce this bug :

  • use the FilerImagePlugin in Django CMS to use in a placeHolder
  • add an Image and save this placeHolder
  • then, try to modify and save again the placeHolder : the error occurs.

I believe that the RelatedFieldWidgetWrapper class should have his own "decompress" function which only do a call of the widget's decompress function like this :

def decompress(self, initial):
    return self.widget.decompress(initial)

My complete traceback is here : http://dpaste.com/hold/1554861/

Change History (4)

comment:1 by Tim Graham, 10 years ago

It would be helpful if you could provide a minimal example (ideally a test for Django's test suite) to rule out an issue with django-cms itself.

comment:2 by Dylann CORDEL, 10 years ago

Resolution: worksforme
Status: newclosed

Hi,

The problem seems to be in cmsplugin_filer_image in class FilerImagePlugin where "page_link" is missing from raw_id_fields.
Maybe RelatedFieldWidgetWrapper really should have his own decompress method but I'll investiguate latter (currently, I rush to finish the project...).
I resolve this ticket as "worksforme" and will reopen it if it's necessary when I'll be sure there is something to do in Django :).

comment:3 by anonymous, 10 years ago

Just wanted to say this problem rears its head on my project too. Django 1.6.1, Python 2.7, django-cms beta3, djangocms-filer.

comment:4 by Tim Graham, 10 years ago

Here's a pull request for the issue in cmsplugin-filer.

Note: See TracTickets for help on using tickets.
Back to Top