divio / aldryn-people

People and Organizations
Other
9 stars 41 forks source link

Cannot add a new group properly when there are none to start with #71

Open mkoistinen opened 9 years ago

mkoistinen commented 9 years ago

When there are no, existing groups, attempting to create a group with the :heavy_plus_sign: in the Person change form doesn't work. Well, technically, it works (the group is created), but the pop-up window turns blank and doesn't refresh the Person change form.

On investigation, there is a JS error in the popup as shown here:

image

It is not clear why, but there seems to be an interaction between sortedm2m's and Django's own JS that only happens when there are no existing objects in the m2m widget.

mkoistinen commented 9 years ago

For the record this issue occurs even without using aldryn_common.admin_fields.sortedm2m.SortedM2MModelField.

mkoistinen commented 9 years ago

If the field is changed to a normal, models.ManyToManyField, it works perfectly (albeit without support for sorting, obviously).

mkoistinen commented 9 years ago

I have now proven this to be purely a sortedm2m issue and have opened this ticket at that project's repo: https://github.com/gregmuellegger/django-sortedm2m/issues/57.

mkoistinen commented 9 years ago

NOTE: once this is resolved, please remove the notice in docs/user/index.rst

svleeuwen commented 7 years ago

The issue in sortedm2m is resolved right