• 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 3.x Series
    • Bug
    • Can't undo revisions

    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: Can't undo revisions

    • Issue Tools
      • View Changes
    1. issueid=586 May 11, 2009 3:52 PM
      pnuker pnuker is offline
      Junior Member
      Can't undo revisions

      When I click an "undo" link inside the history tab I get this error:

      Invalid revision specified. If you followed a valid link, please notify the administrator
    Issue Details
    Issue Number 586
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category History / Revisions
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 2.3.0
    Fixed Version 2.3.0
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. May 11, 2009 4:04 PM
      pegasus pegasus is offline
      VaultWiki Team
      Please link to a particular article. I cannot reproduce.
      Reply Reply  
    2. May 11, 2009 5:10 PM
      pnuker pnuker is offline
      Junior Member
      Here you go:
      http://www.1perfectworld.com/wiki/In...s:Human+Quests

      I enable unregistered usergroup permissions temporarily so you can see it.
      Reply Reply  
    3. May 11, 2009 5:29 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/tabs/special_tab_history.php, find:
      Code:
      	$revision = $db->query_first("
      		SELECT revision.*, COUNT(revision.revisionid) - 1 AS revisioncount
      		FROM " . TABLE_PREFIX . "vault_revision AS revision
      		WHERE revision.revisionid >= " . intval($revisionid) . "
      			AND threadid = " . intval($threadinfo['threadid']) . "
      		GROUP BY threadid
      		ORDER BY revision.revisionid ASC
      	");
      Replace with:
      Code:
      	$revision = $db->query_first("
      		SELECT revision.*, COUNT(revision.revisionid) - 1 AS revisioncount
      		FROM " . TABLE_PREFIX . "vault_revision AS revision
      		WHERE revision.revisionid <= " . intval($revisionid) . "
      			AND threadid = " . intval($threadinfo['threadid']) . "
      		GROUP BY threadid
      		ORDER BY revision.revisionid DESC
      	");
      Find:
      Code:
      $rolldata->set('sticky', $threadinfo['sticky']);
      Add after:
      Code:
      $rolldata->set('dateline', TIMENOW);
      Reply Reply  
    4. May 11, 2009 6:03 PM
      pnuker pnuker is offline
      Junior Member
      I still get the same error message
      Reply Reply  
    5. May 11, 2009 6:12 PM
      pegasus pegasus is offline
      VaultWiki Team
      You cannot roll back some revisions due to data loss that occurred pre-2.3.0... where some revisions were accidentally erased. The current version of that article is actually the one with the 1969 time. So that's the one you want to be rolling back.
      Reply Reply  
    6. May 11, 2009 9:40 PM
      pnuker pnuker is offline
      Junior Member
      I tried to undo that one also, but I got this message:

      "The changes to this article are not sufficient to create a new revision."

      I don't even know how the article got revised. I'm the only one who has made any changes to it so far.
      Reply Reply  
    7. May 11, 2009 10:57 PM
      pegasus pegasus is offline
      VaultWiki Team
      I thought it was only possible for the revisions to get like this if you performed rollbacks or accepted pending edits in 2.2.1 - 2.2.3.

      To temporarily bypass that message, you can disable the check.
      In vault/special_dm_revision.php, find:
      Code:
      $this->error('vault_significant_revision_error');
      Comment it out:
      Code:
      // $this->error('vault_significant_revision_error');
      Reply Reply  
    8. May 12, 2009 10:29 AM
      pnuker pnuker is offline
      Junior Member
      Now I get a database error:

      Code:
      Database error in vBulletin 3.7.3:
      
      Invalid SQL:
      INSERT INTO vault_revision
      	(rollback, forumid, threadid, userid, pagetext, section, ipaddress, lastrevisionid, title, iconid, prefixid, attach)
      VALUES
      	(0, 116, 4700, 4384, 'pagetext', 0, '0', 0);
      
      MySQL Error   : Duplicate entry '4700-0' for key 2
      Error Number  : 1062
      Request Date  : Tuesday, May 12th 2009 @ 10:26:29 AM
      Error Date    : Tuesday, May 12th 2009 @ 10:26:29 AM
      Script        : hxxp://www.1perfectworld.com/wiki/International-Guides:Human Quests&do=history&action=dorollback
      Referrer      : hxxp://www.1perfectworld.com/wiki/International-Guides:Human+Quests&do=history&action=rollback&oldid=133
      IP Address    : 71.63.142.197
      Username      : pNuker
      Classname     : vB_Database
      MySQL Version : 5.0.67-community
      I also just noticed that I'm not able to edit anything. I get this error:
      Code:
      MySQL Error   : Unknown column 'vault_edits' in 'field list'
      Reply Reply  
    9. May 12, 2009 10:38 AM
      pegasus pegasus is offline
      VaultWiki Team
      Did you make all three file edits in this thread?

      It sounds like your forum is still entering 0 as the time.

      And what is the complete query for that other DB error. If you upgraded to 2.3.0 without the script being interrupted, you have the appropriate field.
      Reply Reply  
    10. May 12, 2009 11:08 AM
      pnuker pnuker is offline
      Junior Member
      I don't think I made the edit from 1969, not really sure how that got there. It deleted a bunch of the content for some reason.

      Here's the db error for when I try to edit:
      Code:
      Database error in vBulletin 3.7.3:
      
      Invalid SQL:
      
      						UPDATE user
      						SET vault_edits = vault_edits + 1
      						WHERE userid = 4384;
      
      MySQL Error   : Unknown column 'vault_edits' in 'field list'
      Error Number  : 1054
      Request Date  : Tuesday, May 12th 2009 @ 11:06:27 AM
      Error Date    : Tuesday, May 12th 2009 @ 11:06:27 AM
      Script        : hxxp://www.1perfectworld.com/wiki/International-Guides:Winged Elves Production Skills&do=edit
      Referrer      : hxxp://www.1perfectworld.com/wiki/International-Guides:Winged+Elves+Production+Skills&do=edit
      IP Address    : 71.63.142.197
      Username      : pNuker
      Classname     : vB_Database
      MySQL Version : 5.0.67-community
      Reply Reply  
    11. May 12, 2009 11:45 AM
      pegasus pegasus is offline
      VaultWiki Team
      For the edits, I meant the file edits I listed above. There are 3 in total. Perhaps you overlooked the 2nd one?

      As for the SQL you need to run this query:
      Code:
      ALTER TABLE user
      ADD COLUMN vault_edits INT(11) UNSIGNED NOT NULL DEFAULT '0'
      I don't know why, if you didn't get a database error during the upgrade, that this wasn't done.
      Reply Reply  
    12. May 12, 2009 12:11 PM
      pnuker pnuker is offline
      Junior Member
      Oh yes, sorry, I did make all 3 edits that you mentioned.
      Reply Reply  
    13. July 17, 2009 1:43 PM
      pegasus pegasus is offline
      VaultWiki Team
      Unfortunately as was mentioned, this issue is a consequence of data loss that occurred prior to 2.3.0. While there is no way to recover the original data, the underlying cause was fixed in 2.3.0.
      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: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 © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.