• 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
    • [4.1 Beta 4] XF1.5 -> XF2.1: Upgrade interrupted due to MySQL statement prepare error, Undefined index: userid

    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: [4.1 Beta 4] XF1.5 -> XF2.1: Upgrade interrupted due to MySQL statement prepare error, Undefined index: userid

    • Issue Tools
      • View Changes
    1. issueid=5900 October 19, 2019 5:08 AM
      ACL ACL is offline
      Regular Member
      [4.1 Beta 4] XF1.5 -> XF2.1: Upgrade interrupted due to MySQL statement prepare error, Undefined index: userid

      In the middle upgrading a test site from XF1.5 and VaultWiki 4.1.0 Beta 4 b002 to XF2.1 and the same VW version, the upgrade script is interrupted due to a MySQL statment 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 '' at line 1
      Code:
      XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
      XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
      XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
      XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
      XF\Db\AbstractAdapter->query() in src/addons/vw/vw/_core/controller/db/xf2.php at line 203
      vw_DB_Controller_XF2->query_first() in src/addons/vw/vw/_core/model/db/mysql/vw.php at line 25
      vw_DB_MySQL_Model->select() in src/addons/vw/vw/_install/lib/upgradepath/steps/4/1/0/alpha/1/XF1T2/xf2.php at line 1277
      vw_Install_UpgradePath_Steps_410alpha1_XF1T2_Controller_XF2->{closure}() in src/addons/vw/vw/Setup.php at line 299
      vw\vw\Setup->vwRunStep() in src/addons/vw/vw/Setup.php at line 954
      vw\vw\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 576
      XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 321
      XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
      XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
      XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
      XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
      XF\App->run() in src/XF.php at line 390
      XF::runApp() in admin.php at line 13
      Immediately before this, another entry was added to the error log:
      Undefined index: userid src/addons/vw/vw/_install/lib/upgradepath/steps/4/1/0/alpha/1/XF1T2/xf2.php:1275
      Code:
      #0 src/addons/vw/vw/_install/lib/upgradepath/steps/4/1/0/alpha/1/XF1T2/xf2.php(1275): vw\vw\Setup\View->handle_php_error(8, 'Undefined index...', '/path/to/forum/...', 1275, Array)
      #1 src/addons/vw/vw/Setup.php(299): vw_Install_UpgradePath_Steps_410alpha1_XF1T2_Controller_XF2->{closure}(Object(vw\vw\Setup\Caller\Upgrade), false)
      #2 src/addons/vw/vw/Setup.php(954): vw\vw\Setup->vwRunStep('upgrade', Object(vw_Install_UpgradePath_Steps_410alpha1_XF1T2_Controller_XF2), Array, 17)
      #3 src/XF/Admin/Controller/AddOn.php(576): vw\vw\Setup->upgrade(Array)
      #4 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
      #5 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
      #6 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
      #7 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #8 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
      #9 src/XF.php(390): XF\App->run()
      #10 admin.php(13): XF::runApp('XF\\Admin\\App')
      #11 {main}
      The last step in the upgrade log is:
      Code:
      == Upgrading to 4.1.0 Alpha 1 ==
      
      == Step 17 (0) ==
      Updating data in table: vw_moderator
      An earlier attempt (two weeks ago) at upgrading XF1.5 -> XF2.1 with 4.1 Beta 3 had Step 17 as "Updating Version Number"
    Issue Details
    Issue Number 5900
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.0 Beta 4
    Fixed Version 4.1.0 Beta 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. October 21, 2019 7:36 AM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed in the next build. In src/addons/vw/vw/_install/upgradepath/4/1/0/alpha/1/XF1T2/xf2.php, find:
      Code:
      vw_DB::get()->query()->eq('userid', $moderator['userid'])
      Replace with:
      Code:
      vw_DB::get()->query()->eq('userid', $moderator['user_id'])
      Find:
      Code:
      $contentModerator->user_id = $userid;
      Replace with:
      Code:
      $contentModerator->user_id = $moderator['userid'];
      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 12:45 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.