• 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
    • Inserting required template inserts [null] instead of [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: Inserting required template inserts [null] instead of [template]

    • Issue Tools
      • View Changes
    1. issueid=6310 September 11, 2022 6:58 AM
      mazzly mazzly is offline
      Junior Member
      Inserting required template inserts [null] instead of [template]

      Exactly as title.

      When creating a page and inserting a "required" template, it is inserted as
      Code:
      [null] TemplateName
      | value1 = foo
      | value2 = bar
      [/null]
      Then trying to save the page fails with the following since required template is missing..:
      Code:
      #!-- XEN:VWPHRASE vw_template_required_none_error ARGS() --#
    Issue Details
    Issue Number 6310
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Templates
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.5
    Fixed Version 4.1.6
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. September 11, 2022 11:45 AM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed the missing phrase in the next release. As for the template-tag being null, I will wait for your feedback, but I believe this can occur if the template-tag is enabled but the button icon was blanked rather than removing the tag from the toolbar config. In src/addons/vw/vw/XF/Template/Templater.php, find (there may be a scrollbar):
      Code:
      			if (
      				$templatetag and
      				$for == 'wiki' and
      				isset($params['customIcons']["$templatetag"]) and
      				\vw_Hard_Core::model('Node')->on('Template')
      			)
      			{
      				$params['vweditor']['template'] = true;
      				$config['vw_template_tag'] = $templatetag;
      				$enable['template'] = true;
      
      				$this->vwChooserCssPath($params);
      
      				if (!isset($grouped["$templatetag"]))
      				{
      					$insert['top'][] = 'xfCustom_' . $templatetag;
      				}
      			}
      Replace with (there may be a scrollbar):
      Code:
      			if (
      				$templatetag and
      				$for == 'wiki' and
      				\vw_Hard_Core::model('Node')->on('Template')
      			)
      			{
      				$params['vweditor']['template'] = true;
      				$config['vw_template_tag'] = $templatetag;
      				$enable['template'] = true;
      
      				if (isset($params['customIcons']["$templatetag"]))
      				{
      					$this->vwChooserCssPath($params);
      
      					if (!isset($grouped["$templatetag"]))
      					{
      						$insert['top'][] = 'xfCustom_' . $templatetag;
      					}
      				}
      			}
      Reply Reply  
    2. September 12, 2022 12:49 AM
      mazzly mazzly is offline
      Junior Member
      It works fine if I first press "Toggle BB code" (which then disables all the editor buttons..)

      If I "toggle BB code" again and try to insert, it does it as null again..
      Reply Reply  
    3. September 13, 2022 1:59 PM
      pegasus pegasus is offline
      VaultWiki Team
      I can only reproduce the behavior you describe if I DON'T apply the edit in my previous post. Which leads me to believe that you haven't applied the edit yet or your PHP files have a long-lived cache that you need to clear.
      Reply Reply  
    4. September 14, 2022 8:50 AM
      mazzly mazzly is offline
      Junior Member
      Oh yes sorry, I read your message above wrong and hadn't applied the code fix.

      After applying + flushing FPM caches it works as intended, no matter what the "BB code mode" is
      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 9:48 AM.
    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.