More in this section

Forums / Developing with Sitefinity / Generic Search problem

Generic Search problem

2 posts, 0 answered
  1. warfee
    warfee avatar
    27 posts
    Registered:
    10 Aug 2007
    04 Dec 2009
    Link to this post
     I have created a custom Generic content based module, however, when using the search in the admin area e.g. the list view, the search attempts to go to ContentItemsList`1 instead of ContactItemsListView.

    Server Error in '/nacac' Application. 
    -------------------------------------------------------------------------------- 
     
    The ViewMode "ContentItemsList`1" is not defined for this control.  
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  
     
    Exception Details: System.ArgumentException: The ViewMode "ContentItemsList`1" is not defined for this control. 
     
    Source Error:  
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.   
     
    Stack Trace:  
     
     
    [ArgumentException: The ViewMode "ContentItemsList`1" is not defined for this control.] 
       Telerik.Cms.Web.UI.ViewModeControl`1.get_CurrentView() +146 
       Telerik.Cms.Web.UI.ViewModeControl`1.LoadCurrentView(Control owner) +25 
       Telerik.Cms.Web.UI.ViewModeControl`1.InitializeControls(Control viewContainer) +42 
       Telerik.Cms.Web.UI.ViewModeControl`1.CreateChildControls() +101 
       System.Web.UI.Control.EnsureChildControls() +87 
       System.Web.UI.Control.PreRenderRecursiveInternal() +44 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Control.PreRenderRecursiveInternal() +171 
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842 
     
      
     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Dec 2009
    Link to this post
    Hi warfee,

    You have to correctly defined the views in your module control panel and you have not used correctly CreateHostViewCommand/NavigateHostCommand which returns the proper command for a specified view.

    More information at

    Sitefinity 3.6 new backend architecture - How to navigate among views: What are commands?,
    Sitefinity 3.6 new backend architecture How to navigate among Views: How do I pass parameters between Views?
    Sitefinity 3.6 new backend architecture - Control Panel: What is its role?
    Control Panel: Automatic Command Generation
    Adding views to control panel

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered