3

When go in and make some changes to an article and click the "Preview Changes" button (without having first saved anything), another window/tab opens, but the article shown is the last saved version. That is, it's not showing any new changes I made.

Anyone else run into this, or am I not understanding the functionality correctly?


UPDATE: Some specifics. Please note the URLs throughout.

It is a Subdomain Network install using the Domain Mapping plugin and a "pretty" permalink structure.

  • Network primary domain: example.com
  • Secondary site: site1.example.com
  • Mapped primary domain for site1.example.com: www.another-example.com
  • Domain mapping settings have both "Remote Login" and "Redirect administration pages to site's original domain" checked. (See this forum post for explanation.)

Logged in as an Editor user, I go edit a page with a slug of "tester" (http://site1.example.com/wp-admin/post.php?post=1834&action=edit)

I make some changes to the content without clicking "Update." Instead, I click "Preview Changes."

A new window opens with the following URL redirects:

  • site1.example.com/wp-admin/post.php
  • site1.example.com/tester/?preview=true&preview_id=1834&preview_nonce=c5e51962c0
  • www.another-example.com/tester/?preview=true&preview_id=1834&preview_nonce=c5e51962c0

This ends in a message saying, "You do not have permission to preview drafts." This is annoying as the remote login redirects have not taken place.

As a work around I discovered that if I first preview at least one "draft" status post, all the remote login redirects take place. If I then go back to edit the "tester" page (http://site1.example.com/wp-admin/post.php?post=1834&action=edit) and click "Preview Changes," I again end up at http://www.another-example.com/tester/?preview=true&preview_id=1834&preview_nonce=c5e51962c0. However, it doesn't display any of the pending changes. Instead it shows the last saved version of the page.

Any ideas? Thank you.

1
  • I experience the same issue on with 3.4.2
    – Adripants
    Commented Oct 8, 2012 at 6:14

1 Answer 1

1

It's because you're looking at a specific revision. Make sure your query string is formatted like this in your preview tab: ?p=PAGEID&preview=true without any other variables like revision=332.

6
  • 1
    Thanks for the reply. I tried this with the same results. From my understanding, the "Preview Changes" button allows you to see changes you have made to the article without needing to click "Update" first. Is this correct? Also, I am using the domain mapping plugin on a subdomain network. Would this have any effect? Commented Oct 3, 2011 at 13:50
  • Sometimes, it will force a revision in the preview. You definitely need to update the post before previewing. Commented Oct 3, 2011 at 14:01
  • 1
    Hmm, this doesn't make sense to me :) "Preview changes" seems to say to me that you can "preview" the changes before you actually update the article. Commented Oct 3, 2011 at 14:07
  • I've updated the question with my specific workflow. Commented Oct 3, 2011 at 15:07
  • Did you try removing preview_id=1834? Commented Oct 4, 2011 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.