Closed
Description
What happened?
Updated to 4.3.7 yesterday, getting the following error when saving existing entries:
We've been using the {owner.id} as a subfolder for a long time like this;
Update: it only seems to happen on entries that are ENABLED. When I disable an entry, the error is gone. When it's enabled, it's there again.
Craft 4.3.7
PHP 8.1.13
MariaDB
Imagick 3.7.0 (ImageMagick 6.9.10-23)
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Fixed #12624
brandonkelly commentedon Feb 5, 2023
Thanks for reporting! Just released Craft 3.7.64.1 and 4.3.7.1 with a fix.
It’s actually a bit of a fluke that this was ever working in the first place though. You only need that
owner
bit in there for Assets fields that are nested within Matrix/Super Table/Neo fields, whereowner
references the block’s “owner element” (the entry).So even with the fix, you’d be better off changing that subpath setting to just
/{id}/
or{id}
(leading/trailing slashes are optional and meaningless).arifje commentedon Feb 6, 2023
Thanks!
arifje commentedon Jun 12, 2025
Back again!
Is it possible this has changed on CraftCMS 5? I am setting up a new site in Craft 5 and getting this error when saving a Asset field (thumbnails) when saving the entry.
Asset location path:

It does work on an asset field that is a child of a Matrix field, but not on the an asset field, which is a direct child of the entry.
{id} works, but this does not seem to be the real entry ID, which we need to store the related assets.
i-just commentedon Jun 12, 2025
Hi, thanks for getting in touch!
When using dynamic subfolder paths, you should consider using separate fields for nested and non-nested elements’ field layouts. See the warning in this section of the docs.
When this field is part of, e.g. a section’s entry (root entry), the {id} will refer to that root entry’s ID. When the field is part of a matrix, it’ll refer to the nested entry’s (formerly called matrix block) ID.
arifje commentedon Jun 12, 2025
Ah check, so I can use {owner.id} for fields in Matrix fields, and {id} for standalone fields in the entry.
Thanks!