7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » ImageGalleryPage - Error Saving Content
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 7410 Views |
-
Re: ImageGalleryPage - Error Saving Content

5 October 2011 at 7:59am Last edited: 5 October 2011 8:43pm
Hi I think I am going insane right now. I have tried to solve it myself but after three days I am willing to throw the white towel in the ring.
- I am using the ImageGallery v536, uploadify 534 and DataObjectManager-master-HEAD.
- I have deinstalled all these plugins and installed them again.
- I have deleted all imagegallery DB entries and installed image gallery again (and run ad dev/build)
- I have used the PHP fix as suggested by silverseba
- I have CHMODded the directories: assets, image_gallery, DOM and uploadify to 777And even when I have tried everything I still cannot create an image gallery page, because the "Error Saving Content" message appears.
Who can help me with this. Please.
-
Re: ImageGalleryPage - Error Saving Content

5 October 2011 at 9:31am
Hey, Wezzlee.
Can you please provide the detail error message using firebug.
After you install firebug, turn on the "Network" panel, and after you click create the page, you should seen the error message down belown in "red" fonts.
Then, we can take from there for better problem solving.Regards
Alex -
Re: ImageGalleryPage - Error Saving Content

5 October 2011 at 8:18pm
Hi SSadmin,
The following error message appears:
ERROR [Warning]: rename(/home/httpd/vhosts/website.nl/httpdocs/silverstripe/assets/image-gallery/New-ImageGalleryPage/,/home/httpd/vhosts/website.nl/httpdocs/silverstripe/assets/image-gallery/Gallery-4/) [<a href='function.rename'>function.rename</a>]: No such file or directory
IN POST /silverstripe/admin/EditForm
Line 421 in /home/httpd/vhosts/website.nl/httpdocs/silverstripe/sapphire/filesystem/File.phpSource
======
412: // Only throw a fatal error if *both* before and after paths don't exist.
413: if(!file_exists($pathBeforeAbs)) throw new Exception("Cannot move $pathBefore to $pathAfter -
$pathBefore doesn't exist");
414:
415: // Check that target directory (not the file itself) exists.
416: // Only check if we're dealing with a file, otherwise the folder will need to be created
417: if(!file_exists(dirname($pathAfterAbs))) throw new Exception("Cannot move $pathBefore to
$pathAfter - Directory " . dirname($pathAfter) . " doesn't exist");
418: }
419:
420: // Rename file or folder
* 421: $success = rename($pathBeforeAbs, $pathAfterAbs);
422: if(!$success) throw new Exception("Cannot move $pathBeforeAbs to $pathAfterAbs");
423: }
424:
425:
426: // Update any database references
427: $this->updateLinks($pathBefore, $pathAfter);Trace
=====
<ul>rename(/home/httpd/vhosts/website.nl/httpdocs/silverstripe/assets/image-gallery/New-ImageGalleryPage/,/home/httpd/vhosts/website.nl/httpdocs/silverstripe/assets/image-gallery/Gallery-4/)
line 421 of File.phpFile->updateFilesystem()
line 339 of Folder.phpFolder->updateFilesystem()
line 368 of File.phpFile->onAfterWrite()
line 1056 of DataObject.phpDataObject->write()
line 91 of ImageGalleryPage.phpImageGalleryPage->checkFolder()
line 63 of ImageGalleryPage.phpImageGalleryPage->onAfterWrite()
line 1056 of DataObject.phpDataObject->write()
line 749 of LeftAndMain.phpLeftAndMain->save(Array,Form,SS_HTTPRequest)
line 329 of Form.phpForm->httpSubmission(SS_HTTPRequest)
line 143 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 161 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 282 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 125 of Director.phpDirector::direct(/admin/EditForm)
line 127 of main.php</ul>
-
Re: ImageGalleryPage - Error Saving Content

18 October 2011 at 1:03am
Hallo @ll!
I have the same problem.Is there a solution?
best regards
-
Re: ImageGalleryPage - Error Saving Content

19 October 2011 at 11:52pm
Hi StefanDpunkt,
I have posted this question already a while ago and so far no help. There were some SS users on Twitter that tried to help, but asking for help on this forum is not really useful. My problem is still not solved. Maybe we should create a special forum with ImageGallery issues, because I never experience problems with SS, only with the plugin that is provided by UncleCheese.
I still think that is an ownership problem. The gallery directories are created by ImageGallery and cannot be edited.
Please let me know when you have solved this problem. So I can continue with the website that I have build and cannot be finished due to this annoying problem.
-
Re: ImageGalleryPage - Error Saving Content

3 November 2011 at 6:00am
ImageGallery is very useful plugin but has too many bugs. Some of them:
* in onbeforedelete functions child records are removed without exist check (missing if ($this->xxx->ID != 0))
* when gallery root folder has been deleted, each time gallery page is saved new folder (record in File table) is created
* rename bugIn my case rename bug occurs when there is already folder with same name as changed gallery name. Those steps will force error:
1. go to files&images menu and make new folder (with name "abc") in gallery folder(!). New folder should have same parentID as gallery folder parentID.
2. go to galley page and change it's name to "abc"
3. save page
4. error will occur. On disk folder name will be changed to "abc-2" but error will show problem with rename "abc-2" to "abc-3". It looks like check folder function is called twice.For me solution was to change $folder->setName(...); to $folder->Title = .... On disk folder name will be always the same but in files&images folder name will be updated each time gallery name is changed.
-
Re: ImageGalleryPage - Error Saving Content

3 November 2011 at 9:45pm
Did you try the latest ImageGallery build from github: https://github.com/unclecheese/ImageGallery/downloads ?
The bugs Jarek mentioned should be fixed in this version.
I´m using this code on a public website and don´t have any errors or other issues any more.Before you update the "image_gallery" folder on your project, make sure to delete all galleries, folders and images created with the old ImageGallery. You should delete them from the database as well as from the filesystem.
The best way for you to check if the current version is working for you is to set up a fresh SS install and test ImageGallery there.
-
Re: ImageGalleryPage - Error Saving Content

25 November 2011 at 3:57am
I've installed clean version of silverstripe and image gallery and I've errors. One bug in ImageGalleryItem is fixed there is exsits check (but delete is commented)
if($this->Image()->exists()) {
//$this->Image()->delete();
}In ImageGalleryAlbum Folder is still deleted without check
function onBeforeDelete()
{
parent::onBeforeDelete();
$this->GalleryItems()->removeAll();
$this->Folder()->delete();
}Other two bugs aren't fixed. To fix second one (with deleted folder) checkFolder code should check not only RootFolderID but also folder record in Files table:
if( ! $this->RootFolderID || select count(*) from Files where ID = RootFolderID == 0) {...
| 7410 Views | ||
| Go to Top |


