• 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
    • Reverting BBCode caught error (see descr)

    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: Reverting BBCode caught error (see descr)

    • Issue Tools
      • View Changes
    1. issueid=6287 December 23, 2021 9:03 AM
      wolven wolven is offline
      New Member
      Reverting BBCode caught error (see descr)

      Hi folks,

      I experience a misbehaviour of the editor. It is impossible to toggle BBCode after I changed something in the BBCode setup.
      I'lll open an extra issue for that.

      I tried to revert the BBCode Setup (just the Wiki BBCode) and caught this error:

      Code:
      Error: Call to undefined method vw\vw\XF\Data\Editor::getDefaultToolbarButtons() in src/addons/vw/vw/XF/Admin/Controller/ButtonManager.php at line 122
      
          vw\vw\XF\Admin\Controller\ButtonManager->vwActionReset() in src/addons/vw/vw/XF/Admin/Controller/ButtonManager.php at line 93
          vw\vw\XF\Admin\Controller\ButtonManager->actionReset() in src/XF/Mvc/Dispatcher.php at line 352
          XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
          XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
          XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
          XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2351
          XF\App->run() in src/XF.php at line 517
          XF::runApp() in admin.php at line 13
    Issue Details
    Issue Number 6287
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Admin Panel
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 4.1.3
    Fixed Version 4.1.4
    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. December 23, 2021 11:20 AM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks, it looks like ::getDefaultToolbarButtons was removed in XenForo 2.2.x. We will have to add a workaround.
      Reply Reply  
    2. December 23, 2021 1:27 PM
      pegasus pegasus is offline
      VaultWiki Team
      In src/addons/vw/vw/XF/Admin/Controller/ButtonManager.php, find:
      Code:
      if ($type == 'toolbarButtonsXS')
      Replace with:
      Code:
      		if (\vw_Compat::is('2.2.0 Alpha 0'))
      		{
      			$buttonConfig["$type"] = $editorRepo->getDefaultToolbarConfig($type);
      		}
      		else if ($type == 'toolbarButtonsXS')
      In src/addons/vw/vw/XF/Repository/Editor.php, find:
      Code:
      public function getToolbarTypes()
      BEFORE it, add (scrollbar here):
      Code:
      	public function getDefaultToolbarConfig($type) : array
      	{
      		if (strpos($type, 'wiki') !== 0)
      		{
      			return parent::getDefaultToolbarConfig($type);
      		}
      
      		$value = \vw_DB::get()->query()->select(array(
      			'fields' => array('default_value'),
      			'table' => 'xf_option',
      			'where' => \vw_DB::get()->query()->eq('option_id', "'vw_toolbar_config'"),
      			'first' => 1
      		));
      
      		$default = false;
      
      		if ($value)
      		{
      			$default = json_decode($value['default_value'], true);
      		}
      
      		if ($default AND isset($default[$type]))
      		{
      			return $default[$type];
      		}
      
      		return [];
      	}
      Reply Reply  
    3. December 28, 2021 6:16 AM
      wolven wolven is offline
      New Member
      Hi folks,

      you mean the second change should take place in "Editor.php".
      Reply Reply  
    4. December 28, 2021 2:49 PM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks for pointing that out. I've updated the instructions. Apologies for the confusion.
      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:44 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.