Ticket #13675 (new Bug)
Opened 3 years ago
archetypes.referencebrowserwidget ignores certain config fields
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | Unknown | Version: | 4.3 |
Keywords: | referencebrowserwidgetbrowserwidget | Cc: |
Description
Hi there,
We're using the referencebrowserwidget on a normal archetypes ReferenceField and certain config params including popup_height and browsable_types are being ignored.
example usage:
atapi.ReferenceField( name='projectReferences', widget=ReferenceBrowserWidget( label=_(u'Reference Files'), restrict_browsing_to_startup_directory=False, show_indexes=True, allow_browse=1, startup_directory='/intranet/project-database/', available_indexes={'Title':'Title', 'SearchableText': 'Text in Document'}, default_search_index='Title', popup_height=350, browsable_types=('File','Folder','Image') ), required=False, searchable=False, multiValued=True, allow_sorting=True, relationship='WorksWith', allowed_types=('File','Folder','Image') )
results in all types being browsable, (not just File, Folder, Image). Also popup height is unchanged.
fix for the browsable_types problem is fixed via line 283 of archetypes/referencebrowserwidget/browser/view.py to be:
self.request.form['portal_type'] = [] # should be: # self.request.form['portal_type'] = self.widget.browsable_types
this fixes the problem, but how did this ever work for anyone ?
cheers and regards,
-i
Note: See
TracTickets for help on using
tickets.