Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

ImageGalleryPage - Error Saving Content


Go to End


56 Posts   17334 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 September 2010 at 12:43pm

I've been trying a number of different ways to replicate this problem, and I'm simply not seeing it. Is there a specific sequence of events that needs to happen?

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
CHD

Community Member, 219 Posts

30 September 2010 at 1:03pm

there doesn't seem to be.
and i think some of us are getting different problems...
mine was a new install of SS 2.4.2 with image_gallery wouldn't save content. showed the "error saving content"
i tried 2.4.2, same problem.
tried 2.4.0 same problem
i tried subdomains,, top level domains, same.
then suddenly my original site i was having problems with just started working! i didn't change anything, it just started for no reason at all. completely random.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 September 2010 at 2:20pm

But what is the actual error you're getting? "Error saving content" just means there was a 500 response code. It's not indicative of any specific problem.

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
CHD

Community Member, 219 Posts

30 September 2010 at 2:32pm

All my error messages can be found on page 1 of this thread. (sorry, on my iphone)

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 September 2010 at 4:35pm

You're using this forum with an iPhone? God bless you... Been there, never doing it again. :)

The issue, from what I can see, is triggered by ImageGalleryPage::checkFolder(). This function is responsible for ensuring that a root folder is assigned for the ImageGalleryPage. So if you have an ImageGalleryPage named "My Gallery", this function ensures that "/assets/image-gallery/my-gallery" exists.

Based on the trace, it looks like $this->RootFolderID is passing true, so the function skips to the part where it sets the name of the folder (in case you've changed the title of your ImageGalleryPage.

$this->RootFolder()->setName($this->Title);

We know that RootFolder() is returning a valid record because otherwise, we'd have a non-object error when invoking the method setName().

Where it fails is within the Folder object, when it tries to write to the filesystem to make sure that the actual path is in alignment with the filename in the database record. The rename() function is complaining that the original path doesn't exist.

So my question to you would be, can you check the record in the File table that corresponds with the RootFolderID field of your ImageGalleryPage, check the Filename field on that record, and check if it, in fact, does or does not exist in the filesystem?

If not, I think you need to sync your filesystem. I believe the way you do that in 2.4 is by clicking the "look for new files" button in AssetAdmin.

Give that a try and let me know how you do.

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
raZbi

Community Member, 11 Posts

30 September 2010 at 7:58pm

Looiking for new files is not helping, and shows "There was an error looking for new files", if there is unpublished Image Gallery Page, that shows "Error saving content", when trying to save or publish.

Another thing, i marked - creating a new Image Gallery page, url field on Metadata tab is just empty. Filling it does not help.

Just FYI, this is what i see in Firebug, getting "Error saving content":

500//There has been an error
_each()base.j...5591666 (line 55)
toColorPart()base.j...5591666 (line 31)
_each()base.j...5591666 (line 55)
initialize(Object { name="url"}, Object { name="options"})base.j...5591666 (line 59)
create()base.j...5591666 (line 4)
success(Object { name="ifChanged"}, Object { name="callAfter"}, Object { name="action"}, Object { name="publish"})leftan...5591668 (line 448)
action_publish_right()cmsmai...5591669 (line 45)
onclick(Object { name="e"})leftan...5591668 (line 352)
[Break on this error] var Ajax={getTransport:function(){retu...st()})||false;},activeRequestCount:0}\n
base.j...5591666 (line 55

Avatar
raZbi

Community Member, 11 Posts

30 September 2010 at 9:17pm

I just checked, which users and groups have rights on site folder and files, and provided all permissions for user www-data (not sure, why i didn't made this earlier :).
It helped partialy - on the clean install this problem appears time to time. Sometimes, when you click create new ImageGallery Page, everything happends, it appeats in site tree and i'm able to publish it, everything works fine.
But sometimes nothing just happens, i need to refresh browser, then this page appears in Site Tree, but URL segment field on Metadata page is empty and i can't do anything with this page but delete only.

By the way, have done another one thing to make it work at least that way - removed all "NewImageGalleryPage-X" records from File table.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 October 2010 at 3:25am

"Got error 28 from storage engine"

Looks like a disk space issue.

http://www.google.com/search?client=safari&rls=en&q=Got+error+28+from+storage+engine&ie=UTF-8&oe=UTF-8

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com