Hi,
                
I found a problem wherein a page entry that was deleted in the edit
mode still appears in the live or preview mode. 

I am unable to delete this entry which appears in production since it
no longer appears in edit mode. I then tried deleting the template. The
System process of Jahia did not allow template deletion since archived
entries still existed. How do I delete archived entries or How do I
create searches that only displays active entries in Live mode.
                
                
I used the following code patterned after blog_filters.inc
                
if (! jData.gui().isEditMode()) {
  ContainerFilterBean emptyEntryFilter = new     
    ContainerFilterBean("photoStoryEntryTitle",
        jParams.getEntryLoadRequest());

  emptyEntryFilter.addClause 
    (ContainerFilterBean.COMP_NOT_EQUAL,"<empty>");
    containerFilterVector.add(emptyEntryFilter);
  }
                
if (photoStorySearchString != null && 
    photoStorySearchString.length() > 0) {
    StringBuffer photoStoryQuery =  new StringBuffer
    (photoStorySearchString);
     photoStoryQuery.append(" AND pageid:" + 
      jData.page().getID());
     photoStoryQuery.append(" AND 
      container_definition_name:photoStoryEntries");
      photoStoryQuery.append(" AND workflow_state:" + 
      ContentObjectEntryState.WORKFLOW_STATE_ACTIVE );
      
    ContainerSearcher containerSearcher = new    
      ContainerSearcher(
      jData.params().getSiteID 
      (), "photoStoryEntries", 
      photoStoryQuery.toString(),
      jData.params().getEntryLoadRequest());
    request.setAttribute
      ("photoStoryEntries_search_handler",   
        containerSearcher);
} else {
    // search only in current page and in  
    containerList "photoStoryEntries"
       photoStorySearchString = "";
       StringBuffer photoStoryQuery =  new 
       StringBuffer();
       photoStoryQuery.append(" pageid:" + 
       jData.page().getID());
       photoStoryQuery.append(" AND 
       container_definition_name:photoStoryEntries");
       ContainerSearcher containerSearcher = new 
       ContainerSearcher(
       jData.params().getSiteID(),  
       "photoStoryEntries", 
       photoStoryQuery.toString(),
       jData.params().getEntryLoadRequest());
    request.setAttribute
       ("photoStoryEntries_search_handler",
       containerSearcher);
           }

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to