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

Default configuration?


Go to End


4 Posts   1327 Views

Avatar
elementweb

Community Member, 5 Posts

11 March 2010 at 7:08am

How would I proceed to add default configuration values for thumbnail sizes and such?

I had a problem with pages on a site I did for a client that generated errors. Turned out because the configuration values were missing, it made GD crash and the page failed to load. I can manage to always set the configuration, but I would like to avoid that burden to my client, who should only have to set a page to Gallery for it to work.

Avatar
elementweb

Community Member, 5 Posts

11 March 2010 at 7:12am

Well looking at the code... it seems there already are default values set...

But I still get this error:

Error at sapphire/filesystem/GD.php line 123: No dimensions given (http://vaguedecirque-staging.strangeelement.com/duo-symbiose-photos-fr/)

The error thrown is in GD::resize

if(!$width && !$height) user_error("No dimensions given", E_USER_ERROR);

Avatar
UncleCheese

Forum Moderator, 4102 Posts

11 March 2010 at 8:36am

You need to set your thumbnail width. The default values don't apply unless you create the page new. It doesn't work when you convert it from an old page type.

Avatar
elementweb

Community Member, 5 Posts

11 March 2010 at 1:33pm

Is there a way then to catch a page type change to apply the defaults?