Preview Changes Gets 404 Error
-
Although the posts for my custom post type “Service” are coming up fine, I can’t seem to preview the service posts without getting a 404 error.
This is for the site http://watersag.com.
-
Hi ashenton, just to be certain, have you flushed your permalink rewrite rules yet? You can do so by simply visiting the permalinks settings page, don’t change anything, and then hit save.
Try that out, and if they’re still turning up 404 afterwards, let me know.
Yes, I am sorry I forgot to mention that I did see that on some of the other forums and I tried it. I am still getting the 404 errors. I have also tried deactivating plugins with no luck.
What’s the post type you’re trying to register? I’m not seeing any obvious ones from the site link above.
Here’s what I’m seeing when I visit that url: https://cloudup.com/cc4_FmxaioK
Perhaps you have an old cached version of the page? Or I’m not seeing a proper part for where the 404 is.
Hopefully we’re getting closer to solving this π
Yep, the pages are coming up fine. It’s when I try to preview them that I get a 404 error. This is not the end of the world, but it is annoying to my client.
Ahhhhhh it’s when hitting the preview button. My mistake for missing that detail.
That one is a new one for me, so I’m not sure why it’s happening.
Out of curiosity, does your site use Post Formats or not, and what is the Services post type set up for for Post Formats? I found the following on a separate support forum that may help:
“I took the ‘post-formats’ out of the args array. This fixed the problem. WordPress was looking for post formats and I didn’t have any of them created in my custom post types.
”Yes it does, but it did not need to be supported. I disabled post format support and now it’s working fine. You’re a genius! Thank you! I don’t think I’ve ever encountered such quick and effective support on the WP plugin forums.
An odd source of the issue all in all, but I’m glad I was able to help pinpoint it π
You’re welcome.
Hello Michael, hello Ashenton,
I’m trying to solve the same problem. A 404 on the preview, not the frontend page.
You offer a solution but since I’m new to WP I don’t know where/how to “disabled post format support”. Could one of you help me with that please?
Thanks,
MichaelaHave you flushed your permalinks?
The post format support disabling would be one of the checkboxes offered on your “Edit post type” screen at the bottom right of the screen. If anything, this worked for ashenton.
Yes I had flushed the permalinks like in this and other forum posts but it didn’t solve the problem. Now I found the right check box, unchecked it and the preview gets shown as it should. Thanks very much!!
MichaelaMichaela, can you use the debug info tab in the Import/Export area to send me your debug info? I’m starting to get curious as to why this is happening, but I have never managed to recreate myself. Sending your settings would help me potentially debug using a configuration that was causing it.
Send the details to michael @ webdevstudios . com
Hi Michael,
Have sent the debug info. Hope this helps.
Best,
MichaelaThanks.
The topic ‘Preview Changes Gets 404 Error’ is closed to new replies.