What happened?
Description
Craft appears to be delaying auto-generating the slug field until the first Save operation for entry types that don’t use the native title field. This leads to poor AX for asset fields that use {slug} in the upload path.
In the absence of a slug, Craft ends up creating temporary asset folders and any assets uploaded before the first-save end up remaining in these temp-xxx… folders, even after a slug has been generated for the entry (automatically by Craft).
Steps to reproduce
- Create an entry type with an auto-generated title using a custom title field (example screenshot below)
- Create an asset field with
{slug} in the Default Upload Location setting.
- Add this asset field to the entry type from step 1.
- Create a new entry for the entry type from step 1
- Upload a file to the asset field from step 2
- Entry “Foo Bar” in the custom title field
- Do not manually fill in the slug field
- Save the entry



Expected behavior
Expected behavior is that the asset uploaded in step 4 will be saved inside a folder called foo-bar.
Actual behavior
Instead, the asset is found inside a folder called temp_eqzxinrledslkmppbcjqgtbddqemrexmtvem.
Craft CMS version
5.6.5.1
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
Craft appears to be delaying auto-generating the slug field until the first Save operation for entry types that don’t use the native title field. This leads to poor AX for asset fields that use
{slug}in the upload path.In the absence of a slug, Craft ends up creating temporary asset folders and any assets uploaded before the first-save end up remaining in these
temp-xxx…folders, even after a slug has been generated for the entry (automatically by Craft).Steps to reproduce
{slug}in the Default Upload Location setting.Expected behavior
Expected behavior is that the asset uploaded in step 4 will be saved inside a folder called
foo-bar.Actual behavior
Instead, the asset is found inside a folder called
temp_eqzxinrledslkmppbcjqgtbddqemrexmtvem.Craft CMS version
5.6.5.1
PHP version
8.2
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions