• 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
    • XF\Db\Exception: MySQL statement prepare error [1146]: Table 'database.vw_upgradelog' doesn't exist in src\XF\Db\AbstractStatement.php at line 228

    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: XF\Db\Exception: MySQL statement prepare error [1146]: Table 'database.vw_upgradelog' doesn't exist in src\XF\Db\AbstractStatement.php at line 228

    • Issue Tools
      • View Changes
    1. issueid=6242 August 5, 2021 5:04 AM
      SeToY SeToY is offline
      Junior Member
      XF\Db\Exception: MySQL statement prepare error [1146]: Table 'database.vw_upgradelog' doesn't exist in src\XF\Db\AbstractStatement.php at line 228
      XF\Db\Exception: MySQL statement prepare error [1146]: Table 'database.vw_upgradelog' doesn't exist in src\XF\Db\AbstractStatement.php at line 228

      Hey there,

      just uploaded 4.1.2 Patch Level 1 on top of 4.1.2, and, despite XF telling me there are 30 files with differing contents again, starting the upgrade results in the exception:

      Code:
      Stack trace
      REPLACE INTO `vw_upgradelog` (`upgradetype`, `version`)  VALUES ('ACT','0.0.0')
      ------------
      
      #0 src\XF\Db\Mysqli\Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
      #1 src\XF\Db\Mysqli\Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
      #2 src\XF\Db\Mysqli\Statement.php(54): XF\Db\Mysqli\Statement->prepare()
      #3 src\XF\Db\AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
      #4 src\addons\vw\vw\_core\controller\db\xf2.php(117): XF\Db\AbstractAdapter->query('REPLACE INTO `v...')
      #5 src\addons\vw\vw\_core\model\db\mysql\vw.php(1386): vw_DB_Controller_XF2->query_write('REPLACE INTO `v...')
      #6 src\addons\vw\vw\_core\model\db\mysql\vw.php(1310): vw_DB_MySQL_Model->shutdown_or_run('REPLACE INTO `v...', false)
      #7 src\addons\vw\vw\Setup.php(891): vw_DB_MySQL_Model->replace(Array)
      #8 src\addons\vw\vw\Setup.php(968): vw\vw\Setup->vwStopProcessing(NULL)
      #9 src\XF\Admin\Controller\AddOn.php(594): vw\vw\Setup->upgrade(Array)
      #10 src\XF\Mvc\Dispatcher.php(350): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
      #11 src\XF\Mvc\Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
      #12 src\XF\Mvc\Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
      #13 src\XF\Mvc\Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #14 src\XF\App.php(2344): XF\Mvc\Dispatcher->run()
      #15 src\XF.php(512): XF\App->run()
      #16 admin.php(13): XF::runApp('XF\\Admin\\App')
      #17 {main}
      The table is called xf_vw_upgradelog, not vw_upgradelog.
    Issue Details
    Issue Number 6242
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status Not a Bug
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.2
    Fixed Version (none)
    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. August 5, 2021 9:26 AM
      pegasus pegasus is offline
      VaultWiki Team
      Someone else had this issue several days ago and the package was updated yesterday with the corrections. I was unable to reproduce this error when I used the new package. When did you download this ZIP? If it was a few days ago, I recommend redownloading.
      Reply Reply  
    2. August 5, 2021 9:27 AM
      SeToY SeToY is offline
      Junior Member
      Quote Originally Posted by pegasus
      When did you download this ZIP?
      A couple of minutes before posting the bug.

      Which file should I check for the fix?

      \vw\vw\Setup\Caller\Install.php
      Code:
      'table' => 'vw_upgradelog',
      \vw\vw\Setup\Caller\Upgrade.php
      Code:
      			\vw_DB::get()->query()->update(array(
      				'table' => 'vw_upgradelog',
      Code:
      			// this branch was added after we installed, no existing version
      			\vw_DB::get()->query()->insert(array(
      				'table' => 'vw_upgradelog',
      Reply Reply  
    3. August 5, 2021 10:56 AM
      pegasus pegasus is offline
      VaultWiki Team
      I can tell by the stack trace
      Code:
      #8 src\addons\vw\vw\Setup.php(968): vw\vw\Setup->vwStopProcessing(NULL)
      that your \vw\vw\Setup.php is outdated.
      The fixed vwStopProcessing calls all have 2 arguments:
      Code:
      $this->vwStopProcessing($result, $last)
      If your file looks like this but you are getting that message in the stack trace, then your PHP process is running a different version of the file from its cache or from another file location. Try restarting your server's PHP process manager.

      If your file does not look like this, then the package you downloaded did not contain the expected files, or the files were not successfully transferred from the package to your server.
      Reply Reply  
    4. August 5, 2021 11:06 AM
      SeToY SeToY is offline
      Junior Member
      Quote Originally Posted by pegasus
      The fixed vwStopProcessing calls all have 2 arguments:
      Code:
      $this->vwStopProcessing($result, $last)
      They do have two arguments in lines 991 and 1017 in my uploaded Setup.php. Funny thing: During the initial upgrade, I deleted the hashes.json to avoid the warning message of XF (see issue #6243). The upgrade failed. I have now uploaded only the missing hashes.json and the upgrade succeeded. Maybe the upload has invalidated a cache inside XF? Dunno... Anyway: It's fixed. Or was never broken.

      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 3:37 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.