• 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
    • MySQL statement prepare error [1054]: Unknown column 'action' in 'field list'

    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: MySQL statement prepare error [1054]: Unknown column 'action' in 'field list'

    • Issue Tools
      • View Changes
    1. issueid=5660 February 22, 2019 2:28 PM
      SeToY SeToY is offline
      Junior Member
      MySQL statement prepare error [1054]: Unknown column 'action' in 'field list'
      MySQL error when trying to upgrade from 4.0.25 to 4.1.0 Alpha 2

      Hi there,

      tried to upgrade from 4.0.25 to 4.1.0 Alpha 2

      ["params"] => string(32) "{"step":18,"version_id":4010011}"
      ["count"] => string(2) "94"

      Code:
      Server error log
      XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'action' in 'field list' src\XF\Db\AbstractStatement.php:217
      Generated by: SeToY 20 Feb 2019 at 21:27
      Stack trace
      INSERT  IGNORE  INTO `xf_user_alert_optout` (`user_id`, `action`)  VALUES (1225,'vwpage_like2'),
      	(1225,'vwpage_like3'),
      	(1699,'vwpage_like2'),
      	(1699,'vwpage_like3'),
      	(2386,'vwpage_like2'),
      	(2386,'vwpage_like3')
      ------------
      
      #0 src\XF\Db\Mysqli\Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
      #1 src\XF\Db\Mysqli\Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
      #2 src\XF\Db\Mysqli\Statement.php(54): XF\Db\Mysqli\Statement->prepare()
      #3 src\XF\Db\AbstractAdapter.php(89): XF\Db\Mysqli\Statement->execute()
      #4 src\addons\vw\vw\_core\controller\db\xf2.php(117): XF\Db\AbstractAdapter->query('INSERT  IGNORE ...')
      #5 src\addons\vw\vw\_core\model\db\mysql\vw.php(1330): vw_DB_Controller_XF2->query_write('INSERT  IGNORE ...')
      #6 src\addons\vw\vw\_core\model\db\mysql\vw.php(1075): vw_DB_MySQL_Model->shutdown_or_run('INSERT  IGNORE ...', false)
      #7 src\addons\vw\vw\_install\lib\upgradepath\steps\4\1\0\alpha\1\C\xf0.php(767): vw_DB_MySQL_Model->insert(Array)
      #8 src\addons\vw\vw\Setup.php(280): vw_Install_UpgradePath_Steps_410alpha1_C_Controller_XF0->{closure}(Object(vw\vw\Setup\Caller\Upgrade), false)
      #9 src\addons\vw\vw\Setup.php(890): vw\vw\Setup->vwRunStep('upgrade', Object(vw_Install_UpgradePath_Steps_410alpha1_C_Controller_XF2), Array, 82)
      #10 src\XF\Admin\Controller\AddOn.php(575): vw\vw\Setup->upgrade(Array)
      #11 src\XF\Mvc\Dispatcher.php(321): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
      #12 src\XF\Mvc\Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
      #13 src\XF\Mvc\Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
      #14 src\XF\Mvc\Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #15 src\XF\App.php(2177): XF\Mvc\Dispatcher->run()
      #16 src\XF.php(390): XF\App->run()
      #17 admin.php(13): XF::runApp('XF\\Admin\\App')
      #18 {main}
      xf_user_alert_optout has columns "user_id" and "alert", not "action"
    Issue Details
    Issue Number 5660
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.0 Alpha 1 Public
    Fixed Version 4.1.0 Alpha 2
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. February 22, 2019 3:36 PM
      SeToY SeToY is offline
      Junior Member
      Update:

      \src\addons\vw\vw\_install\lib\upgradepath\steps\4\1\0\al pha\1\C\xf0.php line 747-753
      Changed
      Code:
      'action'
      to
      Code:
      'alert'
      then ran the upgrade again. New error:

      Code:
      XF\Db\Exception: Database Error: INSERT INTO `vw_upgradelog` (`upgradetype`, `version`, `step`, `offset`) VALUES ('C','4.1.0 Alpha 1',0,0), ('C0','4.0.25') ON DUPLICATE KEY UPDATE version = VALUES(version), step = VALUES(step), offset = VALUES(offset) MySQL statement prepare error [1136]: Column count doesn't match value count at row 2 in src\addons\vw\vw\_core\controller\db\xf2.php at line 361
      vw_DB_Controller_XF2->halt() in src\addons\vw\vw\_core\model\db\mysql\vw.php at line 1282
      vw_DB_MySQL_Model->replace() in src\addons\vw\vw\_core\controller\install\vw.php at line 113
      vw_Install_Controller->set_version() in src\addons\vw\vw\Setup\Caller\AbstractCaller.php at line 302
      vw\vw\Setup\Caller\AbstractCaller->set_version() in src\addons\vw\vw\Setup\Caller\Upgrade.php at line 228
      vw\vw\Setup\Caller\Upgrade->incr() in src\addons\vw\vw\Setup\Caller\Upgrade.php at line 125
      vw\vw\Setup\Caller\Upgrade->update_version() in src\addons\vw\vw\Setup.php at line 266
      vw\vw\Setup->vw\vw\{closure}() in src\addons\vw\vw\Setup.php at line 280
      vw\vw\Setup->vwRunStep() in src\addons\vw\vw\Setup.php at line 890
      vw\vw\Setup->upgrade() in src\XF\Admin\Controller\AddOn.php at line 575
      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 2177
      XF\App->run() in src\XF.php at line 390
      XF::runApp() in admin.php at line 13
      My vw_upgradelog:

      Code:
      A+	4.0.9 Beta 1	0	0
      C	4.0.25	84	0
      C0	4.0.25	0	0
      F	4.0.25	0	0
      L	0.0.0	0	0
      M564	4.0.9 Beta 1	0	0
      X2	4.0.0 Alpha 1	0	0
      XF130	4.0.23	0	0
      XF150	4.0.9 Beta 1	0	0
      Reply Reply  
    2. February 22, 2019 6:41 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed in the next build. In src/addons/vw/vw/Setup/Caller/Upgrade.php, find:
      Code:
      $values['C0'] = $this->versioninfo["$type"];
      AFTER it, add:
      Code:
      $values['steps']['C0'] = array(0, 0);
      Reply Reply  
    3. February 23, 2019 6:45 AM
      SeToY SeToY is offline
      Junior Member
      Quote Originally Posted by pegasus
      Fixed in the next build
      Including the first error regarding action/alert? This error was produced on a test environment so I'll do the same upgrade path on the production forums once this is fixed
      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:44 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.