Could you answer some questions to see what is going wrong :
What version of Umbraco are you using ?
Are you creating the node in the backoffice or through code. If through code can you post the code. If through the backoffice can you describe the steps you are taking
Can you show the code you use to render the content
Yes, we have a API call to autopublish child nodes. When there is dirty data(i.e., change in SortOrder, description etc), the child nodes get AutoPublished, even the saved ones.
The reason why we are using dirty data check is, if the order is changed for the child nodes (re-arranged), the re-arranged order should show in view.
I have commented the dirtydata check and checked it, now the saved one didn't get published, it's in unpublished status, but the issue still persists, it is showing in my front end.
Child node is not meeting IPublishedContent criteria
When a child node is created under a Content Node, it is showing up in the view even though it is in UnPublished status.
When publishing the child node and then unpublishing it, then it is not showing up in the view.
It's like, when a child node is created it's not getting checked for IPublishedContent.
Could you please help me with this issue.
Thanks.
Hi,
Could you answer some questions to see what is going wrong :
Dave
Hi,
I am using Umbraco 7.10.3
I am creating a child node in backoffice
Steps:
click on create and select a value from it, like, generics
Fill everything and save it
In info, it is showing status as UnPublished.
I am using the below code in my view
I have also tried with below code
Both are returning the saved content to my view
Hi,
Did you click the Save and Publish button or just Save ?
Can you try to reproduce it in a clean umbraco install with the starter kit installed ?
Dave
Hi,
I have just saved it.
I don't think I can, it is something my firm is using.
When we manually unpublish a child node, that's not showing up, but the saved ones are.
So you say you can unpublish it, so that means it is published. Otherwise you would not have the option to unpublish it.
Dave
No, I am talking in general. The published ones when unpublished are fine, but the saved ones are with the unpublished status and still showing up
Hi,
I just tried to reproduce it on a clean install of 7.10.3 with the starter kit installed and can't reproduce this behavior.
Do you have maybe some custom code or packages in place that could "autopublish" these ?
Dave
Hi,
Yes, we have a API call to autopublish child nodes. When there is dirty data(i.e., change in SortOrder, description etc), the child nodes get AutoPublished, even the saved ones.
So that probably explains why you see them on the front end... they get published by this api call.
Dave
No. When there is no dirty data, API call is not made, it is just getting saved with status as unpublished.
When you create a new node and save it, I think the data is dirty and it will autopublish.
Maybe you can post the code of your API ?
Also what is the reasoning behind the autopublishing ?
Dave
The reason why we are using dirty data check is, if the order is changed for the child nodes (re-arranged), the re-arranged order should show in view.
I have commented the dirtydata check and checked it, now the saved one didn't get published, it's in unpublished status, but the issue still persists, it is showing in my front end.
Can you post the code of your API.
What you are describing is not out of the box behavior. So I think it's your api call that is causing this.
Does it work correclty when you disable your api ?
Dave
Yes, it is working fine.
When I create a child node it is in Unpublished status. Please find the attached image.
It is still showing up in my view.
But can you please post some code from your api that does that the autopublish.
That way I can try to reproduce it.
Dave
This seems only a part of the code.
Please post the full code. How is this handled ? Is it through a content service event etc...
Without more information I'm afraid I can't help you.
Dave
is working on a reply...