• 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
    • Database Error: Cannot undo/rollback page to revision before a MediaWiki import

    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: Database Error: Cannot undo/rollback page to revision before a MediaWiki import

    • Issue Tools
      • View Changes
    1. issueid=4920 February 19, 2017 9:02 AM
      ACL ACL is offline
      Regular Member
      Database Error: Cannot undo/rollback page to revision before a MediaWiki import

      Database Error: UPDATE `vw_redirect` SET `target` = '', `targetkey` = '', `targetprefixid` = 0 WHERE targetid = Mysqli 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 3
      - vault/core/controller/db/xf.php:173

      Code:
      #0 /home/path/to/vault/core/controller/db/xf.php(157): vw_DB_Controller_XF->throw_error(Object(Zend_Db_Statement_Mysqli_Exception), 'UPDATE  `vw_red...')
      #1 /home/path/to/vault/core/model/db/mysql/vw.php(1105): vw_DB_Controller_XF->query_write('UPDATE  `vw_red...')
      #2 /home/path/to/vault/core/model/db/mysql/vw.php(768): vw_DB_MySQL_Model->shutdown_or_run('UPDATE  `vw_red...', false)
      #3 /home/path/to/vault/core/controller/dm/revision/vw.php(633): vw_DB_MySQL_Model->update(Array)
      #4 /home/path/to/vault/core/controller/dm/revision/vw.php(483): vw_DM_Revision_Controller->save_synonyms()
      #5 /home/path/to/library/vw/XenForo/DataWriter.php(481): vw_DM_Revision_Controller->post_save_each()
      #6 /home/path/to/library/XenForo/DataWriter.php(1423): vw_XenForo_DataWriter->_postSave()
      #7 /home/path/to/vault/core/controller/dm/xf.php(415): XenForo_DataWriter->save()
      #8 /home/path/to/vault/core/controller/dm/revision/vw.php(1741): vw_DM_Controller_XF->save()
      #9 /home/path/to/vault/core/controller/dm/revision/vw.php(1584): vw_DM_Revision_Controller->rollback_multiple(Array, Array)
      #10 /home/path/to/vault/core/controller/dm/revision/xf.php(28): vw_DM_Revision_Controller->rollback(Array, Array)
      #11 /home/path/to/vault/core/controller/dm/vw.php(94): vw_DM_Revision_Controller_XF->rollback(Array, Array)
      #12 /home/path/to/vault/core/controller/ui/history/base/vw.php(145): vw_DM_Controller->__call('rollback', Array)
      #13 /home/path/to/vault/core/controller/ui/history/base/vw.php(145): vw_DM_Controller_XF->rollback(Array, Array)
      #14 /home/path/to/vault/core/controller/ui/history/base/vw.php(57): vw_UI_History_Base_Controller->rollback()
      #15 /home/path/to/vault/core/controller/ui/page/vw.php(417): vw_UI_History_Base_Controller->execute()
      #16 /home/path/to/vault/core/controller/ui/page/vw.php(173): vw_UI_Page_Controller->history()
      #17 /home/path/to/vault/core/controller/ui/page/xf.php(58): vw_UI_Page_Controller->execute()
      #18 /home/path/to/vault/core/controller/ui/stack/vw.php(271): vw_UI_Page_Controller_XF->execute()
      #19 /home/path/to/library/vw/XenForo/ControllerPublic/Wiki.php(68): vw_UI_Stack_Controller->execute()
      #20 /home/path/to/library/XenForo/FrontController.php(351): vw_XenForo_ControllerPublic_Wiki->actionIndex()
      #21 /home/path/to/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
      #22 /home/path/to/index.php(13): XenForo_FrontController->run()
      #23 {main}
      Code:
      array(3) {
        ["url"] => string(79) "https://url-removed/wiki/?do=history&type=&action=rollback"
        ["_GET"] => array(3) {
          ["do"] => string(7) "history"
          ["type"] => string(0) ""
          ["action"] => string(8) "rollback"
        }
        ["_POST"] => array(7) {
          ["sbutton"] => string(8) "Continue"
          ["_xfToken"] => string(8) "********"
          ["do"] => string(7) "history"
          ["action"] => string(8) "rollback"
          ["type"] => string(0) ""
          ["oldid"] => string(2) "75"
          ["rollstarttime"] => string(10) "1487512368"
        }
      }
    Issue Details
    Issue Number 4920
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category History / Revisions
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.16
    Fixed Version 4.0.17
    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 19, 2017 9:37 AM
      pegasus pegasus is offline
      VaultWiki Team
      I think this occurs with any rollback in 4.0.16 that includes a change to the page's title between revisions.

      In vault/core/controller/dm/revision/vw.php, find:
      Code:
      'where' => vw_DB::get()->query()->eq('targetid', $new['routeid'])
      Replace with:
      Code:
      'where' => vw_DB::get()->query()->eq('targetid', $old['routeid'])
      Reply Reply
    2. February 19, 2017 10:01 AM
      ACL ACL is offline
      Regular Member
      Thanks, the undo/rollback worked with that code change applied

      FYI: This was for the Wiki index page (Main Page on MediaWiki)
      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:03 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.