• 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\InvalidQueryException: MySQL statement prepare error [1064]

    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\InvalidQueryException: MySQL statement prepare error [1064]

    • Issue Tools
      • View Changes
    1. issueid=5997 March 29, 2020 10:20 AM
      hollosch hollosch is offline
      Senior Member
      XF\Db\InvalidQueryException: MySQL statement prepare error [1064]

      XF\Db\InvalidQueryException: MySQL statement prepare error [1064]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND `revisionid` NOT IN () GROUP BY field_value_id LIMIT 0' at line 1 src/XF/Db/AbstractStatement.php:228
      Generiert von: hollosch 29. März 2020 um 16:19
      Stack-Trace
      SELECT * FROM `vw_field_revision` WHERE `field_value_id` IN () AND `revisionid` NOT IN () GROUP BY field_value_id LIMIT 0
      ------------

      #0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException()
      #1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException()
      #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(148): XF\Db\AbstractAdapter->query()
      #5 src/addons/vw/vw/_core/model/db/mysql/vw.php(25): vw_DB_Controller_XF2->query_read()
      #6 src/addons/vw/vw/_core/controller/dm/fieldrevision/vw.php(320): vw_DB_MySQL_Model->select()
      #7 src/addons/vw/vw/_core/controller/dm/vw.php(147): vw_DM_FieldRevision_Controller->delete_multiple()
      #8 src/addons/vw/vw/_core/controller/dm/revision/vw.php(2290): vw_DM_Controller->delete_multiple()
      #9 src/addons/vw/vw/_core/controller/dm/vw.php(147): vw_DM_Revision_Controller->delete_multiple()
      #10 src/addons/vw/vw/_core/model/cron/deferred/node/vw.php(161): vw_DM_Controller->delete_multiple()
      #11 src/addons/vw/vw/_core/model/cron/deferred/node/vw.php(115): vw_Cron_Deferred_Node_Model->delete()
      #12 src/addons/vw/vw/_core/model/cron/deferred/vw.php(64): vw_Cron_Deferred_Node_Model->run()
      #13 src/addons/vw/vw/Handler/Job/Defer.php(30): vw_Cron_Deferred_Model->exec()
      #14 src/XF/Job/Manager.php(253): vw\vw\Handler\Job\Defer->run()
      #15 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal()
      #16 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry()
      #17 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds()
      #18 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob()
      #19 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()
      #20 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()
      #21 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()
      #22 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
      #23 src/XF.php(391): XF\App->run()
      #24 admin.php(13): XF::runApp()
      #25 {main}
      Status der Anfrage
      array(4) {
      ["url"] => string(24) "/admin.php?tools/run-job"
      ["referrer"] => string(133) "https://regio-portal.wiki/admin.php?tools/run-job&only_ids=17765&_xfRedirect=https%3A%2F%2Fregio-portal.wiki%2Fadmin.php%3Fadd-ons%2F"
      ["_GET"] => array(1) {
      ["tools/run-job"] => string(0) ""
      }
      ["_POST"] => array(3) {
      ["_xfRedirect"] => string(44) "https://regio-portal.wiki/admin.php?add-ons/"
      ["_xfToken"] => string(8) "********"
      ["only_ids"] => string(5) "17765"
      }
      }
    Issue Details
    Issue Number 5997
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Moderator Tools
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.1.0 RC 2
    Fixed Version 4.1.0 RC 2
    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. March 29, 2020 12:14 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed in the next build. This occurs when deleting edits that have no custom fields set.

      In src/addons/vw/vw/_core/controller/dm/revision/vw.php, find:
      Code:
      			$dm = vw_Hard_Core::controller('DM')->create('FieldRevision', 'SILENT');
      			$dm->set_info('is_automated', 1);
      			$dm->delete_multiple($delfields);
      			unset($dm);
      Replace with:
      Code:
      			if ($delfields)
      			{
      				$dm = vw_Hard_Core::controller('DM')->create('FieldRevision', 'SILENT');
      				$dm->set_info('is_automated', 1);
      				$dm->delete_multiple($delfields);
      				unset($dm);
      			}
      Reply Reply  
    2. March 31, 2020 9:39 AM
      hollosch hollosch is offline
      Senior Member
      Quote Originally Posted by pegasus
      Fixed in the next build. This occurs when deleting edits that have no custom fields set.

      In src/addons/vw/vw/_core/dm/revision/vw.php, find:
      Code:
      			$dm = vw_Hard_Core::controller('DM')->create('FieldRevision', 'SILENT');
      			$dm->set_info('is_automated', 1);
      			$dm->delete_multiple($delfields);
      			unset($dm);
      Replace with:
      Code:
      			if ($delfields)
      			{
      				$dm = vw_Hard_Core::controller('DM')->create('FieldRevision', 'SILENT');
      				$dm->set_info('is_automated', 1);
      				$dm->delete_multiple($delfields);
      				unset($dm);
      			}
      Can't find the file. Is the path correct?
      Reply Reply  
    3. March 31, 2020 10:03 AM
      pegasus pegasus is offline
      VaultWiki Team
      Sorry, fixed the path.
      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 1:04 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.