• 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
    • Array to string conversion

    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: Array to string conversion

    • Issue Tools
      • View Changes
    1. issueid=4989 April 3, 2017 8:09 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Array to string conversion

      Every time I try to add a bbcode I get this error:
      Code:
      ErrorException: Array to string conversion - library/XenForo/DataWriter.php:771 
      Generated By: alfa, A moment ago
      
      Stack Trace
      #0 /library/XenForo/DataWriter.php(771): XenForo_Application::handlePhpError(8, 'Array to string...', '/home/...', 771, Array)
      #1 /library/XenForo/DataWriter.php(721): XenForo_DataWriter->_castValueToType('string', Array, 'vw_extra', Array)
      #2 /library/XenForo/DataWriter.php(643): XenForo_DataWriter->_isFieldValueValid('vw_extra', Array, Array, Array)
      #3 /library/XenForo/DataWriter.php(1009): XenForo_DataWriter->set('vw_extra', Array, '', Array)
      #4 /library/vw/XenForo/DataWriter/BbCode.php(28): XenForo_DataWriter->bulkSet(Array, NULL)
      #5 /library/XenForo/ControllerAdmin/BbCode.php(130): vw_XenForo_DataWriter_BbCode->bulkSet(Array)
      #6 /library/vw/XenForo/ControllerAdmin/BbCode.php(93): XenForo_ControllerAdmin_BbCode->actionSave()
      #7 /library/XenForo/FrontController.php(351): vw_XenForo_ControllerAdmin_BbCode->actionSave()
      #8 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #9 /admin.php(13): XenForo_FrontController->run()
      #10 {main}
      Request State
      array(3) {
        ["url"] => string(61) "https://site.eu/admin.php?bb-codes/save"
        ["_GET"] => array(1) {
          ["bb-codes/save"] => string(0) ""
        }
        ["_POST"] => array(24) {
          ["new_bb_code_id"] => string(3) "sup"
          ["title"] => string(3) "SUP"
          ["description"] => string(11) "Superscript"
          ["bb_code_mode"] => string(7) "replace"
          ["has_option"] => string(2) "no"
          ["replace_html"] => string(46) "<sup style="vertical-align:top">{option}</sup>"
          ["callback_class"] => string(0) ""
          ["callback_method"] => string(0) ""
          ["example"] => string(21) "[sup]Header Tag[/sup]"
          ["allow_signature"] => string(1) "1"
          ["addon_id"] => string(3) "BBM"
          ["active"] => string(1) "1"
          ["option_regex"] => string(0) ""
          ["trim_lines_after"] => string(1) "0"
          ["editor_icon_url"] => string(0) ""
          ["sprite_params"] => array(2) {
            ["x"] => string(1) "0"
            ["y"] => string(1) "0"
          }
          ["replace_html_email"] => string(0) ""
          ["replace_text"] => string(0) ""
          ["vw_varname"] => string(0) ""
          ["vw_options"] => array(5) {
            ["nonwiki_editor"] => string(1) "1"
            ["wiki_editor"] => string(1) "1"
            ["nonwiki_faq"] => string(1) "1"
            ["nonwiki_parse"] => string(1) "1"
            ["wiki_parse"] => string(1) "1"
          }
          ["_xfToken"] => string(8) "********"
          ["_xfRequestUri"] => string(32) "/test1-xf/admin.php?bb-codes/add"
          ["_xfNoRedirect"] => string(1) "1"
          ["_xfResponseType"] => string(4) "json"
        }
      }
    Issue Details
    Issue Number 4989
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.0.17
    Fixed Version 4.0.18
    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. April 4, 2017 9:53 AM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs when saving a BB-Code via XenForo's BB-Codes manager without setting a unique BB-Code key under the wiki-related options. In library/vw/XenForo/ControllerAdmin/BbCode.php, find:
      Code:
      $bbcode['vw_options'] = $newoptions;
      Before it, add:
      Code:
      if (empty($extra)) $bbcode['vw_extra'] = '';
      Reply Reply  
    2. April 4, 2017 12:24 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Thanks!
      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 5:49 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.