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
  • Author
    Posts
  • #243246

    Michael Sena
    Buyer
    Post count: 72

    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:

    Example 1

    Example 2

    Any help with this would be greatly appreciated!

    Thanks
    Mike

    #243482

    Guust
    Moderator
    Post count: 29970

    Hi 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?

    #243524

    Michael Sena
    Buyer
    Post count: 72

    Hi 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
    Mike

    #243624

    Guust
    Moderator
    Post count: 29970

    Preview 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 🙂

    #244200

    Michael Sena
    Buyer
    Post count: 72

    Your 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! 🙂
    Mike

    #244222

    Guust
    Moderator
    Post count: 29970

    I 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.

    #244443

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    We hide the normal preview button by default as the preview is not 100% compatible, this preview link should not be shown also.

    Stiofan

    #244716

    Michael Sena
    Buyer
    Post count: 72

    Hello 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?

    #244720

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    The proper url will work also for the admin and author just not the actual preview url.

    Stiofan

    #244824

    Michael Sena
    Buyer
    Post count: 72

    The 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!
    Mike

    #245013

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If 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

Viewing 11 posts - 1 through 11 (of 11 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount