plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
255 stars 191 forks source link

RelatedItemsFieldWidget fails #2241

Closed ksuess closed 1 year ago

ksuess commented 6 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

Used RelatedItemsFieldWidget for a field of a custom Dexterity type.

eventlocation = RelationChoice(
    title=_(u"Location"),
    required=True,
    vocabulary='plone.app.vocabularies.Catalog',
    )
widget(
    'eventlocation',
    RelatedItemsFieldWidget,
    pattern_options={
        'selectableTypes': ['bluechurchlocation',],
        'basePath': get_locations_base_path,
        }
    )

Its not the only field with RelatedItemsFieldWidget.

What I expect to happen:

Field where user can select an object to relate to. sardana_mit_xavi_pidgi_ _blue_church

What actually happened:

The uid of the former selected and saved related object is displayed sardana_mit_xavi_pidgi_ _blue_church_and_new_issue_ _plone_products_cmfplone

or even worse the uid is not shown: sardana_mit_xavi_pidgi_ _blue_church 2

What version of Plone/ Addons I am using:

5.1rc1 (5.1-latest)

Assumptions

select2.js fails in updateSelection https://github.com/plone/Products.CMFPlone/blob/85475602e9e6d0f0861137bdea7b485ae2406e7b/Products/CMFPlone/static/components/select2/select2.js#L3156

jensens commented 1 year ago

I close the issue, because it addresses a Plone version that is no longer supported. If you think this is wrong please reopen the issue and assign a matching milestone.

Also, I think this was fixed long time ago.