• 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
    • Server Error

    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: Server Error

    • Issue Tools
      • View Changes
    1. issueid=3372 October 7, 2013 1:40 AM
      dustinmattison dustinmattison is offline
      New Member
      Server Error
      Xenforo server error when using wiki

      Hello

      I am starting to use my Wiki and I got this server error. What should I do?

      Server Error
      Code:
      Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THEN IF(1 < `vw_chapters`, `vw_chapters` - 1, 0) END WHERE `userid` IN ()' at line 2
      
      Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
      Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
      Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
      Zend_Db_Adapter_Abstract->query() in /home/dustinma/public_html/888innovation.com/vault/core/controller/db/xf.php at line 107
      vw_DB_Controller_XF->query_write() in /home/dustinma/public_html/888innovation.com/vault/core/model/db/mysql/vw.php at line 829
      vw_DB_MySQL_Model->shutdown_or_run() in /home/dustinma/public_html/888innovation.com/vault/core/model/db/mysql/vw.php at line 598
      vw_DB_MySQL_Model->update() in /home/dustinma/public_html/888innovation.com/vault/core/controller/dm/base/vw.php at line 607
      vw_DM_Base_Controller->update_user_count() in /home/dustinma/public_html/888innovation.com/vault/core/controller/dm/item/chapter/vw.php at line 394
      vw_DM_Item_Chapter_Controller->delete_multiple() in /home/dustinma/public_html/888innovation.com/vault/core/controller/dm/item/chapter/vw.php at line 287
      vw_DM_Item_Chapter_Controller->delete() in /home/dustinma/public_html/888innovation.com/vault/core/controller/dm/item/chapter/xf.php at line 67
      vw_DM_Item_Chapter_Controller_XF->delete() in /home/dustinma/public_html/888innovation.com/vault/core/controller/dm/xf.php at line 416
      vw_DM_Controller_XF->delete() in /home/dustinma/public_html/888innovation.com/vault/core/controller/ui/assign/vw.php at line 66
      vw_UI_Assign_Controller->save_assignments() in /home/dustinma/public_html/888innovation.com/vault/core/controller/ui/edit/page/vw.php at line 422
      vw_UI_Edit_Page_Controller->process_assignments() in /home/dustinma/public_html/888innovation.com/vault/core/controller/ui/edit/vw.php at line 207
      vw_UI_Edit_Controller->save() in /home/dustinma/public_html/888innovation.com/vault/core/controller/ui/page/vw.php at line 265
      vw_UI_Page_Controller->save() in /home/dustinma/public_html/888innovation.com/vault/core/controller/ui/page/vw.php at line 41
      vw_UI_Page_Controller->execute() in /home/dustinma/public_html/888innovation.com/vault/core/controller/ui/stack/vw.php at line 154
      vw_UI_Stack_Controller->execute() in vw/XenForo/ControllerPublic/Wiki.php at line 68
      vw_XenForo_ControllerPublic_Wiki->actionIndex() in XenForo/FrontController.php at line 337
      XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
      XenForo_FrontController->run() in /home/dustinma/public_html/888innovation.com/index.php at line 13
    Issue Details
    Issue Number 3372
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Books / Chapters
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.0 Beta 6
    Fixed Version 4.0.0 Beta 7
    Milestone VaultWiki 4 Beta X
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. October 7, 2013 11:15 AM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs when using the Book tab to remove a chapter from a book that was previously saved, without placing it in a different book. In vault/core/controller/dm/item/chapter/vw.php, find:
      Code:
      				if (!isset($users[$item['chapter_userid']]))
      				{
      					$users[$item['chapter_userid']] = 0;
      				}
      
      				$users[$item['chapter_userid']]++;
      Replace with:
      Code:
      				$key = 'userid';
      
      				if (isset($item['chapter_userid']))
      				{
      					$key = 'chapter_' . $key;
      				}
      
      				if (!isset($users[$item["$key"]]))
      				{
      					$users[$item["$key"]] = 0;
      				}
      
      				$users[$item["$key"]]++;
      From what I can tell this error leads to incorrect chapter-order values, which can cause more database errors in the future. This patch has thus been applied to the current build to minimize damage.
      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:31 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 © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.