Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
I experience the same issue on with 3.4.2 –  Adripants Oct 8 '12 at 6:14
add comment

1 Answer

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.

share|improve this answer
    
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? –  robertwbradford Oct 3 '11 at 13:50
    
Sometimes, it will force a revision in the preview. You definitely need to update the post before previewing. –  Brian Fegter Oct 3 '11 at 14:01
    
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. –  robertwbradford Oct 3 '11 at 14:07
    
I've updated the question with my specific workflow. –  robertwbradford Oct 3 '11 at 15:07
    
Did you try removing preview_id=1834? –  Brian Fegter Oct 4 '11 at 1:59
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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