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.

It's a large Wordpress multisite installation, using subfolders for the individual blogs, not domains. We are running version 3.1, and preview posts doesn't work. When I press preview I get the 404.php page. Nothing in the log files that caught my eye, all plugins disabled. Sometimes I get an error message about insufficient rights when I press preview. I'm running out of ideas to try.

share|improve this question
    
What happens when you change your permalinks setting to just use the default (ie the first option on the permalinks page). –  anu May 7 '11 at 16:12
    
Same problem. I noticed that if I try to preview the changes for a published post, I get an error, "You do not have permission to preview drafts.". And for drafts I get the 404 page. –  windyjonas May 7 '11 at 19:30
    
First make sure you host allows this kind of setup. Have you tried re installing WordPress. It could be a corrupted file/files or something did not get uploaded right. Just rename the current folder that holds your blog or if it is in the root folder move it to a new folder setup a new database and try installing again making sure you do all the required steps including creating the .htaccess file, adding the mu code to wp-config.php and creating the blogs.dir folder inside wp-content . –  xLRDxREVENGEx May 7 '11 at 19:38
    
I will try and compare all the files with the files on the test server (where preview works!) and see if there are any differences. The .htaccess and wp-config.php files are the same on both servers. –  windyjonas May 7 '11 at 19:55
    
try privew in a different browser when you are logged in –  Bainternet May 7 '11 at 20:24

3 Answers 3

When posts are being previewed WordPress appends a query string to the end of the url.

The permalink settings are not applied until the post is published. While the post is in draft status the preview link will be yourdomain.com/?p=1119&preview=true where p=xxxx is the post id number.

Once the post is published and you make changes and want to preview, the preview link will be

yourdomain.com/%year%/%postname%/?preview=true&preview_id=1119&preview_nonce=6xcade32bz

Where %year%/%postname%/ is your permalink settings and preview_nonce is a security feature to prevent others from previewing your posts.

Can you give us the URL that the preview post link is going to. Then when clicked give us the url that is in the browser window. This will determine where the problem is.

You can also try to manually enter the preview link into the browser to see if that works.

share|improve this answer

Make sure that the 2 URLs in Settings>General both either start with www or that they both don't have the www in the url - ie they should be consistent.

share|improve this answer
    
They are the same, and the problem is the same across all browsers. As far as I know, none of the 100+ blog users on the site can preview their posts. –  windyjonas May 8 '11 at 7:36

Please go to the file template-loader.php in wp-include folder and comments the line number 7 which should be do_action('template_redirect'); so please make it like this

//do_action('template_redirect');

and it will sort out preview post issue in multisite setup.

share|improve this answer
1  
I will try it, but changing a core file is never a good idea, especially not when a new release of WordPress is just around the corner. –  windyjonas Nov 4 '11 at 14:25

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.