• SRhyse

    (@srhyse)


    Apologies if this has been addressed elsewhere, but I could not find anything upon searching.

    I type mainly in Markdown, pasting it into the text area of a post in WordPress, and it all works swell. I recently edited a bunch of slugs via the ‘quick edit’ button on the posts page, however, and it blew away the Markdown on all posts edited, leaving me only with the messy HTML in the text portion. These are all meant to be drafts from a book I’m working on, or most of them, so they are quite long, the most recent versions were on the site, and it completely destroyed any chance of functional citations and re-editing it elsewhere.

    I figured I could just revert to the most recent version before it, and that does show up when I open the revisions of a post. When I first click the post revisions, the one on the left is indeed the old Markdown post in all it’s glory, the one displayed on the right being the messy HTML version, but WordPress will not allow me to revert to the post on the left for some reason. It displays the Markdown post immediately on the left, and it’s what I want, but for some reason I’m only allowed to restore one revision *prior* to the version that is most recent by hitting the previous button. I don’t really understand why or see the point of that. I can’t simply select it and copy it out either, as it selects the text of both columns as I go for no good reason.

    These are all quite long, and between them all amount to 20-50k words, so it isn’t feasible to just edit it all out or back either. Any ideas? Why can I not revert back to the post shown to me immediately upon hitting the post revisions button from within a post’s editing page? The button to revert back is grayed out until I go to revisions that are further back.

    Additionally as a complain I suppose, I don’t think it’s a good idea to blow away the Markdown of a post when editing it from the quick edit area. All I did was edit the slugs, I didn’t think it would destroy all my writing.

    Thanks for any help with this!

Viewing 5 replies - 1 through 5 (of 5 total)
  • bernbe01

    (@bernbe01)

    if the content is indeed there, and you’re comfy with mysql, you could manually restore it that way

    other than that you aren’t alone:

    from automattic jetpack version

    from the plugin’s author

    which version of markdown and wp are you on?

    Thread Starter SRhyse

    (@srhyse)

    I’m on WordPress 4.1.1 and Jetpack 3.3.2 as I recall. I’m not comfy with MySQL but if you could point me in the right direction I might be able to figure it out, the main impediment being that I’m using free hosting at the moment while I set things up and my access is limited. At worst should be able to just ask the provider of I knew what to tell them and they could help.

    Any ideas why it won’t let me restore the most recent revision? Seems like that’d be the one revision you’d most want to restore.

    Thanks for the reply as well!

    bernbe01

    (@bernbe01)

    this query will get you all the revisions for a post, then copy the post’s correct content (i’m not honestly sure which this will be in – i have never tried markdown but i did research on it just now and i’m intrigued!)

    after you have the content copied, go edit the post via the backend and paste that in in text mode

    here’s the mysql query, change the post_title to the post/page in question

    SELECT * FROMwp_postsWHERE post_type = "revision" AND post_title = "About"

    bernbe01

    (@bernbe01)

    sorry, that posted funny cuz i had backticks in my sql

    SELECT * FROM wp_posts WHERE post_type = "revision" AND post_title = "About"

    Thread Starter SRhyse

    (@srhyse)

    Managed to get things back up, though I did have to manually copy out some of them with friends because for some reason they just wouldn’t take. But thanks for your help bernbe01. Hopefully the buggy Markdown implementation will be dealt with. For now, anyone using Markdown is advised to edit elsewhere when possible and always keep backups of posts in that format.

    Since the Markdown bug still exists, and I have no idea what went on with post revisions, I’m not sure whether to mark this topic as resolved or not.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can't restore most recent revision of post, Markdown blown away’ is closed to new replies.