Skip to content

Content created manually show incorrect date and author on revision record for initial creation #7181

Description

@yorkshire-pudding

Description of the bug

If content is created in a content type where revisions are disabled, then if revisions are later enabled, the first revision (i.e. node created) is shown as being 0 (i.e. 01/01/1970 00:00 - timezone adjusted) with an author of Anonymous).

If content is created in a content type where revisions are already enabled then this also applied.

If content is generated (e.g. Devel Node Generate or Feeds), then the correct date and author are shown.

Steps To Reproduce

To reproduce the behavior:
Content type initially revisions disabled

  1. Set a content type so revisions are NOT enabled
  2. Create a node of that content type
  3. Enable revisions on the content type
  4. Edit the node and save a revision
  5. View the revisions overview table (node/%/revisions)

Content type with revisions enabled

  1. Create a node of that content type
  2. Edit the node and save a revision
  3. View the revisions overview table (node/%/revisions)

Actual behavior

First revision has message:

01/01/1970 - 1:00am by Anonymous (not verified)

NOTE (BST so UTC+01:00)

Image

Expected behavior

First revision has node author and node created date

Image

Additional information

Add any other information that could help, such as:

  • Backdrop CMS version: 1.35.x-dev (though this has probably been around since the beginning)
  • Web server and its version: n/a
  • PHP version: n/a
  • Database sever (MySQL or MariaDB?) and its version: n/a
  • Operating System and its version: n/a
  • Browser(s) and their versions: n/a

PR: backdrop/backdrop#5312

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions