Preview
This topic contains 10 replies, has 3 voices, and was last updated by Stiofan O’Connor 8 years, 7 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
August 8, 2016 at 6:34 pm #243246
Hello
Two of my custom post types are not generating a listing preview. When you press on the Preview link it take you to a 404 Page not found page. When comparing it to other CPT preview pages, it looks like the preview URL isn’t being generated correctly. Here are a couple of images of the faulty preview pages:
Any help with this would be greatly appreciated!
Thanks
MikeAugust 8, 2016 at 10:30 pm #243482Hi Mike, I had no problems adding a listing in either CPT and was getting a preview.
Have you fixed it?
Are you trying to add some special code in any of the fields maybe?August 8, 2016 at 11:28 pm #243524Hi Guust…glad to hear that the preview is working well in the frontend…I hadn’t had an opportunity to check that. I’m having a problem with it in the backend. Guess it would have been helpful to share that with you…sorry! I have not fixed it. Not adding any special code, just adding a typical listing in the backend. I thought it was weird that the preview URL wasn’t generated correctly. What could cause that?
A side point, there isn’t a Preview button in the Publish metabox. You can only preview a listing after hitting “Save Draft” and the preview link appears above the title area. Is that how it was meant to be? That’s different from what I’m accustomed to in WP…like in the Post section.
Thanks
MikeAugust 9, 2016 at 7:24 am #243624Preview in the backend is not possible with GD listings, because all the custom fields it uses you indeed need to save first before being able to view the listing.
GD listings are no ordinary posts 🙂August 9, 2016 at 10:58 pm #244200Your right Guust….GD listings are no ordinary posts! 😉
When I save a listing created in the backend I get a metabox allowing me to preview the listing ((see this example). That preview link works perfectly in all my CPTs except gd_nightlife and gd_store???
The one common denominator I noticed is when the preview works correctly I get a URL like: http://mysite.com/?post_type=gd_place&p=61000%2F&preview=true. Both of the examples I provided are missing the &preview=true statement. That can’t be right can it? Although I’ll admit I tried adding the &preview=true statement to the example URLs and they still didn’t resolve correctly….I’m confused.
It would be one thing if none of the CPTs offered a preview, I’d assume that was just the way it was…but when all but two work….frustrating :-/
Thanks for sticking with me on this! 🙂
MikeAugust 9, 2016 at 11:51 pm #244222I see now.
I’ll have to have the developers have a look at this, that is a bug I can replicate on my test site.It seems to be quite random: a new CPT I just created works fine, some others don’t, and I cannot find any differences in setup between them.
1. When adding a new listing in the backend from a CPT other than place or event, and save as draft, a link to preview the new listing is added on the top of the page.
2. The link created is like this
/?post_type=gd_newcpt&p=2222%2F&preview=true
3. When accessing that link, the browser starts looking for that URL, then drops the
&preview=true
before giving a 404.
August 10, 2016 at 11:42 am #244443We hide the normal preview button by default as the preview is not 100% compatible, this preview link should not be shown also.
Stiofan
August 10, 2016 at 5:55 pm #244716Hello Stiofan, thank you for your comment. So you’re saying that the only way to get a preview of a listing is by entering it through the frontend submission form?
August 10, 2016 at 5:57 pm #244720The proper url will work also for the admin and author just not the actual preview url.
Stiofan
August 10, 2016 at 9:57 pm #244824The proper URL will work after the post is published…correct? Prior to being published, that URL leads to a 404 page. Obviously I’m still not clear on this, how can an admin preview a post prior to it’s being published if the “preview link” is not going to be an option?
Thanks for your patience!
MikeAugust 11, 2016 at 8:55 am #245013If u see the actuall link including the cities etc then that link will work for the admin or post author, we have set this up, in the backend it might show the link but actually point to the preview link, but if u copy paste the link it will work.
Stiofan
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket