This issue has been created
There is 1 update.
 
 
Blog Application / cid:jira-generated-image-avatar-0faa845a-bbc6-4574-a2bf-2abcd42be447 BLOG-284 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-d2e48760-0879-4273-ab87-9d1e4e9af039 Vincent Massol created this issue on 14/Oct/26 14:07
 
Summary: The categories home page of a blog other than the default one lists no post and shows the categories of the default blog
Issue Type: cid:jira-generated-image-avatar-0faa845a-bbc6-4574-a2bf-2abcd42be447 Bug
Affects Versions: 9.15.14
Assignee: Unassigned
Created: 14/Oct/26 14:07
Priority: cid:jira-generated-image-static-major-aa8869bf-564f-488d-b573-dc0466fca1d8 Major
Reporter: Vincent Massol
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).

 
 

1 update

 
cid:jira-generated-image-avatar-d2e48760-0879-4273-ab87-9d1e4e9af039 Changes by Vincent Massol on 14/Oct/26 14:07
 
Assignee: Vincent Massol