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

Blog post list Macro should respect the wiki-part of its reference

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 9.13.6
    • None
    • Unknown

    Description

      Use case: display a list of blog posts from another wiki on the same farm; e.g. list the main wikis blog posts in a subwiki or vice versa.

      Steps to reproduce:

      1. have a test wiki with a main wiki and a subwiki
      2. install the blog app on both wikis (or "install on farm")
      3. add and publish a new blog post in the main wiki
      4. in the sub wiki add a page with content
         {{blogpostlist blog="xwiki:Blog.WebHome" limit="10"/}}

      Expected behavior:

      • one can see the blog posts of the main wiki on that page (including the just created one)

      actual behavior

      • one sees the blog posts from the sub wiki

      The reason for the issue is that the blog descriptor is loaded from the main wiki, but then the query to find the blog posts always uses the current wiki.

      Adding a

      $query.setWiki($blogDescriptorDoc.getDocumentReference().getWikiReference().getName())

      (when ever the blog parameter is set) shoiuld fix the issue.

      Attachments

        Activity

          People

            Unassigned Unassigned
            camil7 Clemens Robbenhaar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: