You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain actions in entry slideouts will fail with a BadRequestHttpException "Invalid draft ID", if the entry being edited in the slideout does not exist for the currently requested site. Stack trace here: https://pastebin.com/6jndVcMx
For one, attempting to discard unsaved changes from the slideout will fail w/ the above error. I suspect this might be because there is no site ID passed to the delete-draft action; likely making Craft fall back to the currently requested site ('norwegian', in this case), in which the slideout entry doesn't exist?
Similarly, attempting to add a nested entry in a CK Editor field on the slideout entry will also fail with the same exception, causing a blank slideout for the attempted new nested entry. Again, the request (this time to elements/edit) is missing a site ID param:
CleanShot.2024-09-26.at.17.08.11.mp4
^ Attempting to add a nested entry in a CK Editor field for an entry that doesn't exist in the currently requested site
Saving changes in the slideout does work (both in terms of auto-saving the provisional draft and actually clicking "Save" in the slideout); presumably because these requests include the slideout entry's site ID as a param:
Steps to reproduce
Create two sites, "Site A" and "Site B"
Create two sections, "Section A" and "Section B". Make sure that "Section B" is only enabled for "Site B".
Create an entry in Section B (Site B).
Create an Entries field, and select "Section B" as the only source. Enable the "Show the site menu" setting.
Add the Entries field to Section A.
Create an entry in Section A, Site A. Add the entry from Section B (Site B) to the field.
Double-click the selected Site B entry in the entries field to have it open in a slideout. Make some changes. After the auto-draft completes saving, click the "Discard changes" button in the slideout.
Expected behavior
Editing entries in relational fields' slideouts should work, even if the entry doesn't exist for the currently requested site.
Actual behavior
Saving content changes via slideouts for entries that doesn't exist in the currently requested site works, but other actions such as adding nested entries or discarding changes doesn't.
Craft CMS version
5.4.5.1 (Solo)
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
None, although I tested editing nested entries using CK Editor
The text was updated successfully, but these errors were encountered:
What happened?
Description
Certain actions in entry slideouts will fail with a BadRequestHttpException "Invalid draft ID", if the entry being edited in the slideout does not exist for the currently requested site. Stack trace here: https://pastebin.com/6jndVcMx
For one, attempting to discard unsaved changes from the slideout will fail w/ the above error. I suspect this might be because there is no site ID passed to the
delete-draft
action; likely making Craft fall back to the currently requested site ('norwegian'
, in this case), in which the slideout entry doesn't exist?Similarly, attempting to add a nested entry in a CK Editor field on the slideout entry will also fail with the same exception, causing a blank slideout for the attempted new nested entry. Again, the request (this time to
elements/edit
) is missing a site ID param:CleanShot.2024-09-26.at.17.08.11.mp4
^ Attempting to add a nested entry in a CK Editor field for an entry that doesn't exist in the currently requested site
Saving changes in the slideout does work (both in terms of auto-saving the provisional draft and actually clicking "Save" in the slideout); presumably because these requests include the slideout entry's site ID as a param:
Steps to reproduce
Expected behavior
Editing entries in relational fields' slideouts should work, even if the entry doesn't exist for the currently requested site.
Actual behavior
Saving content changes via slideouts for entries that doesn't exist in the currently requested site works, but other actions such as adding nested entries or discarding changes doesn't.
Craft CMS version
5.4.5.1 (Solo)
PHP version
No response
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: