What happened?
Description
If you add a nested entry to a matrix field (where the matrix field has a URI format set) and then save the owner entry, the slug of the nested entry you just created will be incremented. For example, if the slug for the nested entry was test, then after saving the owner, it’ll be test-2.
(You can then edit the nested entry and remove the increment part, and it'll save just fine.)
Steps to reproduce
- Create a matrix field with the Entry URI Format set to, e.g.
{owner.uri}/{slug} or about/{slug}.
- Create a section that has an entry type that uses this matrix field.
- Create an entry in this section (without content for the matrix field for now) and save it.
- Add an entry to the matrix field. Note that the slug will be correct at this point.
- Save the owner entry (from step 4). Open the nested entry created in step 5 and notice that the slug was incremented.
Expected behavior
Slug shouldn’t be incremented in this case.
Actual behavior
Slug is incremented.
Craft CMS version
5.4.1
PHP version
8.2
Operating system and version
No response
Database type and version
mysql 8
Image driver and version
No response
Installed plugins and versions
What happened?
Description
If you add a nested entry to a matrix field (where the matrix field has a URI format set) and then save the owner entry, the slug of the nested entry you just created will be incremented. For example, if the slug for the nested entry was
test, then after saving the owner, it’ll betest-2.(You can then edit the nested entry and remove the increment part, and it'll save just fine.)
Steps to reproduce
{owner.uri}/{slug}orabout/{slug}.Expected behavior
Slug shouldn’t be incremented in this case.
Actual behavior
Slug is incremented.
Craft CMS version
5.4.1
PHP version
8.2
Operating system and version
No response
Database type and version
mysql 8
Image driver and version
No response
Installed plugins and versions