U4-5562 - "Unpublish at" not working

Created by Brian Powell 30 Sep 2014, 13:12:02 Updated by Wesley 10 Jul 2017, 09:38:06

Duplicates: U4-5204

In v7.1.6, the "unpublish at" functionality appears to be broken. Pages remain published even when their unpublish time has passed.

To duplicate the problem, create a new page. Set an "Unpublish at" time in the future and publish the page. When the time has passed, the page remains published.


Brian Powell 30 Sep 2014, 13:16:25

I'm seeing this error repeatedly in my trace log: {{ 2014-09-30 09:14:22,096 [84] ERROR Umbraco.Web.Scheduling.ScheduledPublishing - [Thread 13] An error occurred with the scheduled publishing System.Net.WebException: The operation has timed out at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request) at System.Net.WebClient.UploadString(Uri address, String method, String data) at System.Net.WebClient.UploadString(String address, String data) at Umbraco.Web.Scheduling.ScheduledPublishing.Start(ApplicationContext appContext) }}

Alex Skrypnyk 19 Apr 2016, 17:20:47

Looks like we have the same issue with 7.4.3 version.

Robin Hansen 14 Sep 2016, 06:41:31

I can confirm this is also an issue in ver. 7.5.3 - No matter when I unpublish a node (even in a year from now) I get the same message: "xxxxx could not be published because the item has expired."

I get this javascript error in the backoffice: TypeError: dateHelper.convertToServerStringTime is not a function at setModelValue (umbraco.controllers.js?cdv=1527104395:10551) at umbraco.controllers.js?cdv=1527104395:10534 at Object.$eval (angular.min.js?cdv=1527104395:92) at Object.$apply (angular.min.js?cdv=1527104395:92) at Object.safeApply (umbraco.services.js?cdv=1527104395:58) at HTMLDivElement.applyDate (umbraco.controllers.js?cdv=1527104395:10522) at HTMLDivElement.dispatch (jquery.min.js?cdv=1527104395:3) at HTMLDivElement.r.handle (jquery.min.js?cdv=1527104395:3) at Object.trigger (jquery.min.js?cdv=1527104395:4) at HTMLDivElement. (jquery.min.js?cdv=1527104395:4) angular.min.js?cdv=1527104395:63

Sebastiaan Janssen 14 Sep 2016, 06:46:17

If you can reproduce it in a clean Umbraco install then please give us exact steps to reproduce. As you can see this is a duplicate of U4-5204 which is marked as Cannot Reproduce so we need help.

You also need to tell us something about the environment you're running in, whether or not you're using load balancing etc.

john mullan 12 Dec 2016, 16:43:10

The dateHelper service in umbraco.services.js is most likely be overwritten by another service called 'dateHelper' in a plugin. This issue happened for me when Merchello was installed as it also has a dateHelper service. Somehow, it was being called instead of the one residing in the 'umbraco.services' module.

Arnold Visser 04 Jan 2017, 14:45:30

We are also experiencing this issue on various sites with different versions of Umbraco. Today at a 7.4.3 website. Not load balanced, very 'basic' Umbraco site actually.

@sebastiaan let me know what you would need from us to help with this.

Sebastiaan Janssen 04 Jan 2017, 16:58:29

I don't know, I'd start with an upgrade to 7.5.6, we've been fiddling with scheduled publishing a bit since 7.4.3

Wesley 10 Jul 2017, 09:38:06

I know it's not the best way. But i've created a work arround for this. This ia an easy and quick fix that you can add. It just looks at the current page expiredate and unpublish the page if needed. I hope this helps some people for now.

//Unpublish if expiredate is over. Fix for production envirement where normal unpublishing doesnt work
var current = new Document(Model.Content.Id);
if (Convert.ToDateTime(current.ExpireDate) < DateTime.Now)
    var contentServices = ApplicationContext.Current.Services.ContentService;
    var content = contentServices.GetById(Model.Content.Id);
    contentServices.UnPublish(content, 0);

Priority: Normal

Type: Bug

State: Duplicate


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.6, 7.4.3, 7.5.1, 7.5.2, 7.5.3, 7.5.10

Due in version:


Story Points: