[Home]WikiBugs/BadPageVersion

UseModWiki | WikiBugs | RecentChanges | Preferences

Original Report

Apparently at random a small personal site developed a quirk, perhaps due to a quota issue (that was since resolved by deleting my Mozilla cache). The HomePage displays this at the top:

 Bad page version (or corrupt page).
 Content-type: text/html

and then goes on as usual. Trying to debug it, I found that the version number of the page went from 26 to 1 so assume "bad page version" makes sense. Unfortunately I can't make heads or tails of the storage format so I don't know how to recover. Any help? I'm sure that some consider this more a feature than a bug, but it is somewhat annoying. :)

(using UseModWiki 0.92)

FahdKhan?


Discussion

With 0.92 I just experienced the same problem. Searching the error message brought me here. The only solution I know is to move the existing pages to a fresh wiki and forget about the lost history. This is sad.

TakOta?

Try just opening the page for editing, then Save it right away. I've run into this warning once in a while while starting up new wikis, but I forget exactly why it goes away.

JerryMuelver

Thanks for the suggestion. However I found the real cause of the problem which prevents the suggested way to work. It was caused by "disk full". There was literally 0 bytes left on the wiki drive!

TakOta?

That's pretty similar to my problem: I maxed my quota. Well I suppose let's just let this be a warning to others... don't get sloppy about your administration.

FahdKhan?


Tentative Workaround?

Okay here's a workaround that's somewhat nicer than moving to an entirely new wiki if just a few pages are br0ke:

  1. Copy the text of the offending page into a local copy (cut and paste the text in the edit box).
  2. cd into $DataDir/page/ and remove the .db file for the offending page.
  3. When you go back to that page, it will appear fresh. Edit and paste the text back.

Get that error when I do a search, could not figure out what pages were corrupted and did not want to play cut&paste so just comment out the line that check for the version in the script:

  #if ($Page{'version'} != 3) {
  #  &UpdatePageVersion();
  #}
--Johan Burati


New Angle

I have only seen this error when I do a search. It occurs twice (i.e. I see the message twice), but I have no idea how to find out which pages it occurs on. If I try altering the Perl to debug which page the error occurs on, I get it wrong, because I don't know any Perl.

Any suggestions?

--JoeChacko

To find the pages with errors, try using the "maintain" action (like http://your.wiki.com/yourwiki.pl?action=maintain) which opens each file then prints the name after it has finished processing the file. (The page name *after* the error will be the bad one.) If that doesn't work, let me know and I'll figure out something else. --CliffordAdams

Followup:

Well, maybe I've read the tentative workaround too quickly... I had a corrupted page and just restored the .db and also the .kp files from my backup. The page works again, no prob. Even the whole history is there again.
BUT: now I can't run maintenance anymore! The output I'm getting is:
Could not get maintain-lock at /home/apache/smpa.org/internal/cgi-bin/wiki.cgi line 3734.
The file "maintain" in my wiki folder does contain just the line of the last run before the restore:
Maintenance done at October 6, 2004 8:42
And it get's worse: I can't edit any page anymore: trying to preview an edited page gives me:
Could not get editing lock at /home/apache/smpa.org/internal/cgi-bin/wiki.cgi line 3443.
Maybe I should note that running maintenance for the first time after restore gave me a different error message, since I just did not properly set the permissions for the .db and .kp files. But then I've set the perms as required.
What the heck is wrong? --DavidAndel

Ok, cool, found the solution myself now. A forced unlock (http://your.wiki.com/yourwiki.pl?action=unlock) did the trick. :-) --DavidAndel


Explanation of this error

The wiki stores pages as a set of key => value pairs. When it "opens" a page, the script checks a version-number key, and gives the error if it is not a known-good value (currently "3"). (Previous releases would automatically translate a db-version of "2" to the current format.) If the page is corrupted or truncated, the version number is usually also corrupted (or deleted), so you will see the "bad page version" error. --CliffordAdams


Possible Cause of this Error

I've seen this error as a result of page corruption, due to the problem described in /editlinks mangles pages in special cases.

If you think that this is the probable cause in your case, then you can find the problem page by searching for the name of the page you have just renamed, and then viewing each page that references this page in turn. The problem page will show this error when viewed.

--KevinTaylor


A Problem But Disk Under Quota

The "Bad Page Version (or Corrupt File) problem just began happening to all of the wikis on my server. It happens when trying to edit, and the resulting page is a single line, with "Content-Type: text/html; charset=ISO-8859-1" up at the top. I am 200MB below my quota for the server. Wonder if anyone has any thoughts. Thanks.

Update: This got fixed...somehow. Was able to run Maintenance this morning (could not last night for some reason) and the only sorrupt pages were ones I weas testing last night. I deleted the db and re-built those pages (two of them). All other pages (which I did not mess with last night) are fine. Very strange. --Brad

[Brad Rourke]


This problem is reproduced for me every time

The "Bad Page Version (or Corrupt File) problem occurs only when I submit non English symbols on page( russian ) while i work with english - all ok, but when i do russian - page 100% will be broken.

Alexander Popov ---

Maybe is it about WikiBugs/Perl5.8BreaksUseModDataFiles? --JuanmaMP


This problem only occurs for some people

When I edit the wiki, no problem. When a co-worker does it, the page version becomes corrupt.

Update: when I insert a euro symbol as utf8 byte, this happens. Using the euro symbol as € it's OK. (I don't want to try inserting the euro utf8 symbol here... :-)

Paul Slootman


UseModWiki | WikiBugs | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited September 4, 2008 12:54 pm by gw-office.telegraaf.net (diff)
Search: