U4-10513 - Content Picker custom filters not working on List View

Created by Lennard Fonteijn 09 Oct 2017, 09:26:21 Updated by Sebastiaan Janssen 26 Jun 2018, 08:30:17

Tags: Gold partner

We're working on a custom datatype for Umbraco, based on the original Content Picker. We're currently in the process of applying filters to this (eg. which node you can and can't select), and we've noticed filters have no effect on nodes that are childs of noded which have List View enabled.

We've succesfully confirmed this is indeed a bug in Umbraco, and not in our custom datatype.

To reproduce:

  1. Create two Doctypes, one which acts as the Parent, one which acts as the Child of Parent.
  2. Set the Parent to allow placement at the root, enable list view and add Child as an allowed child.
  3. Set the Child to allow placement at the root.
  4. Give the Parent a Content Picker property and set the "Allowed doctypes"-field to something random (as long as it doesn't match any doctype alias).
  5. Setup the Content tree by placing a few Child-nodes at the root, add a Parent-doctype at the root, and adding a few Child-nodes under the Parent-node.
  6. Go into your Parent-node, and using the picker try to select the Child-nodes at the root. It won't allow it. But when you click the Parent-node, and then try to select one of the Child-nodes, it does nothing to prevent you from doing so.

From the looks of it, the new view that's pushed into the screen as part of the listview, does nothing with the filter that has been set in code. So besides affecting custom contentpickers, it also affects core functionality.

Here is a small snippet of how we extend the content picker controller and inject our own logic.

var expectedContentType = "childNode";

$scope.model.config {
    filter: function (i) {
        return i.metaData.contentType !== expectedContentType;
    filterCssClass: "not-allowed"

angular.extend(this, $controller("Umbraco.PropertyEditors.ContentPickerController", { $scope: $scope }));


Sebastiaan Janssen 26 Jun 2018, 08:30:15

I have just tried these steps out in 7.11 and it doesn't seem to be a problem there. Closing this for now, let me know if you have additional info.

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal

Category: UI

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.5

Due in version:


Story Points: