Current node is null. This might be due to previewing an unpublished node.
I have a blog installation where the following exception is thrown when trying to preview new posts before they are published:
System.ArgumentException: Current node is null. This might be due to previewing an unpublished node. As the NodeFactory works with published data, macros using the node factory won't work in preview mode. Parameter name: Current node is 1384
In all honesty I have not had a chance to investigate it in any depth. I have a client who gets it on a regular basis and my only guess is that the preview won't work because it uses the umbraco.config xml which only contains published nodes. As the node has not yet been published the exception is thrown. I can't say for sure but do recall reading somewhere that the related preview issue is being addressed in a future release, I don't think it is specific to this package.
I've noticed this issue too when upgrading from 4.5.2 to 4.7, My issue was that I had published all the content again using the new xml format, and then set the configuration back to use the legacy format. This completely mucked everything up and resulted in errors like this. Easy fix is just to 'Publish' all your content again. Note 'Publish', not 'Re-Publish entire site'.
@Ben. this is an old thread now, but to let you know 4.7.0 and 4.7.1 both had issues with 'preview'. these are resolved in 4.7.1.1 which is due out this week according to umbraco HQ :)
Current node is null. This might be due to previewing an unpublished node.
I have a blog installation where the following exception is thrown when trying to preview new posts before they are published:
System.ArgumentException: Current node is null. This might be due to previewing an unpublished node. As the NodeFactory works with published data, macros using the node factory won't work in preview mode. Parameter name: Current node is 1384
Are there any known workarounds for this?
Did you find a solution to this? I have just attempted an upgrade from 4.0.2.1 to 4.5.2 and I am receiving this error.
In all honesty I have not had a chance to investigate it in any depth. I have a client who gets it on a regular basis and my only guess is that the preview won't work because it uses the umbraco.config xml which only contains published nodes. As the node has not yet been published the exception is thrown. I can't say for sure but do recall reading somewhere that the related preview issue is being addressed in a future release, I don't think it is specific to this package.
Ah right, I misread, I have this issue permanently after upgrading to a new version.
so to summarise this issue, preview only works with published content?
That seems to defeat the purpose..
I've noticed this issue too when upgrading from 4.5.2 to 4.7, My issue was that I had published all the content again using the new xml format, and then set the configuration back to use the legacy format. This completely mucked everything up and resulted in errors like this. Easy fix is just to 'Publish' all your content again. Note 'Publish', not 'Re-Publish entire site'.
@Ben. this is an old thread now, but to let you know 4.7.0 and 4.7.1 both had issues with 'preview'. these are resolved in 4.7.1.1 which is due out this week according to umbraco HQ :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.