More in this section
Forums / Bugs & Issues / Bug in ContentView.CreateChildControls

Bug in ContentView.CreateChildControls

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Gary
    Gary avatar
    91 posts
    19 Jul 2007
    30 Dec 2010
    Link to this post
    To reproduce this issue, add both the "Archive" (from Blogs) and "Download List" (Images & Documents) controls to a page from the toolbox. Then in the live page view, click on a node in the archive tree. The page reloads with Year and Month parameters appended to the URL, and the Download List displays the following error:

    Left operand 'Publication_Date' is not supported. Supported left operands are...

    This seems to occur because the DownloadList class inherits from ContentView, and the code in CreateChildControls attempts to create a filter on the Publication_Date field when the Year and Month existing in the Request. DownloadList, however, does not support this metadata field.

    I've been unsuccessful identifying a workaround for this. It is an absolute requirement to have both of these controls on the same page, so any help is greatly appreciated.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    30 Dec 2010
    Link to this post
    Hello Gary,

    Yes, DownloadList inherits from ContentView class, but Libraries provider does not have "Publication_Date" metafiled.

    You can get around the issue by creating a custom control that inherits from DownloadList and override CreateDataSource method.


    protected override System.Collections.IList CreateDataSource()
        ContentFilterBuilder filterBuilder = new ContentFilterBuilder(this);
        if (filterBuilder.IsFilterValid)
            return base.CreateDataSource();
        return Manager.GetContent();

    If the filter is valid you will return the base , otherwise you need to return a list of content items by using GetContent method and its overloads

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered