I configured the 'Unpublished on' field as 'Datetime Timestamp' under 'Manage Form Display'. Whenever I created a new node or updated an existing one, the 'Unpublish on' date would be defaulted to the current date and time, which was not expected. (The instruction under the date/time field says "Leave the date blank for no scheduled unpublishing.")

To avoid the 'Unpublish on' date/time being defaulted to the current value, I had to configure it as 'Datetime timestamp with no default'.

Comments

wtchan’s picture

wtchan created an issue.

Clarification: when updating a node, only if the 'Unpublish on' field was blank, it would be updated with current date and time.

jonathan1055’s picture

Title: Becareful with Datetime Timestamp configuration » Be careful with Datetime Timestamp configuration
Category: Bug report » Support request

Hi Wingo,

Yes, 'Datetime Timestamp with no default' is an extra choice provided by Scheduler specifically to get round the unwanted default. When you first install Scheduler the date widgets are set to this correctly. Only if you uninstall then re-install Scheduler might you have got this problem in the past - the is more discussion on #2652036: Field widget set incorrectly after Scheduler module re-install.

Core issue #2754477: Unexpected config entity delete due to dependency calculations was fixed on 28 June in core 8.1.x and 8.2.x, so it should only be a problem now if an admin changes the date widget from the initial type which Scheduler sets.

Jonathan

jonathan1055’s picture

Title: Be careful with Datetime Timestamp configuration » Better label for TimestampDatetimeNoDefault widget
Category: Support request » Feature request
Status: Active » Needs review
StatusFileSize
new71.05 KB
new71.73 KB
new760 bytes

The datetime widget that we provide for Scheduler is badly labelled. The 'no default' name is done for internal, programming reasons, because the widget does not default to the current date. But this is mis-leading for admins. and also contradictory, given that we can set a default time in the Scheduler settings.

Existing:
new label

There is no need to change the widget name, but it would be an improvement to give a label which indicates what the widget is for, and which module it is used in. Then if someone decides to alter the form display settings they have clearer information on which to make their choices, and this confusion might be eliminated.

New:
new label

  • jonathan1055 committed 69d4471 on 8.x-1.x
    Issue #2807081 by jonathan1055: Better label for...
jonathan1055’s picture

Status: Needs review » Fixed

Thanks wtchan for bringing this to my attention.
Committed and fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.