Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#21791 closed Bug (worksforme)

RelatedFieldWidgetWrapper object has no attribute decompress

Reported by: DylannCordel 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 Changed 14 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 14 months ago by DylannCordel

  • Resolution set to worksforme
  • Status changed from new to closed

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 Changed 14 months ago by anonymous

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 Changed 14 months ago by timo

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

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