I am currently programming a very simple page that contains a set of pictures. I am using the DataObjectManager and I am trying to change the upload folder. I use the ImageGallery module as an example and now I am getting the same errors as you in this thread. I can create the page but I cannot change the page name and save it.

The problem is that the name of the new page and the name of the created folder differ. The page for example has the name NeuLZImageSetPage but the name of the folder is new-LZImageSetPage. After that the database and the filesystem are out of sync and each subsequent save fails because the folder cannot be renamed.

In my case I have a german site. So the URL-Segment and the Page title differ. I suppose that is the problem. Maybe there are other situations where the title and the URL are different (maybe when a new page is created straight after another and Silverstripes appends page numbers). That could be also a hint that the whole thing works sometimes and sometimes not.

I had similar problems: When creating or renaming a ImageGalleryPage, multiple Folders in "Files&Images" were created, and saving the page resulted in an error (Error 500: error renaming folder / folder does not exist).

I solved this issue with 2 steps:

1. I added proper rights (777) recursively to the 'image-gallery' folder
2. I added a patch to image_gallery/code/ImageGalleryPage.php, that solved issues of creating multiple folders with wrong names (which resulted in the above errors when Silverstripe was trying to rename folders that didn´t exist)