In my 10.3.1 site, I want to move a bucketable item out of a bucket and into an unbucketable folder that is a direct child of the parent bucket item. When doing so, I get different results based on how I perform the "move" operation.
Consider the following example content tree, where 🪣 is a bucket, 📄 is a bucketable page item, and 🗂️ is an unbucketable folder item:
- Blogs 🪣 (Is Bucket = true)
- 2023 🪣
- 01 🪣
- Blog post 1 📄
- 02 🪣
- Blog post 2 📄
- 2024 🪣
- 01 🪣
- Blog post 3 📄
- 02 🪣
- Blog post 4 📄
- Archive 🗂️
- 2022 🗂️
- Blog post 5 📄
- 2023 🗂️
The year and month 🪣 items are created via a custom bucket path which is based on a Date
field of the 📄 items. This occurs on the item:saved
event.
Problem
When I attempt to move one of the 📄 items into a 🗂️, I get different results depending on how the move operation is performed. This issue has been observed in multiple environments by multiple users. This issue only happens when working with items that are in buckets.
1. Right clicking an item and selecting "Copying" --> "Move To"
- Right click one of the 📄 items. Select "Copying" --> "Move To"
- Select
2022
🗂️ as the destination. - Prompt appears: "This operation may take a long time to complete. Are you sure you want to continue?"
- Press "OK". Nothing happens. The item does not move. The
item:saved
event handler does not get called. - Try again, this time picking
Archive
🗂️ as the destination. The same prompt appears. Press "OK". In the content tree, theArchive
🗂️ item actually automatically becomes expanded, revealing its children (unlike before when2022
🗂️ was selected as the destination), but ultimately the item does not move. There are no errors or warnings in the Sitecore logs.
2. Moving the item via drag and drop
- Drag 📄 item to
2022
🗂️ - Prompt appears: "Are you sure you want to move 📄?
- Press "OK"
- Prompt appears: "This operation may take a long time to complete. Are you sure you want to continue?"
- Press "OK"
- The custom
item:saved
event handler is called. - The item moves successfully.
What are the relevant differences between these two methods of moving an item, and why might the difference(s) be causing issues in this case?
item:saving
oritem:bucketing:dragInto
)? Do you seeLog.Audit((object) this, "Move item: {0} to {1}"
message in your logs?17:28:24 INFO AUDIT (sitecore\Admin): Drag item: master:/sitecore/content/...
in the logs when dragging. Nothing appears in the logs when usingCopying -> Move To
. The only somewhat relevant custom event handler in play isitem:saved
, which, if all conditions are met, performs aBucketManager.Sync()
. Else it does nothing. Either way, it does not appear to be the source of the issue.<uiDragItemTo>
and<uiMoveItems>
look inshowconfig.aspx
? I wonder if there is a config patch that causes this behaviour.