cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: Entry author field is not pre-populated with current user when `Show the Title field` is disabled and the `Title Format` contains dynamic output in an entry type

Open kylecotter opened this issue 1 year ago • 0 comments

What happened?

Description

If an entry type is set to hide the title field, and the title format is set to something that's not a plain string, e.g. {section.name|raw}, when you create a new entry in a section using that entry type, the author field is not pre-populated and thus causes validation errors when trying to save.

Steps to reproduce

  1. Create a new entry type with show the title field toggled off
  2. Set the title format for this entry type to {section.name|raw} or something else that dynamically generates a value
  3. Save the entry type
  4. Create a new section
  5. Set the type to channel or structure
  6. Associate your entry type to the section
  7. Save section
  8. Create a new entry in this section
  9. You should see the author field not pre-populate with your user account

Expected behavior

The author field is pre-populated as it is when using the normal title field

Actual behavior

The author field is empty

SCR-20240216-wi9

Craft CMS version

5.0.0-beta.2

PHP version

8.2.15

Operating system and version

Linux 6.6.12-linuxkit

Database type and version

MySQL 8.0.30

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.1-13)

Installed plugins and versions

No response

kylecotter avatar Feb 17 '24 04:02 kylecotter