dokufreaks/plugin-blog

autoarchive shows twice on page

Closed this issue · 4 comments

I've tried to use the autoarchive tag to place an archive below entries.
When I do so, the archive part is displayed twice.
I'm using Release 2014-05-05 "Ponder Stibbons" on a Debian Wheezy server, with php5,
blog plugin installed today (30 Dec 2014).

When I put the archive on its own page, it only displays once, just when I try to place it below entries on the same page do I see it displayed twice.

Same thing if I use {{archive>[month]}} for a single month, the archive/blog history part displays twice.

I've resolved this.
Anything after the entries was displayed twice (including new entry form), but it's because I had the blog and the namespace start page in the same namespace, i.e. was using :log as the namespace and :log:start as the start page, and all entries in that same space, so it was counting :log:start as an entry and including it in itself (recursive inclusion?).
I moved all the entries into :log:entries:[year:month:day_title], and kept :log:start as the start page, and now it's just fine.

Yes, recursive includes are possible, but the recursion stops after one step. The blog plugin has a configuration option for explicitly excluding pages from blog listings which appears in the configuration manager but doesn't seem to be documented. You could use something like !^log:.*:start$! in order to exclude all start pages from the blog listing.

I've just documented the exclude feature and mentioned the possible duplication in the documentation.