• 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
    • Undo edit causes DB 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: Undo edit causes DB error.

    • Issue Tools
      • View Changes
    1. issueid=2128 December 6, 2010 12:46 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Undo edit causes DB error.

      Quote Originally Posted by pegasus
      It pains me to say this, but you would have to install your last backup on your test-forum, and then copy and paste the missing content.

      EDIT: For articles with multiple edits, you may be able to do this:
      1. Revert the most recent edit.
      2. Revert the reversion so you are again on the most recent edit.
      3. The un-converted text should be restored.


      I am working right now to correct this issue so the conversion should create a new edit for every page. This way if people lose content, they can just revert the conversion for that 1 article, and change the BB-Codes manually.
      Reverting to the latest edit causes this error:
      Code:
      Database error in vBulletin 3.8.6:
      
      Invalid SQL:
      
      			SELECT lastrevisionid AS revisionid
      			FROM vb4_vault_revision
      			WHERE revisionid = 3915;
      
      MySQL Error   : Unknown column 'lastrevisionid' in 'field list'
      Error Number  : 1054
      Request Date  : Monday, December 6th 2010 @ 06:44:07 PM
      Error Date    : Monday, December 6th 2010 @ 06:44:07 PM
      Script        : http://www.my-forum.com/forum/showwiki.php?title=Header:Forum_Header-25&do=history&action=rollback&oldid=3915
      Referrer      : http://www.my-forum.com/forum/showwiki.php?title=Header:Forum_Header-25&do=edit
      IP Address    : xxx
      Username      : Alfa1
      Classname     : vB_Database
      MySQL Version : 5.0.90-log
    Issue Details
    Issue Number 2128
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category History / Revisions
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 3.0.7
    Fixed Version 3.0.8
    Milestone VaultWiki 3.0.8
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. December 6, 2010 12:56 PM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks. In vault/tab/history.php, find:
      Code:
      		$last = $db->query_first("
      			SELECT lastrevisionid AS revisionid
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE revisionid = " . intval($revisionid) . "
      		");
      Replace with:
      Code:
      		$relative = $db->query_first("
      			SELECT dateline
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE revisionid = " . intval($revisionid) . "
      		");
      
      		$last = $db->query_first("
      			SELECT revisionid
      			FROM " . TABLE_PREFIX . "vault_revision
      			WHERE dateline < " . intval($relative['dateline']) . "
      				AND threadid = " . intval($threadinfo['threadid']) . "
      				AND pending = 0
      			ORDER BY dateline DESC
      			LIMIT 1
      		");
      Reply Reply  
    2. December 6, 2010 1:33 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Now, when undoing the latest edit, I get redirected to:
      /forum/redirect=no

      Which does not exist.
      Reply Reply  
    3. December 6, 2010 1:35 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Undoing the latest edit twice results in the same missing content.
      Reply Reply  
    4. December 6, 2010 1:58 PM
      pegasus pegasus is offline
      VaultWiki Team
      I can only imagine this happening if you converted BB-Codes before you imported the edits. In this case, the un-converted edit may be further back in the list (1 more back?). Please check the revisions or use the compare tool to confirm.
      Reply Reply  
    5. December 6, 2010 2:34 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      This likely happened.

      Can it be the the [div=float:left;width:50%;] code doesnt work in Vaultwiki 3.0.7? If so then it becomes very hard to find the correct version of the header. All my forum headers have this code.
      Reply Reply  
    6. December 6, 2010 2:43 PM
      pegasus pegasus is offline
      VaultWiki Team
      That code doesn't work in VaultWiki 3.0.7. That was NuWiki's format and it had unresolved security issues for the past few years. However, that's the unconverted code you want to revert to. Then you can update it to this format manually I suppose:
      Code:
      [div] style="styles" | content [/div]
      If all your headers have the same styles, it should be a little faster, since you only have to replace the
      Code:
      [div=float:left;width:50%;]
      part.
      Reply Reply  
    7. December 8, 2010 5:17 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Could you show me an example of how that works?

      For example if I want to replace this:
      [div=float:left;width:50%;]some text
      another line
      another line [div=float:left;width:50%;][/div]
      [div=float:left;width:50%;]some text
      another line
      another line [/div]
      Reply Reply  
    8. December 8, 2010 7:20 PM
      pegasus pegasus is offline
      VaultWiki Team
      Code:
      [div] style="float: left; width: 50%" | some text
      another line
      another line [div] style="float: left; width: 50%" | [/div]
      [div] style="float: left; width: 50%" | some text
      another line
      another line [/div][/div]
      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:25 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.