diff --git a/news/125.bugfix b/news/125.bugfix new file mode 100644 index 0000000000..4a5dd28024 --- /dev/null +++ b/news/125.bugfix @@ -0,0 +1,3 @@ +Remove use of `portal_properties` in context navigation. +Theoretically we checked `portal_properties.site_properties.sortAttribute`. +[maurits] diff --git a/src/plone/restapi/services/contextnavigation/get.py b/src/plone/restapi/services/contextnavigation/get.py index d5d5ba1c97..0fe0d7a054 100644 --- a/src/plone/restapi/services/contextnavigation/get.py +++ b/src/plone/restapi/services/contextnavigation/get.py @@ -625,9 +625,6 @@ def __init__(self, context, data): self.context = context self.data = data - portal_properties = getToolByName(context, "portal_properties") - navtree_properties = getattr(portal_properties, "navtree_properties") - # Acquire a custom nav query if available customQuery = getattr(context, "getCustomNavQuery", None) if customQuery is not None and safe_callable(customQuery): @@ -668,14 +665,6 @@ def __init__(self, context, data): # Only list the applicable types query["portal_type"] = typesToList(context) - # Apply the desired sort - sortAttribute = navtree_properties.getProperty("sortAttribute", None) - if sortAttribute is not None: - query["sort_on"] = sortAttribute - sortOrder = navtree_properties.getProperty("sortOrder", None) - if sortOrder is not None: - query["sort_order"] = sortOrder - # Filter on workflow states, if enabled registry = getUtility(IRegistry) navigation_settings = registry.forInterface(INavigationSchema, prefix="plone")