When trying to preview pages that use macros that in turn use the nodeFactory, i get an error stating that it is not possible to preview unpublished nodes that uses the nodeFactory.
Is there anyway around this problem ?
Do i have to rewrite my usercontrols to handle nodes in another way ?
i'm aware that the nodeFactory only works with published nodes, but it's a major problem for my client if they can't preview pages without publishing them.
Long story short, preview simply doesn't work in Umbraco. Because the preview runs through the standard Umbraco rendering engine, which in turn goes through nodeFactory.
If you want to access unpublished Umbraco content you need to go through the Document API (the cms assembly).
There isn't any intention in the core team to fix the preview in the 4.x branch, it's too complex a problem to try and solve. If someone else solves it we'd LOVE to have it submitted!
perhaps you could create a field 'preview page ' true / false and then use an after publish event to move it to content type that is not publically visable
mydomain/.com/preview
public class AfterPublishEvent : umbraco.BusinessLogic.ApplicationBase
{
public AfterPublishEvent()
{
Document.AfterPublish += new Document.PublishEventHandler(Document_AfterPublish);
Hmm this is a great example of when I wish i could edit posts :P. There's been quite a bit of work done recently to get preview working for 4.1. I'm not 100% sure what the status is, I think some early stuff made it into the beta 2 release.
Preview and nodeFactory
When trying to preview pages that use macros that in turn use the nodeFactory, i get an error stating that it is not possible to preview unpublished nodes that uses the nodeFactory.
Is there anyway around this problem ?
Do i have to rewrite my usercontrols to handle nodes in another way ?
i'm aware that the nodeFactory only works with published nodes, but it's a major problem for my client if they can't preview pages without publishing them.
Mikael
Long story short, preview simply doesn't work in Umbraco. Because the preview runs through the standard Umbraco rendering engine, which in turn goes through nodeFactory.
If you want to access unpublished Umbraco content you need to go through the Document API (the cms assembly).
There isn't any intention in the core team to fix the preview in the 4.x branch, it's too complex a problem to try and solve. If someone else solves it we'd LOVE to have it submitted!
Thanks.
That unfortunately means that i have to reprogram a bunch of usercontrols :-(
Well well welll, another experience richer i will go home and have a nice weekend.
I wish the same to everyone else.
Mikael
perhaps you could create a field 'preview page ' true / false and then use an after publish event to move it to content type that is not publically visable
mydomain/.com/preview
Hi
I too have a problem displaying previews of unpublished content using the nodeFactory (In this instance, the otherwise brilliant BlogforUmbraco4).
I don't intend to do a big rewrite to fix it, as from what I can see this is a core issue in Umbraco.
instead I want to just "hide" the preview button for blog content. How do I go about doing that?
Many thanks
Shaun
Hmm this is a great example of when I wish i could edit posts :P.
There's been quite a bit of work done recently to get preview working for 4.1. I'm not 100% sure what the status is, I think some early stuff made it into the beta 2 release.
is working on a reply...