• 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 Alpha 3] XF1.5 to XF2.1 upgrade: vw_autolinkcache table missing, database exception 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: [4.1 Alpha 3] XF1.5 to XF2.1 upgrade: vw_autolinkcache table missing, database exception error

    • Issue Tools
      • View Changes
    1. issueid=5705 April 8, 2019 9:24 AM
      ACL ACL is offline
      Regular Member
      [4.1 Alpha 3] XF1.5 to XF2.1 upgrade: vw_autolinkcache table missing, database exception error

      XF\Db\Exception: MySQL statement prepare error [1146]: Table 'vw_autolinkcache' doesn't exist in src/XF/Db/AbstractStatement.php at line 217
      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/XF/Mvc/Entity/Finder.php at line 1261
      XF\Mvc\Entity\Finder->fetchOne() in src/XF/Mvc/Entity/Manager.php at line 149
      XF\Mvc\Entity\Manager->find() in src/XF/Mvc/Entity/Manager.php at line 357
      XF\Mvc\Entity\Manager->getRelation() in src/XF/Mvc/Entity/Entity.php at line 385
      XF\Mvc\Entity\Entity->getRelation() in src/XF/Mvc/Entity/Entity.php at line 177
      XF\Mvc\Entity\Entity->get() in src/XF/Mvc/Entity/Entity.php at line 101
      XF\Mvc\Entity\Entity->__get() in src/XF/Session/Session.php at line 258
      XF\Session\Session->changeUser() in src/XF/Admin/Controller/Login.php at line 108
      XF\Admin\Controller\Login->completeLogin() in src/XF/Admin/Controller/Login.php at line 70
      XF\Admin\Controller\Login->actionLogin() 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 2177
      XF\App->run() in src/XF.php at line 390
      XF::runApp() in admin.php at line 13
      I experience this issue when attempting to login to the Admin CP of XenForo 2.1 on my private testing forum. This is the same XenForo & VW instance as the one from issue #5701.
    Issue Details
    Issue Number 5705
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Unknown
    Status Fixed
    Priority 1 - Security / Login / Data Loss
    Affected Version 4.1.0 Alpha 3
    Fixed Version 4.1.0 Alpha 3
    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. April 8, 2019 11:33 AM
      pegasus pegasus is offline
      VaultWiki Team
      Please send the upgrade log located in internal_data/vw_logs to:
      Code:
      support@vaultwiki.org
      Reply Reply  
    2. April 8, 2019 11:55 AM
      ACL ACL is offline
      Regular Member
      For some reason, the whole vw_logs folder is missing . When the next Alpha release comes out, I will try upgrading to it from 1.5 and send you that log if vw_autolinkcache is missing at that time.
      Reply Reply  
    3. April 11, 2019 6:22 PM
      pegasus pegasus is offline
      VaultWiki Team
      On a fresh test board running XF 1.5 with VW 4.0.25:
      1. I upgraded XF to 2.1.
      2. I upgraded VW to 4.0.0 Alpha 3 build 003.

      After upgrading, my database correctly contains vw_autolinkcache.

      However, I did not end up with a vw_logs folder. This was an issue with the recursive flag being omitted when creating the log file, and it will be fixed in the next release.
      Reply Reply  
    4. April 12, 2019 2:13 AM
      ACL ACL is offline
      Regular Member
      Thanks for trying to reproduce this.

      I started with XF1.5 VW 4.0.24 and then:
      1. Upgraded VW to 4.1.0. Alpha 3 build 002 (003 was not available at the time)
      2. Upgraded XF to 2.1
      3. Upgraded VW legacy addon to Alpha 3 build 002 (XF2.1 version, same version number)

      FWIW, this testing XF instance is the same one that issue 5701 relates to, where I repeated the upgrade process.

      I'll attempt this again with the next 4.1 release (possibly Alpha 4) to see whether this occurs again ... perhaps it was a side effect of the other fixed issue.
      Reply Reply  
    5. April 12, 2019 2:25 PM
      expanserpb expanserpb is offline
      Junior Member
      Same issue moving from Xf 1.5 with VW 4.1 alpha 2 build 3 to Xf 2.1 upgraded legacy addon to alpha 2 build 3:


      Server error log
      XF\Db\Exception: MySQL statement prepare error [1146]: Table 'chroniclesrp.vw_autolinkcache' doesn't exist src/XF/Db/AbstractStatement.php:217
      Generated by: Unknown account Apr 12, 2019 at 7:22 PM
      Stack trace
      SELECT `xf_user_profile`.*, `vw_autolinkcache_vwAutoLinkCache_1`.*
      FROM `xf_user_profile`
      LEFT JOIN `vw_autolinkcache` AS `vw_autolinkcache_vwAutoLinkCache_1` ON (`vw_autolinkcache_vwAutoLinkCache_1`.`content_type` = 'user' AND `vw_autolinkcache_vwAutoLinkCache_1`.`content_id` = `xf_user_profile`.`user_id`)
      WHERE (`xf_user_profile`.`user_id` = 8)


      LIMIT 1
      ------------

      #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/XF/Mvc/Entity/Finder.php(1261): XF\Db\AbstractAdapter->query('
      SELECT `xf_...')
      #5 src/XF/Mvc/Entity/Manager.php(149): XF\Mvc\Entity\Finder->fetchOne()
      #6 src/XF/Mvc/Entity/Manager.php(357): XF\Mvc\Entity\Manager->find('XF:UserProfile', 8, Array)
      #7 src/XF/Mvc/Entity/Entity.php(385): XF\Mvc\Entity\Manager->getRelation(Array, Object(vw\vw\XF\Entity\User))
      #8 src/XF/Mvc/Entity/Entity.php(177): XF\Mvc\Entity\Entity->getRelation('Profile')
      #9 src/XF/Mvc/Entity/Entity.php(101): XF\Mvc\Entity\Entity->get('Profile')
      #10 src/XF/Session/Session.php(258): XF\Mvc\Entity\Entity->__get('Profile')
      #11 src/XF/Admin/Controller/Login.php(108): XF\Session\Session->changeUser(Object(vw\vw\XF\Entity\User))
      #12 src/XF/Admin/Controller/Login.php(70): XF\Admin\Controller\Login->completeLogin(Object(vw\vw\XF\Entity\User))
      #13 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Login->actionLogin(Object(XF\Mvc\ParameterBag))
      #14 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Login', 'Login', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Login), NULL)
      #15 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Login), NULL)
      #16 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #17 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
      #18 src/XF.php(390): XF\App->run()
      #19 admin.php(13): XF::runApp('XF\\Admin\\App')
      #20 {main}
      Request state
      array(4) {
      ["url"] => string(22) "/admin.php?login/login"
      ["referrer"] => string(39) "https://chroniclesrptests.com/admin.php"
      ["_GET"] => array(1) {
      ["login/login"] => string(0) ""
      }
      ["_POST"] => array(6) {
      ["login"] => string(12) "Raigryn Vayd"
      ["password"] => string(8) "********"
      ["_xfToken"] => string(8) "********"
      ["_xfRequestUri"] => string(10) "/admin.php"
      ["_xfWithData"] => string(1) "1"
      ["_xfResponseType"] => string(4) "json"
      }
      }
      Reply Reply  
    6. April 12, 2019 2:26 PM
      expanserpb expanserpb is offline
      Junior Member
      I also do not have a vw_logs
      Reply Reply  
    7. April 15, 2019 1:57 PM
      pegasus pegasus is offline
      VaultWiki Team
      I was able to reproduce the database error after following the upgrade procedure outlined by ACL.

      This occurs when performing an upgrade in XF 2, if there is a branch of the VaultWiki upgrade that was never started before:
      That is, specific changes for 1.3, 1.5, 2.0, etc that were not already performed at the initial install, and this is the first time the upgrade is noticing a branch change -
      * The first step of the first upgrade script in the new branch was being skipped.

      In src/addons/vw/vw/Setup.php, find:
      Code:
      $version['steps'][$newVersion[0]] = array($internalStep, $startat);
      Replace with:
      Code:
      $version['steps'][$newVersion[0]] = array(0, $startat);
      To correct an existing installation that already upgraded, run the following MySQL queries:
      Code:
      DELETE FROM vw_upgradelog WHERE upgradetype = 'XF1T2';
      Code:
      UPDATE xf_addon
      SET json_hash = '',
      version_id = version_id - 1
      WHERE addon_id = 'vw/vw';
      Then you will be able to perform the upgrade again.

      After the upgrade, you may want to cleanup any widgets / widget definitions that might have been duplicated.
      Reply Reply  
    8. April 17, 2019 7:37 AM
      ACL ACL is offline
      Regular Member
      Great news that you were able to produce this, thanks . I manually created the vw_autolinkcache table structure to fix the error - this issue occurred with a testing instance of VW 4.1 that I don't intend to keep.
      Reply Reply  
    9. April 17, 2019 8:54 AM
      expanserpb expanserpb is offline
      Junior Member
      Cheers, I'll give this a go!

      I'm still in testing also!
      Reply Reply  
    10. April 17, 2019 10:35 AM
      expanserpb expanserpb is offline
      Junior Member
      Okay the change worked and now the vaultwiki works.

      However I've lost access to the admin panel (this happened before) and get the following if I try and open a thread:


      Chronicles RP - Fantasy Roleplay Forum
      Chronicles RP - Fantasy Roleplay Forum
      XF\Db\Exception: MySQL statement prepare error [1146]: Table 'chroniclesrp.vw_autolinkcache' doesn't exist in src/XF/Db/AbstractStatement.php at line 217
      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/XF/Mvc/Entity/Finder.php at line 1261
      XF\Mvc\Entity\Finder->fetchOne() in src/XF/Mvc/Entity/Manager.php at line 149
      XF\Mvc\Entity\Manager->find() in src/XF/Pub/Controller/Thread.php at line 204
      XF\Pub\Controller\Thread->actionPost() 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 2177
      XF\App->run() in src/XF.php at line 390
      XF::runApp() in index.php at line 20

      Mine is alpha 2 (happen to open a seperate ticket if necessary)
      Reply Reply  
    11. April 17, 2019 12:49 PM
      expanserpb expanserpb is offline
      Junior Member
      XF\Db\Exception: MySQL statement prepare error [1146]: Table 'chroniclesrp.vw_autolinkcache' doesn't exist src/XF/Db/AbstractStatement.php:217
      Generated by: Unknown account Apr 17, 2019 at 3:27 PM
      Stack trace
      SELECT `xf_user_profile`.*, `vw_autolinkcache_vwAutoLinkCache_1`.*
      FROM `xf_user_profile`
      LEFT JOIN `vw_autolinkcache` AS `vw_autolinkcache_vwAutoLinkCache_1` ON (`vw_autolinkcache_vwAutoLinkCache_1`.`content_type` = 'user' AND `vw_autolinkcache_vwAutoLinkCache_1`.`content_id` = `xf_user_profile`.`user_id`)
      WHERE (`xf_user_profile`.`user_id` = 8)


      LIMIT 1
      ------------

      #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/XF/Mvc/Entity/Finder.php(1261): XF\Db\AbstractAdapter->query('
      SELECT `xf_...')
      #5 src/XF/Mvc/Entity/Manager.php(149): XF\Mvc\Entity\Finder->fetchOne()
      #6 src/XF/Mvc/Entity/Manager.php(357): XF\Mvc\Entity\Manager->find('XF:UserProfile', 8, Array)
      #7 src/XF/Mvc/Entity/Entity.php(385): XF\Mvc\Entity\Manager->getRelation(Array, Object(vw\vw\XF\Entity\User))
      #8 src/XF/Mvc/Entity/Entity.php(177): XF\Mvc\Entity\Entity->getRelation('Profile')
      #9 src/XF/Mvc/Entity/Entity.php(101): XF\Mvc\Entity\Entity->get('Profile')
      #10 src/XF/Session/Session.php(258): XF\Mvc\Entity\Entity->__get('Profile')
      #11 src/XF/Admin/Controller/Login.php(108): XF\Session\Session->changeUser(Object(vw\vw\XF\Entity\User))
      #12 src/XF/Admin/Controller/Login.php(70): XF\Admin\Controller\Login->completeLogin(Object(vw\vw\XF\Entity\User))
      #13 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\Login->actionLogin(Object(XF\Mvc\ParameterBag))
      #14 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Login', 'Login', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Login), NULL)
      #15 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Login), NULL)
      #16 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #17 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
      #18 src/XF.php(390): XF\App->run()
      #19 admin.php(13): XF::runApp('XF\\Admin\\App')
      #20 {main}
      Request state
      array(4) {
      ["url"] => string(22) "/admin.php?login/login"
      ["referrer"] => string(39) "https://chroniclesrptests.com/admin.php"
      ["_GET"] => array(1) {
      ["login/login"] => string(0) ""
      }
      ["_POST"] => array(6) {
      ["login"] => string(12) "Raigryn Vayd"
      ["password"] => string(8) "********"
      ["_xfToken"] => string(8) "********"
      ["_xfRequestUri"] => string(10) "/admin.php"
      ["_xfWithData"] => string(1) "1"
      ["_xfResponseType"] => string(4) "json"
      }
      }
      Reply Reply  
    12. April 17, 2019 1:07 PM
      ACL ACL is offline
      Regular Member
      Oh good, so it wasn't just me.

      As stated before, I created the table structure manually to stop the error. I used phpmyadmin to copy the vw_autolinkcache table structure from a functional VW instance in a different database. Then I switched to my testing DB and ran the CREATE TABLE sql code. I could PM you the code if you wanted it. Or wait for proper fixes/instructions from pegasus.
      Reply Reply  
    13. April 17, 2019 1:19 PM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks for this. It looks like it is not actually possible to fix this state just by running the upgrade again, since the table is referenced in the AdminCP and you need access to the AdminCP in order to run the upgrade.

      You can manually create the table as ACL has done:
      Code:
      CREATE TABLE vw_autolinkcache
      (
      	cache_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
      	dateline INT UNSIGNED NOT NULL DEFAULT 0,
      	content_id INT UNSIGNED NOT NULL DEFAULT 0,
      	content_type VARCHAR(25) NOT NULL DEFAULT '',
      	cache_hash VARBINARY(40) NOT NULL DEFAULT X'',
      	cache_text MEDIUMBLOB NULL,
      	PRIMARY KEY cache_id (cache_id),
      	UNIQUE INDEX cache_key (content_id, content_type),
      	INDEX dateline (dateline)	
      )
      ###
      For now, we will just have to assume that all existing installations are broken and make some changes in the ZIP. If you created the table, you don't need to do the following.

      In src/addons/vw/vw/XF/Entity/Post.php, UserProfile.php, and ConversationMessage.php, find:
      Code:
      if (\vw_Hard_Core::model('Version')->installed('4.1.0 Alpha 1'))
      Replace with:
      Code:
      if (\vw_Hard_Core::model('Version')->installed('4.1.0 Alpha 4'))
      This will defer the feature until a later version so we have a chance to try the table creations again.
      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 7:35 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.