Uploaded image for project: 'Blog Application'
  1. Blog Application
  2. BLOG-284

The categories home page of a blog other than the default one lists no post and shows the categories of the default blog

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 9.15.15
    • 9.15.14
    • None
    • None
    • Unknown

    Description

      A blog created from Blog.Management has a categories home page (e.g. MyBlog.Categories.WebHome) displayed with Blog.CategoriesSheet through a XWiki.DocumentSheetBinding object. The blog code doesn't recognize that page as a categories home page.

      Steps to reproduce

      1. Create a blog MyBlog from Blog.Management, with its panels.
      2. Publish a post in the category MyBlog.Categories.Personal.
      3. Open the categories home page of the blog, MyBlog.Categories.WebHome.
      4. Open its RSS feed (MyBlog/Categories/?xpage=plain&sheet=Blog.CategoryRss).

      Expected

      • The page lists the categorized posts of the blog.
      • The "Blog Categories" panel shows the categories of MyBlog.
      • The feed is about the categories of MyBlog.

      Actual

      • The page lists no post.
      • The "Blog Categories" panel shows the categories of the default blog (Blog.Categories), and the "Related Blogs" panel the blogs related to the default blog.
      • The feed is the feed of the categories of the default blog (Blog/Categories/).

      Cause

      The categories home page is detected with $doc.getObject('XWiki.DocumentSheetBinding').sheet == 'Blog.CategoriesSheet'. $object.sheet returns the displayed value of the sheet property (a page property), not its raw value, so the comparison is always false. Same check in BlogParameters.xml:71 ($isCategoriesHomePage, used by the panels), CategoriesCode.xml:585 (#displayCategoryPosts), CategoryRss.xml:69, BlogCode.xml:1133 and 1197, ArchiveSheet.xml:175 and 193. getValue('sheet') returns the expected value.

      Pinned by the functional test BlogLocationIT#categoriesOfTheBlogs (BLOG-269).

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: