You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Crud form /@@DaTa that lists some content in the portal and shows the data as editable fields.
There is a problem when getting the relations vocabulary of a Select field for an item displayed in the crud table.
The vocab is taken from the data-pat-relateditems attribute, vocabularyUrl. sample: data-pat-relateditems='{"vocabularyUrl": "http://xxxxxxxxxxx/dexterity-types/group/@@data/++widget++crud-edit.10.widgets.people/@@getSource", "searchText": "Search", "folderTypes": ["Folder"], "homeText": "Home", "basePath": "/xxxxxxx", "sort_on": "sortable_title", "rootPath": "/xxxxx", "sort_order": "ascending", "separator": ";", "treeVocabularyUrl": "http://xxxxxxxx/@@getVocabulary?name=plone.app.vocabularies.Catalog", "searchAllText": "Entire site"}'
but the vocabularyUrl is constructed with the main form URL (request.getURL()) and not with the item URL (the context is wrong)
if field and getattr(field, 'vocabulary', None):
form_url = self.request.getURL()
source_url = "%s/++widget++%s/@@getSource" % (form_url, self.name)
args['pattern_options']['vocabularyUrl'] = source_url
The text was updated successfully, but these errors were encountered:
I have a Crud form /@@DaTa that lists some content in the portal and shows the data as editable fields.
There is a problem when getting the relations vocabulary of a Select field for an item displayed in the crud table.
The vocab is taken from the data-pat-relateditems attribute, vocabularyUrl. sample:
data-pat-relateditems='{"vocabularyUrl": "http://xxxxxxxxxxx/dexterity-types/group/@@data/++widget++crud-edit.10.widgets.people/@@getSource", "searchText": "Search", "folderTypes": ["Folder"], "homeText": "Home", "basePath": "/xxxxxxx", "sort_on": "sortable_title", "rootPath": "/xxxxx", "sort_order": "ascending", "separator": ";", "treeVocabularyUrl": "http://xxxxxxxx/@@getVocabulary?name=plone.app.vocabularies.Catalog", "searchAllText": "Entire site"}'
but the vocabularyUrl is constructed with the main form URL (request.getURL()) and not with the item URL (the context is wrong)
The text was updated successfully, but these errors were encountered: