I am after some information about un-publishing pages in umbraco and how this works out the box. I have a site where I need un-publish pages on a regular basis and then maybe publish after some time. When I un-publish the page in the back office using the unpublish at property I can see that the node gets updated with a small green indicator to suggest that it has been unpublished. However, when I browse to the front end the node that I un-published is still visible.
Am I wrong to assume that this should work out the box or have you got to specify it in the razor markup when outputting child nodes for example?
Here is my markup
foreach (var player in firstTeamPlayers)
{
<!--Process the media image-->
var imageRef = Umbraco.TypedMedia(player.GetPropertyValue<int>("image"));
var imgUrl = imageRef != null ? imageRef.GetCropUrl(380, 380) : "/Content/images/placeholders/md-profile-placeholder.jpg";
<div class="col-md-3 col-sm-6 margin-btm-20">
<div class="person-section">
@if (player.HasValue("teamCaptain") || player.HasValue("teamCaptain"))
{
if (player.GetPropertyValue<bool>("teamCaptain"))
{
<span class="captain">Captain</span>
}
if (player.GetPropertyValue<bool>("viceCaptain"))
{
<span class="captain">Vice Captain</span>
}
}
<a href="@player.Url" title="@player.GetPropertyValue("fullName")"><img src="@imgUrl" class="img-responsive" alt="@player.Name" title="@player.Name"></a>
<div class="person-desc">
<h3><a href="@player.Url" title="@player.Name">@player.GetPropertyValue("fullName")</a><span>@player.GetPropertyValue("position")</span></h3>
@{var mainContent = library.RemoveFirstParagraphTag(player.GetPropertyValue<string>("mainContent")); }
@if (!string.IsNullOrEmpty(mainContent))
{
<p>@Umbraco.Truncate(library.StripHtml(mainContent), 50, true)</p>
}
else
{
<p>Profile information for @player.Name is coming soon.</p>
}
</div>
</div><!--person section end-->
</div><!--person col end-->
}
im using Umbraco version 7.4.3 assembly: 1.0.5948.18141
Small green plus is indicated that you can't editing content with your permissions, and your changes need be published with roles "Administrator" or "Editor". Check your roles, maybe you have role "Writer"?
Yes i am the administrator and the account i am using has full permission. The green icon only ever appears when i set the un-publish at value in properties.
You wouldn't happen to be setting an unpublishAt value that has already passed? We've had issues in the past where an editor would set an unpublishAt, send the change into our approval workflow, then the workflow not be completed until after the unpublishAt time had lapsed, leaving the node published...
If I set the un-publish at date in the future (i set it 1 minute ahead) and don’t use the now option then this works as expected. Maybe this is a bug in this version but for now this is an adequate work around.
When the page unpublished it becomes grey out in the content tree which is more like the expected behaviour. The little green icon I reported does not appear.
Good to hear you got it sorted - makes sense, that setting unpublishAt to now won't work, as the time is in the past as soon as it is set. Sounds like a bug, either the date picker should be constrained to a time x minutes in the future, or passed dateTimes should still unpublish.
unpublished pages still showing in umbraco
Hi,
I am after some information about un-publishing pages in umbraco and how this works out the box. I have a site where I need un-publish pages on a regular basis and then maybe publish after some time. When I un-publish the page in the back office using the unpublish at property I can see that the node gets updated with a small green indicator to suggest that it has been unpublished. However, when I browse to the front end the node that I un-published is still visible.
Am I wrong to assume that this should work out the box or have you got to specify it in the razor markup when outputting child nodes for example?
Here is my markup
im using Umbraco version 7.4.3 assembly: 1.0.5948.18141
Any advice would be good Thanks Paul
Hi Paul,
can you clear the cache of your browser and try it again?
/Michaël
Hi,
Thanks for the response.
Yes I set the browsers cache and also tried in incognito and it was still being displayed.
Thanks Paul
Hi Paul,
Small green plus is indicated that you can't editing content with your permissions, and your changes need be published with roles "Administrator" or "Editor". Check your roles, maybe you have role "Writer"?
Regards, Ivan
Hi Ivan,
Yes i am the administrator and the account i am using has full permission. The green icon only ever appears when i set the un-publish at value in properties.
It goes away when i remove teh un-publish value
Many thanks Paul
Hi Paul
You wouldn't happen to be setting an unpublishAt value that has already passed? We've had issues in the past where an editor would set an unpublishAt, send the change into our approval workflow, then the workflow not be completed until after the unpublishAt time had lapsed, leaving the node published...
Hi Nathan,
Thanks for your input.
Each time I have tried using the un-publish at I have always selected the now option and the field is populated with the current dateTime.
Maybe when I get into work I should try setting the un-publish at value to a dateTime that's a minute into the future and see if this approach works.
I will let you know
Thanks
Hi All,
If I set the un-publish at date in the future (i set it 1 minute ahead) and don’t use the now option then this works as expected. Maybe this is a bug in this version but for now this is an adequate work around.
When the page unpublished it becomes grey out in the content tree which is more like the expected behaviour. The little green icon I reported does not appear.
Thanks to everyone who responded ;)
Many thanks Paul
Hi Paul
Good to hear you got it sorted - makes sense, that setting unpublishAt to now won't work, as the time is in the past as soon as it is set. Sounds like a bug, either the date picker should be constrained to a time x minutes in the future, or passed dateTimes should still unpublish.
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.