trilbymedia / grav-plugin-flex-objects

Powerful and supremely flexible object support for Grav
MIT License
40 stars 10 forks source link

Error 'Cannot move folder to itself' while changing folder name #129

Open awrog opened 3 years ago

awrog commented 3 years ago

GRAV: v1.7.16 Flex objects: v1.0.14 I want to change the folder name of a page. I get an error: 'Cannot move folder to itself' (the foldername as absolutely unique)

Cannot-move-folder-to-itself

mahagr commented 3 years ago

Make sure that the parent doesn't have 2 copies with the same slug.

awrog commented 3 years ago

Thanks Matias, unfortunately this is not the case, see gif

Fresh example:

Failed to save entry: Flex saveRow(12.testpage/01.page123|docs.nl): Flex moveFolder(user/pages/12.testpage/01.page1, user/pages/12.testpage/01.page123): Cannot move folder to itself

Also with GRAV: v1.7.15 Flex Objects v1.0.11 PHP: PHP Version 7.3.24

Cannot-move-folder-to-itself-demo

mahagr commented 3 years ago

Thanks, that one helps a lot. Seems to be an issue with multi-lang

awrog commented 3 years ago

The problem also occurs when I disable flex-objects plugin. With flex-objects activated, there is no problem when I rename the page via 'Auto-regenerate based on page title'.

johnsgp commented 3 years ago

I have the same issue. Same versions of Grav and FlexObjects. However, using in English. All plugins:

Admin Panel v1.10.16 Update available! Archives v2.0.2 Email v3.1.2 Error v1.7.1 Flex Objects v1.0.14 Update available! Form v5.0.2 Update available! Login v3.4.3 Update available! Markdown Notices v1.1.0 Pagination v1.4.2 Problems v2.1.1

johnsgp commented 3 years ago

After upgrading everything, the problem continues. Grav is now 1.7.17 and the upgrades were:

  1. Admin Panel [v1.10.16 -> v1.10.17]
  2. Flex Objects [v1.0.14 -> v1.0.15]
  3. Form [v5.0.2 -> v5.0.3]
  4. Login [v3.4.3 -> v3.4.4]
johnsgp commented 3 years ago

One more bit of information - this happens on Windows 10 and Ubuntu 20.04