-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Craft passes old existing to setUniqueUri when "save entry as new" with custom URI structure #4759
Comments
Thanks for reporting that, just fixed for the next release. To get the fix early, change your "require": {
"craftcms/cms": "dev-develop#43caabc535a815e4c3571f63024d68084586b2eb as 3.2.10",
"...": "..."
} Then run |
I'm seeing this again on 3.4.5 - luckily it's on a channel that we're not using fully yet. As soon as I remove the |
I’m sure I would have tested, but on looking into this further, I’m not sure this was ever fully fixed. The entry would get duplicated fine, however Craft would then attempt to resave the duplicate with the POST data applied to it, at which point you’d get that validation error again. Awkward thing is, post 3.3.0 when this was originally “fixed”, when the form reloads with the validation error, you’re actually technically looking at the form for the duplicated entry, despite it having the original entry’s URL. This should now be fully fixed for the next release. Now Craft no longer cares about duplicate URIs for disabled elements, and entries will be automatically disabled on duplicate if a unique URI can’t be generated for it. To get the fix early, change your "require": {
"craftcms/cms": "dev-develop#6c47da3d367b97a25106df245849e7ce708cae43 as 3.4.5",
"...": "..."
} Then run |
Thanks @brandonkelly - I can hold off. |
Craft 3.4.6 is out now with this change. |
Description
In a section where the URI is based on a field, duplicating one of those entries with a different slug and field results in craft passing the previous URI to
setUniqueUri
, resulting in a failure message of "Could not generate a unique URI based on the URI format."Steps to reproduce
testTextField
{testTextField}
testTextField
Click "Save as new entry."Additional info
Asset Rev 6.0.2
Calendar Links 1.0.1
Child Me! 1.0.4
Cloudflare 0.2.9
Contact Form 2.2.5
Contact Form Extensions 1.1.7
Cookies 1.1.11
CP Field Inspect 1.0.6
Craft Countries and Divisions dev-master
Download Assets 1.0.1
Element Link 1.0.0
Environment Label 3.1.5
Feed Me 4.1.2
Feed Me Pro 3.0.4
Fetch 1.2.0
Image Resizer 2.0.5
Inlin 2.1.1
Inventory 2.0.3
Json Client 1.0.3
Nanoslugs 1.0.3
Position Fieldtype 1.0.14
Redactor 2.3.3.2
SEO 3.6.2
Spoon 3.3.7
SuperSort 3.0.1
Super Table 2.2.1
Twig Perversion 2.1.0
The text was updated successfully, but these errors were encountered: