[5.x]: Assets are uploaded to (and remain) in a temp-xxx…
folder if {slug}
is used in the asset upload path for entry types with auto-generated titles
#16799
Labels
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
The text was updated successfully, but these errors were encountered: