cms icon indicating copy to clipboard operation
cms copied to clipboard

[4.x]: Wrong path on preview globe icon after drag and drop entry to lower level

Open knufri opened this issue 2 years ago • 3 comments

What happened?

Description

If you create a new entry at the top level and then drag and drop it to a lower level, the URL on the preview icon (globe) is not updated. Only after a reload is the path correct. Tested in Craft 3 and 4, see screenshot.

Steps to reproduce

  1. create new entry on top level
  2. drag and drop it on a lower level
  3. click globe icon
  4. path is wrong because parent elements missing

Bildschirmfoto 2022-09-29 um 17 06 18

Craft CMS version

4.2.5.1

PHP version

8.1

Operating system and version

macOS Monterey 12.6

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

knufri avatar Sep 29 '22 15:09 knufri

This is actually (not) working as intended right now. Updating element URIs can be a little expensive since there could be a large number of descendants that each need to be resaved. So instead of trying to do all of those saves in the initial structures/move-element request, it’ handled by a queue job.

There’s no telling when that queue job will be finished, so the control panel doesn’t even try to keep itself updated with those changes.

That said, we’re going to discuss a couple options next week and see if there’s a middle ground that would fix this for the common scenarios.

brandonkelly avatar Oct 07 '22 15:10 brandonkelly

I forgot about this bug - but I just realised it's still there in 4.4.16.1 Are there any plans to fix this? I appreciate it might not be straightforward.

andrewhawkes avatar Aug 01 '23 13:08 andrewhawkes

Correct, we’ll update this issue when there’s progress.

brandonkelly avatar Aug 03 '23 18:08 brandonkelly