Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-1776

feed servlet may not call correct template

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0
    • 4.0.1, 5.0
    • Newsfeeds (RSS & Atom)
    • None
    • Fedora 8

    Description

      In the feed servlet the "templates/feeds/weblog-search-atom.vm" may not be called correclty.

      for the code:
      // determine what template to render with
      boolean siteWide = WebloggerRuntimeConfig.isSiteWideWeblog(weblog.getHandle());
      if ("entries".equals(feedRequest.getType()) && feedRequest.getTerm() != null)

      { pageId = "templates/feeds/site-search-atom.vm"; }

      else if (siteWide && "entries".equals(feedRequest.getType()) && feedRequest.getTerm() != null)

      { pageId = "templates/feeds/weblog-search-atom.vm"; } else if (siteWide) { pageId = "templates/feeds/site-"+feedRequest.getType()+"-"+feedRequest.getFormat()+".vm"; } else { pageId = "templates/feeds/weblog-"+feedRequest.getType()+"-"+feedRequest.getFormat()+".vm"; }

      the siteWide refers to "templates/feeds/weblog-search-atom.vm" where it should refer to "templates/feeds/site-search-atom.vm".

      ie code may need to be:

      // determine what template to render with
      boolean siteWide = WebloggerRuntimeConfig.isSiteWideWeblog(weblog.getHandle());
      if (siteWide && "entries".equals(feedRequest.getType()) && feedRequest.getTerm() != null) { pageId = "templates/feeds/site-search-atom.vm"; } else if ("entries".equals(feedRequest.getType()) && feedRequest.getTerm() != null) { pageId = "templates/feeds/weblog-search-atom.vm"; }

      else if (siteWide)

      { pageId = "templates/feeds/site-"+feedRequest.getType()+"-"+feedRequest.getFormat()+".vm"; }

      else

      { pageId = "templates/feeds/weblog-"+feedRequest.getType()+"-"+feedRequest.getFormat()+".vm"; }

      Attachments

        Activity

          People

            djohnson David Johnson
            gregh Greg Huber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: