[dokuwiki] Re: Lost draft

  • From: "Bob McConnell" <rvm@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Thu, 7 Feb 2008 10:52:25 -0500

-----Original Message-----
From: dokuwiki-bounce@xxxxxxxxxxxxx
[mailto:dokuwiki-bounce@xxxxxxxxxxxxx] On Behalf Of Bryan Banz
Sent: Thursday, February 07, 2008 10:44 AM
To: dokuwiki@xxxxxxxxxxxxx
Subject: [dokuwiki] Re: Lost draft

On Feb 7, 2008 9:05 AM, Michael Klier <chi@xxxxxxxxxxx> wrote:
>
> Bryan Banz wrote:
> > Sorry to bug the list with this issue, but I've search the archives
> > and havn't landed a solution to my problem.
> >
> > I was creating a page on our DokuWiki (2007-06-26b) driven site when
> > we had a power blip and the machine I was using was rebooted.
> >
> > I had not yet saved the page, but I had previewed it and I had
> > received notice that a draft was auto-saved.
> >
> > My question is: how can I recover that draft? Since I hadn't saved
the
> > page, it wasn't actually created yet (no file in the data directory)
> > so I'm not sure how to go about telling Dokuwiki to pull up the lost
> > draft. Is it even possible?? Please help!
>
> If you edit that page again, by using the same ID eg:
>
>     http://yourwiki.baz/doku.php?id=pageid
>
> and hit the edit button, you ~should~ get the contents of your draft
along
> with a button recover draft.
>
> HTH
>     Chi
>
> --
> Michael Klier
>
> mail:   chi@xxxxxxxxxxx
> www:    http://www.chimeric.de
> icq:    206179334
> jabber: chi@xxxxxxxxxxxxxxxxxx
> key:    http://downloads.chimeric.de/chi.asc
> key-id: 0x8308F551
>
> --
> DokuWiki mailing list - more info at
> http://wiki.splitbrain.org/wiki:mailinglist
>

Thanks for the quick responses, but they don't quite solve my problem.
Perhaps I wasn't clear enough in my original post.

I don't know the original page ID, and since it wasn't actually saved
as a page in the wiki, the index doesn't list it. I therefore don't
know how to access the page...therein lies the problem. I actually was
aware that accessing the page would let me recover the draft.

I did some digging in the code to see how Dokuwiki handles draft
files. It looks as though it saves a file with a ".draft" extension in
the cache directory. I checked my cache directory and found two such
files (not a lot of activity on our wiki). These files appear to have
names generated from some sort of hash of the page name. Is that
correct?

I've located the file that I believe is the page I'm looking for by
examining the contents. Would it be easiest to recreate my page by
copying the contents into a newly created page?

If I can get the contents that way, then I have no more need of the
original file, but I'm curious if there is anyway to recover the old
page name from the existing draft files. If my previous observation
about the hashed file name is correct, then I'm in doubt of being able
to do so.

This experience has given me an idea for a plugin... perhaps it would
be nice to be able to view a list of all pages that currently have
drafts. Any thoughts on that?

-Bryan
-----Original Message-----

Isn't the URL listed in your browser history log?

Bob McConnell
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: