I have a few pages that haven't been published yet. When I do umbraco.library:GetXmlNodeById($nodeId), and the $nodeId contains the ID of an unpublished page, I still get the content of that node. Is that supposed to happen? If yes, how can I test that the node has been published?
What happened was that I had deleted the umbraco.config file at some point because of a problem I was having with the lucene indexing. When the umbraco.config was re-created, the unpublished nodes were also in there.
Unpublished pages showing through GetXmlNodeById
I have a few pages that haven't been published yet. When I do umbraco.library:GetXmlNodeById($nodeId), and the $nodeId contains the ID of an unpublished page, I still get the content of that node. Is that supposed to happen? If yes, how can I test that the node has been published?
That's not possible - I've just looked at the code and it's only accessing the published xml. So the node must be published some how?!?
I just remembered that I created these pages through the API, this is code I re-used from Nord's multi file uploader
When I remove XmlGenerate, everything is fine and dandy! ;)
Thanks for checking Niels!
Still - the XmlGenerate doesn't populate the global published index. There must be something else going on.
Ah, you are correct sir!
What happened was that I had deleted the umbraco.config file at some point because of a problem I was having with the lucene indexing. When the umbraco.config was re-created, the unpublished nodes were also in there.
Is this expected behaviour?
Nope, that's definitely a bug. I'll take a look :)
Found the bug and fixed it. Will be a part of 4.0.3. Thanks for your reports, Sebastiaan. Highly appreciated.
No problemo, glad to be of some help! :-)
is working on a reply...