• 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
    • BBCode Toggling doesn't work anymore

    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: BBCode Toggling doesn't work anymore

    • Issue Tools
      • View Changes
    1. issueid=6288 December 23, 2021 9:09 AM
      wolven wolven is offline
      New Member
      BBCode Toggling doesn't work anymore

      Hi folks,

      After customizing the Editor (sorting buttons) it is impossible to toggle between raw and BBCode.
      The console throws error in js.

      Code:
      Uncaught TypeError: Cannot read properties of undefined (reading 'vwOptions')
          at window.<computed>.get_config (editor.js?v=1d9f97aa:7)
          at Object.plugin.toggle (final.js?_v=2952aa92:22)
          at Z.Bootstrap.callback (editor-compiled.js?_v=2952aa92:1036)
          at Object.f [as exec] (editor-compiled.js?_v=2952aa92:78)
          at m (editor-compiled.js?_v=2952aa92:393)
          at k (editor-compiled.js?_v=2952aa92:394)
          at Z.Bootstrap.n (editor-compiled.js?_v=2952aa92:394)
          at U (editor-compiled.js?_v=2952aa92:65)
          at HTMLButtonElement.<anonymous> (editor-compiled.js?_v=2952aa92:69)
          at HTMLDivElement.<anonymous> (editor-compiled.js?_v=2952aa92:527)
      get_config @ editor.js?v=1d9f97aa:7
      plugin.toggle @ final.js?_v=2952aa92:22
      callback @ editor-compiled.js?_v=2952aa92:1036
      f @ editor-compiled.js?_v=2952aa92:78
      m @ editor-compiled.js?_v=2952aa92:393
      k @ editor-compiled.js?_v=2952aa92:394
      n @ editor-compiled.js?_v=2952aa92:394
      U @ editor-compiled.js?_v=2952aa92:65
      (anonymous) @ editor-compiled.js?_v=2952aa92:69
      (anonymous) @ editor-compiled.js?_v=2952aa92:527
      After disabling vw as addon, the function returns. Therefore, problem is caused by vaultwiki.
      Reverting all changes is impossible - see other issue I've opened respectivly.
    Issue Details
    Issue Number 6288
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    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 2
    Assigned Users (none)
    Tags (none)




    1. December 23, 2021 10:38 AM
      pegasus pegasus is offline
      VaultWiki Team
      This is caused by a major change to FroalaEditor that was introduced in XenForo 2.2.8 (Dec 2). FroalaEditor was updated from version 3 to version 4 in that release. This update introduced a number of breaking changes to the editor. We have not made a new release yet after XenForo 2.2.8 in order to add compatibility.

      We would advise against upgrading to 2.2.8 until we can release a compatible version.
      Reply Reply  
    2. December 24, 2021 2:21 AM
      pegasus pegasus is offline
      VaultWiki Team
      As a followup, I believe this is the only edit that is required to support the changes in XenForo 2.2.8. In js/vw/vw/xf2/froala/final.js, find:
      Code:
      		if (typeof(FroalaEditor) != "undefined" && FroalaEditor.VERSION[0] == '3')
      		{
      			editor.$oel.data("xf-editor", scope);
      		}
      Replace with:
      Code:
      		if (typeof(FroalaEditor) != "undefined")
      		{
      			switch (FroalaEditor.VERSION[0])
      			{
      				case '3':
      				case '4':
      					editor.$oel.data("xf-editor", scope);
      					break;
      			}
      		}
      You may need to clear your browser cache after making this change.
      Reply Reply  
    3. January 2, 2022 10:15 AM
      wolven wolven is offline
      New Member
      Hi folks,

      the toggeling works again but all Editor functions in the wiki itself has gone. I just see the generated HRML Code instead of the Froala Editor.

      Please see attachments.

      The whole thing is a bit disapponting.
      Reply Reply  
    4. January 2, 2022 11:35 AM
      pegasus pegasus is offline
      VaultWiki Team
      I don't have this problem on my VaultWiki 4.1.4 installation with XenForo 2.2.8.

      Does your browser report Javascript errors?
      Reply Reply  
    5. January 2, 2022 3:42 PM
      wolven wolven is offline
      New Member
      I am on 4.1.3 still. I could try to upgrade the test side first and check whether the error still occurs.
      JavaScript console will be checked later on.
      Reply Reply  
    6. January 3, 2022 3:36 AM
      wolven wolven is offline
      New Member
      Hi folks,
      after update to 4.1.4 build 001, I have the same issue. Clicking the "Edit" Link let appear the whole HTML content of the respective page

      The console

      Uncaught TypeError: p is undefined
      b https://www.tt-board.eu/xf2dev/js/xf...=45f504fd:1013
      recalculate https://www.tt-board.eu/xf2dev/js/xf...=45f504fd:1014
      recalculateIfNeeded https://www.tt-board.eu/xf2dev/js/xf...=45f504fd:1013
      getToolbars https://www.tt-board.eu/xf2dev/js/xf...=45f504fd:1011
      getButtonConfig https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:984
      getEditorConfig https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:982
      startInit https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:977
      init https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:976
      b https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:150
      c https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:150
      f https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:151
      jQuery 2
      f https://www.tt-board.eu/xf2dev/js/xf...v=45f504fd:151
      activate https://www.tt-board.eu/xf2dev/js/xf..._v=45f504fd:43
      onPageLoad https://www.tt-board.eu/xf2dev/js/xf..._v=45f504fd:22
      jQuery 13
      editor-compiled.js:1013:338
      Chrome Console:

      jquery-3.5.1.min.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading 'filter') TypeError: Cannot read properties of undefined (reading 'filter')
      at b (https://www.tt-board.eu/xf2dev/js/xf...504fd:1013:341)
      at b.recalculate (https://www.tt-board.eu/xf2dev/js/xf...504fd:1014:219)
      at b.recalculateIfNeeded (https://www.tt-board.eu/xf2dev/js/xf...504fd:1013:281)
      at b.getToolbars (https://www.tt-board.eu/xf2dev/js/xf...504fd:1011:364)
      at c.getButtonConfig (https://www.tt-board.eu/xf2dev/js/xf...5f504fd:984:36)
      at c.getEditorConfig (https://www.tt-board.eu/xf2dev/js/xf...f504fd:982:236)
      at c.startInit (https://www.tt-board.eu/xf2dev/js/xf...f504fd:977:149)
      at c.init (https://www.tt-board.eu/xf2dev/js/xf...f504fd:976:484)
      at b (https://www.tt-board.eu/xf2dev/js/xf...f504fd:150:237)
      at c (https://www.tt-board.eu/xf2dev/js/xf...f504fd:150:427) undefined
      S.Deferred.exceptionHook @ jquery-3.5.1.min.js:2
      t @ jquery-3.5.1.min.js:2
      setTimeout (async)
      (anonymous) @ jquery-3.5.1.min.js:2
      c @ jquery-3.5.1.min.js:2
      fireWith @ jquery-3.5.1.min.js:2
      fire @ jquery-3.5.1.min.js:2
      c @ jquery-3.5.1.min.js:2
      fireWith @ jquery-3.5.1.min.js:2
      ready @ jquery-3.5.1.min.js:2
      B @ jquery-3.5.1.min.js:2
      jquery-3.5.1.min.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'filter')
      at b (editor-compiled.js?_v=45f504fd:1013)
      at b.recalculate (editor-compiled.js?_v=45f504fd:1014)
      at b.recalculateIfNeeded (editor-compiled.js?_v=45f504fd:1013)
      at b.getToolbars (editor-compiled.js?_v=45f504fd:1011)
      at c.getButtonConfig (editor-compiled.js?_v=45f504fd:984)
      at c.getEditorConfig (editor-compiled.js?_v=45f504fd:982)
      at c.startInit (editor-compiled.js?_v=45f504fd:977)
      at c.init (editor-compiled.js?_v=45f504fd:976)
      at b (core-compiled.js?_v=45f504fd:150)
      at c (core-compiled.js?_v=45f504fd:150)
      Reply Reply  
    7. January 3, 2022 4:02 AM
      pegasus pegasus is offline
      VaultWiki Team
      I can get this to occur if I reset the wiki editor button configuration in the AdminCP button manager. I'm guessing the default configuration is invalid in some way. I will let you know once I've worked it out.
      Reply Reply  
    8. January 3, 2022 6:19 AM
      wolven wolven is offline
      New Member
      Since I had this reset error, I checked the function after you send me as workaround. The reset worked fine (obviously too fine :-D )
      Reply Reply  
    9. January 3, 2022 11:41 AM
      pegasus pegasus is offline
      VaultWiki Team
      In src/addons/vw/vw/XF/Template/Templater.php, find:
      Code:
      foreach ($grouped['buttons'] AS $key => $entry)
      BEFORE it, add:
      Code:
      							if (!isset($grouped['buttons']))
      							{
      								unset($toolbarConfig["$group"]);
      								continue;
      							}
      That will restore access to the BB-Code Button Manager for the damaged entries.

      In src/addons/vw/vw/XF/Repository/Editor.php, find:
      Code:
      			return $default[$type];
      BEFORE it, add:
      Code:
      			$entry = reset($default[$type]);
      			if (!isset($entry['buttons']))
      			{
      				$default = json_decode('{"wikiButtons":{"moreText":{"buttons":["clearFormatting","bold","italic","fontSize","textColor","fontFamily","strikeThrough","underline","xfInlineCode","xfInlineSpoiler","xfCustom_blarg"],"buttonsVisible":"5","align":"left","icon":"fa-ellipsis-v"},"moreParagraph":{"buttons":["xfList","align","paragraphFormat"],"buttonsVisible":"6","align":"left","icon":"fa-ellipsis-v"},"moreRich":{"buttons":["insertLink","insertImage","xfSmilie","xfMedia","xfQuote","insertTable","insertHR","insertVideo","xfCustom_gallery","xfSpoiler","xfCode"],"buttonsVisible":"6","align":"left","icon":"fa-ellipsis-v"},"moreMisc":{"buttons":["undo","redo","xfBbCode","xfDraft"],"buttonsVisible":"4","align":"right","icon":""}},"wikiButtonsMD":{"moreText":{"buttons":["bold","italic","fontSize","textColor","fontFamily","strikeThrough","underline","xfInlineCode","xfInlineSpoiler","xfCustom_blarg"],"buttonsVisible":"3","align":"left","icon":"fa-ellipsis-v"},"moreParagraph":{"buttons":["xfList","align","|","paragraphFormat"],"buttonsVisible":"3","align":"left","icon":"fa-ellipsis-v"},"moreRich":{"buttons":["insertLink","insertImage","xfSmilie","insertVideo","xfMedia","xfCustom_gallery","xfQuote","insertTable","insertHR","xfSpoiler","xfCode"],"buttonsVisible":"2","align":"left","icon":"fa-ellipsis-v"},"moreMisc":{"buttons":["undo","redo","clearFormatting","xfBbCode","xfDraft"],"buttonsVisible":"1","align":"right","icon":""}},"wikiButtonsSM":{"moreText":{"buttons":["bold","italic","fontSize","textColor","fontFamily","strikeThrough","underline","xfInlineCode","xfInlineSpoiler"],"buttonsVisible":"2","align":"left","icon":"fa-ellipsis-v"},"moreParagraph":{"buttons":["xfList","align","paragraphFormat"],"buttonsVisible":"1","align":"left","icon":"fa-ellipsis-v"},"moreRich":{"buttons":["insertLink","insertImage","xfSmilie","xfQuote","insertVideo","xfMedia","xfCustom_gallery","insertTable","insertHR","xfSpoiler","xfCode"],"buttonsVisible":"3","align":"left","icon":"fa-ellipsis-v"},"moreMisc":{"buttons":["undo","redo","xfBbCode","clearFormatting","xfDraft"],"buttonsVisible":"1","align":"right","icon":""}},"wikiButtonsXS":{"moreText":{"buttons":["bold","italic","fontSize","textColor","fontFamily","xfList","align","paragraphFormat","strikeThrough","underline","xfInlineSpoiler","xfInlineCode"],"buttonsVisible":"2","align":"left","icon":"fa-ellipsis-v"},"moreParagraph":{"buttons":[],"buttonsVisible":"0","align":"left","icon":"fa-ellipsis-v"},"moreRich":{"buttons":["insertLink","insertImage","xfSmilie","xfQuote","insertVideo","xfMedia","xfCustom_gallery","insertTable","insertHR","xfSpoiler","xfCode"],"buttonsVisible":"2","align":"left","icon":"fa-ellipsis-v"},"moreMisc":{"buttons":["undo","redo","xfBbCode","clearFormatting","xfDraft"],"buttonsVisible":"1","align":"right","icon":""}}}', true);
      			}
      Then reset the affected button configuration again. This should restore your toolbar.
      Reply Reply  
    10. January 4, 2022 5:07 AM
      wolven wolven is offline
      New Member
      Implemented and shows no effect.
      Still HTML Code an no editor controls (same image like the first attachment I had send yesterday)
      Reply Reply  
    11. January 4, 2022 12:09 PM
      pegasus pegasus is offline
      VaultWiki Team
      Did you remember to reset the button configuration again after making this change? This change fixed the issue for me after I reset the button configuration again.

      If you are still having an issue afterwards, I would need access to a test site with the issue in order to investigate further, as I can no longer reproduce this issue. You can submit test credentials here: https://www.vaultwiki.org/members/?do=newticket
      Reply Reply  
    12. January 5, 2022 7:00 AM
      wolven wolven is offline
      New Member
      Thanks for advise. I hadn't revertet.
      After so, it works as expected.

      Thanks for your support.
      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 8:21 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.