• 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
    • NavBar Link Text Not Updating

    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: NavBar Link Text Not Updating

    • Issue Tools
      • View Changes
    1. issueid=4816 November 29, 2016 3:36 PM
      cttf cttf is offline
      New Member
      NavBar Link Text Not Updating

      When I change the 'Name of the Wiki' field under VaultWiki:Site Config it no longer updates on the navbar on my forum.

      I can move its position through VaultWiki:Aesthetics, or disable it completely, but nothing I do manages to get the link text itself to actually update to the new string in the site config section.

      The ability to search the help doc here leaves a lot to be desired so I'm not seeing anything helpful from google :/ any ideas?
    Issue Details
    Issue Number 4816
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Page Output
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 4.0.15
    Fixed Version 4.0.16
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 29, 2016 5:08 PM
      pegasus pegasus is offline
      VaultWiki Team
      Create a new directory and file at vault/core/model/settings/vw_wiki_name/vw.php, with file contents:
      PHP Code:
      <?php

      class vw_Settings_vw_wiki_name_Model extends vw_Settings_Base_Model
      {
          protected 
      $varname = 'vw_wiki_name';

          protected 
      $buildable = true;

          public function 
      exclude(&$already_building, &$settings)
          {
              if (
                  !empty(
      $already_building['vw_seo']) OR
                  !empty(
      $already_building['vw_spaces']) OR
                  !empty(
      $already_building['vw_bburl']) OR
                  !empty(
      $already_building['vw_filename']) OR
                  !empty(
      $already_building['vw_titlevar'])
              )
              {
                  return 
      true;
              }

              if (!
      vw_Hard_Core::model('Settings')->should_rebuild('cached'))
              {
                  return 
      true;
              }

              
      vw_Hard_Core::model('Settings')->should_rebuild('index');

              return 
      false;
          }

          public function 
      validate(&$value, $updated_settings)
          {
              if (!
      $value)
              {
                  return 
      false;
              }

              return 
      true;
          }

          public function 
      rebuild($startat, $existing = null)
          {
              
      vw_Hard_Core::model('Rebuild')->index();
              
      vw_Hard_Core::controller('CP/Counter/URL')->clear_caches();

              return 
      0;
          }
      }
      Then try changing the setting again.
      Reply Reply
    2. November 29, 2016 11:48 PM
      cttf cttf is offline
      New Member
      Quote Originally Posted by pegasus
      Create a new directory and file at vault/core/model/settings/vw_wiki_name/vw.php, with file contents:
      PHP Code:
      <?php

      class vw_Settings_vw_wiki_name_Model extends vw_Settings_Base_Model
      {
          protected 
      $varname = 'vw_wiki_name';

          protected 
      $buildable = true;

          public function 
      exclude(&$already_building, &$settings)
          {
              if (
                  !empty(
      $already_building['vw_seo']) OR
                  !empty(
      $already_building['vw_spaces']) OR
                  !empty(
      $already_building['vw_bburl']) OR
                  !empty(
      $already_building['vw_filename']) OR
                  !empty(
      $already_building['vw_titlevar'])
              )
              {
                  return 
      true;
              }

              if (!
      vw_Hard_Core::model('Settings')->should_rebuild('cached'))
              {
                  return 
      true;
              }

              
      vw_Hard_Core::model('Settings')->should_rebuild('index');

              return 
      false;
          }

          public function 
      validate(&$value, $updated_settings)
          {
              if (!
      $value)
              {
                  return 
      false;
              }

              return 
      true;
          }

          public function 
      rebuild($startat, $existing = null)
          {
              
      vw_Hard_Core::model('Rebuild')->index();
              
      vw_Hard_Core::controller('CP/Counter/URL')->clear_caches();

              return 
      0;
          }
      }
      Then try changing the setting again.
      No change.. Is the directory supposed to actually be 'vw_wiki_name' or should I replace that with the currently set name (this seems like a stupid question, but I tried both and neither seemed to make a difference)? There is already a vw.php in just the mode/settings/ directory, FWIW.
      Reply Reply
    3. November 30, 2016 10:47 AM
      pegasus pegasus is offline
      VaultWiki Team
      It is supposed to actually be 'vw_wiki_name'.

      When you try to change the setting, this file will only be triggered if the setting value is actually different than last time. Simply saving the same value again will be treated as no change. The file above is supposed to clear all the wiki caches (which includes the navbar output) and the wiki index page whenever there is a change detected in this setting. The task is deferred, so it runs via Javascript on the next page load.

      Another thing you can do, although it is a lot of unnecessary work for the server in this case, is go to Wiki CP > Maintenance > Rebuild Counters / Caches > Rebuild Page URLs. That (somewhat unrelated) task will run in the foreground and clear the same caches in question at the end of the task.
      Reply Reply
    4. November 30, 2016 12:24 PM
      cttf cttf is offline
      New Member
      Quote Originally Posted by pegasus
      It is supposed to actually be 'vw_wiki_name'.

      When you try to change the setting, this file will only be triggered if the setting value is actually different than last time. Simply saving the same value again will be treated as no change. The file above is supposed to clear all the wiki caches (which includes the navbar output) and the wiki index page whenever there is a change detected in this setting. The task is deferred, so it runs via Javascript on the next page load.

      Another thing you can do, although it is a lot of unnecessary work for the server in this case, is go to Wiki CP > Maintenance > Rebuild Counters / Caches > Rebuild Page URLs. That (somewhat unrelated) task will run in the foreground and clear the same caches in question at the end of the task.
      Maybe I copy/pasted incorrectly but the script didn't work (in that folder, renamed the wiki to multiple different things), but rebuilding URLs worked like a charm! Thank you!!
      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 4:51 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.