• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Can't Add Category via Template

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Can't Add Category via Template

    • Issue Tools
      • View Changes
    1. issueid=3488 November 11, 2013 10:13 AM
      pegasus pegasus is offline
      VaultWiki Team
      Can't Add Category via Template

      An old feature of both VaultWiki 3 and MediaWiki was the ability to add pages to categories if those categories are in a template that the page includes. In VaultWiki 4, this is no longer possible due to the way categories are added now.

      We can create an acceptable alternative by adding a second category field for templates, so we have two fields: Categories this template is in, and Categories pages that use this template are in. While you still cannot use IF directly to add categories, you can still achieve the same thing by creating a nested template within the IF tag. We need to be sure, however, to add support for dynamically named categories using parameters and other info from the caller page.
    Issue Details
    Issue Number 3488
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Templates
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.0.0 Beta 7
    Fixed Version 4.1.0 RC 1
    Milestone VaultWiki 4.2
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users pegasus
    Tags (none)




    1. June 8, 2014 8:50 PM
      pegasus pegasus is offline
      VaultWiki Team
      I think it actually has to work differently from above, since the IF functionality and parameter support is quite important.

      There are already tags that ONLY work inside templates, so I don't think it's a big deal to have the category tag only work inside templates and only push those categories to the calling page. Since templates are parsed as part of saving a page, this will allow us to store these categories much how they worked in VW3.

      However, these categories should be flagged in the database, so:
      - they are not editable by the Edit tab, but can be listed in a section "These categories were added by templates used in this page"
      - they can be removed if the template is no longer used by the page. Template usage is already tracked by another database table, so it should be a simple task to compare template usage before/after saves to determine if category updates are necessary.
      Reply Reply  
    2. January 29, 2020 2:02 PM
      pegasus pegasus is offline
      VaultWiki Team
      This regression is marked as fixed in the next release. However, it was quite a bit of work as you'll see; in order to accommodate the 4.x category-related permissions, the implementation differs somewhat from 3.x versions and from what is described above:

      We start with the assumption that there is a template that uses the CATEGORY BB-Code in an attempt to add pages to templated or dynamically-named categories. When saving the template, it gains a has_categories flag.

      If a template now has (or a newly nested template has) or did have the has_categories flag, and it was modified in a way that generated a new revision, all pages that use the template are queued to be reparsed. If the template is newly created, any pages that tried to use it when it was missing are queued to be reparsed.

      If a category is renamed or deleted, all pages using that category as a Wanted or Template Category are queued for reparse.
      If an admin renames, deletes, or adds a prefix, all categories using that prefix trigger all pages using those categories as a Wanted or Template Category to be queued for reparse.

      As before, creating a new page revision also reparses that specific page.

      Since a lot of potential reparses can occur simultaneously, we track the parsedate of each page and only reparse if the parsedate is lower than the time the reparse was requested.

      When a page is reparsed, the templated CATEGORY usages are now added as follows:
      - If the category exists, the category wants the page to be approved, by any user who can normally add the page to that category. The category is listed in an Unapproved Categories section of the page's category list and in the page's category editor, provided the user would have permission to make the change.
      - If the category does not exist, the category becomes a Wanted Category. Similar to Unapproved Categories, Wanted Categories are listed on the page's category list and in the page's category editor, provided the user would have permission to make the change but also has permission to create the category. The category editor allows the user to create the Wanted Category.
      - If the page already had Wanted Categories or Template Categories, but the reparse no longer has these, then the missing categories will be removed from the page.

      When a Wanted Category is created it is considered a Template Category, and all pages that were wanting it are changed to Unapproved... except if it was created via a page's category editor (then that page is automatically approved). Approved Template Categories are publicly visible on the page's category list. Template Categories cannot be removed completely, but they can be Unapproved again.

      When creating a Wanted Category, you have the option to treat this instance as a non-templated (regular) Category. This would allow the page to keep that category even if the template is changed. You may also change a page's Template Categories to non-templated via the category editor, or vice verse, as needed.

      New filters have been added in category listings and in Categories That List This Page to help manage this. Additionally, new inline moderation actions are available there in order to mass-approve Unapproved Categories.

      A new Special page "WantedCategories" has been added in order to assist with managing them.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:35 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.