Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kim Andersen 1447 posts 2197 karma points MVP
    Sep 23, 2009 @ 09:39
    Kim Andersen
    0

    Preview function only shows published items

    I have been wondering about the preview-function and its purpose for a couple of days now. I my head a preview-button is available, so that a logged in user can see the page before the changes are publish. Just to be sure that everything is correctly placed and so on.

     

    But this is not what is going on in Umbraco. Here I can only preview my page with the content that have already been published. But if that's correct, then I can't see the purpose of the button? Because if the content is already published, and avalable for everyone too see on the website, I could just go and look at it there.

     

    Am I the one thinking in a wrong way, is it a bug or is everything just right? I'm just very currious about this.

     

  • Rich Green 2246 posts 4008 karma points
    Sep 23, 2009 @ 09:53
    Rich Green
    0

    You are correct in thinking that the preview button allows you to preview changes before they are published.

    So there's either something wrong with your set up or you are doing something wrong.

    Are you pressing  the 'Save' button before you preview? Otherwise you won't see your changes.

  • Mikael Mørup 297 posts 326 karma points
    Sep 23, 2009 @ 09:58
    Mikael Mørup
    0

    Do you have any user controls on the page you try to preview ?

    I had a probllem with previewing pages that had a user control on it that "referenced the page itsefl".

    Mikael

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Sep 23, 2009 @ 09:59
    Simon Dingley
    3

    Is it only parts of the page that are not appearing until published? I have issues in the preview window with XSLT based macros not displaying until the page has been published but the remainder of the content displays just fine, in most cases it just means that the primary/secondary navigational elements are not visible.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 23, 2009 @ 12:16
    Richard Soeteman
    2

    Agree with Simon, normal page fields should be displayed fine. Macro content is based on the umbraco.config (content xml) file. So to display the macro content the document must be published. When it's published it's possible to preview the changes without publishing first, because the document exists in the Umbraco.config file.

    Cheers,

    Richard

  • Mikael Mørup 297 posts 326 karma points
    Sep 23, 2009 @ 13:31
    Mikael Mørup
    0

    And if you have user controls referencing properties on the page itself, they must use the Document API, not the nodeFactory, which was the error i made.

    Mikael

  • Kim Andersen 1447 posts 2197 karma points MVP
    Sep 23, 2009 @ 13:36
    Kim Andersen
    0

    Yes I do save my content before I preview my page. But Simon and Richard are right. If I just use a pagefield to render my content, the preview-function works fine.

    But I dont do that. I use XSLT to render all of my content, 'cause if a field is empty, I don't want to write out an empty div-element (Not a problem i the modern browsers, but IE fucks it up).

     

    Isn't there some way to get around this?

     

    @Richard:

    I don't understand this part: "When it's published it's possible to preview the changes without publishing first".

     

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Sep 23, 2009 @ 13:43
    Simon Dingley
    0

    As Richard mentioned, without the page being published it will not exist in the (confusingly named) umbraco.config xml file, I am not sure of any way around this without an initial publish.

  • Arjan den Boer 76 posts 31 karma points
    Sep 23, 2009 @ 13:52
    Arjan den Boer
    1

    I do not have a solution for the partial preview problem, but I wish there was!

    For me and my clients the preview function as it is now is not very usefull, because a lot of pages use macros and these cannot be previewed (unless published before). I hope a future version of Umbraco will have a solution for this.

    I'm thinking of a second version of the umbraco.config xml-file that contains both published and unpublished nodes, to be used for the preview only. It could be disk based only (no in-memory cache) to save resources.
    Richard, do you think something like this is currently achievable using the Umbraco API?

    In the meantime, I sometimes use umbracoNavihide as an alternative. I mean first set umbracoNavihide to true, then publish the page and use the Link to document URL as preview link. Of course this is not safe if you have confidential content, but in some cases it is acceptable.

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Sep 23, 2009 @ 14:07
    Simon Dingley
    0

    I agree that your solution would be a workaround until something more solid is implemented in the core to address this but the problem is that you then have to advise clients/users how to use the preview 'hack' rather than using the very obvious preview button.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 23, 2009 @ 14:16
    Richard Soeteman
    0

    @ Kim, sorry that should be When it's published it's possible to preview the changes without republishing first

    @Arjan/@all , if you want a real preview environment it's better to buy Courier. In that way you have a full staging environment. I did a lot of Tridion implementations in the past and they had the same issue. Preview is just to view content and the staging environment is to see how the complete site looks after the publish. I 'don't think you can simulate a staging environment by using the API. Maybe if you build a complete custom solution/hack.

    Cheers,

    Richard

  • Arjan den Boer 76 posts 31 karma points
    Sep 23, 2009 @ 15:23
    Arjan den Boer
    0

    @Richard: my problem is not that content from other unpublished pages is not shown in the preview, but that content from the current page in a macro (or inline xslt) is also not rendered when using the preview. For example when you have a macro to display images or related links, these are visible in the preview.

  • Kim Andersen 1447 posts 2197 karma points MVP
    Sep 23, 2009 @ 15:23
    Kim Andersen
    0

    @Richard

    Ahh then I get it :)

    But I gues that is also, only when the content is rendered through a pagefield right? Because even though a page have been published, the function still only worsk if the content is rendered by a pagefield.

     

    Well, I just hope that this could be changed in the future some time. And if anyone finds a nice workaround, I hope that they'll share it off course.

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Sep 23, 2009 @ 17:17
    Richard Soeteman
    0

    Hi Arjan,

    Yes that is the behaviour because it's not in the xml file.

    @Kim Yes now you get it :)

    Would indeed be nice if there is a method to make the preview work in all cases..

    Cheers,

    Richard

  • PIPPO 1 post 21 karma points
    Jul 12, 2012 @ 11:57
    PIPPO
    0

    Sorry for stupid question...

    To use super preview all I need to do is to copy/past your dll and .config file in the config section of umbraco...is that right???? How can I use SuperPreviewJump aspx form and the icon?? ????? Sorry but I've began yesterday with umbraco and I need to learn quick. Actually I'm using 4.7.2 version. 

     

    Thanks

     

    Pippo Pluto Paperino

Please Sign in or register to post replies

Write your reply to:

Draft