Description

In order to use [[FullSearch(CategoryTemplate)]] to insert a list of all template pages, templates need to be assigned CategoryTemplate.

Unfortunately, when subsequently creating a new page from a template, the CategoryTemplate has to be deleted manually or else the new page too is matched by [[FullSearch(CategoryTemplate)]].

Steps to reproduce

  1. create a new page
  2. select a template that is in CategoryTemplate from the list

  3. forget to manually delete the CategoryTemplate from the new page

  4. save changes
  5. do a text search for CategoryTemplate

  6. notice that the new page is listed as being in CategoryTemplate

Details

This wiki.

Workaround

Manually edit away the CategoryTemplate text (and possibly the trailing '----\n')

Discussion

I have attached a patch against 1.3.4 that deletes \bCategory.*Template\b from the template as it is copied into the raw_text for the new page.

The patch merely automates something that you otherwise have to do manually if CategoryTemplate is to be useful. DeleteTemplateCategories.patch is careful to only edit the last '\n----\n' delimited chunk of a page. Regardless, I agree with NirSoffer (see FeatureRequests/AddCategorySearchTerm): a better way of attaching metadata to pages would make categories work more transparently overall. However, it is still important that new pages created from templates do not inherit the CategoryTemplate metadata, no matter how metadata is implemented!

-- GaryVaughan 2005-07-25 11:08:23

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/NewPagesFromTemplatesInheritCategoryTemplateLink (last edited 2008-03-18 17:50:20 by p5B055566)