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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Import from an existing folder - not working?

Go to End

10 Posts   2563 Views


Community Member, 182 Posts

17 October 2009 at 5:11am

After clicking on a folder in the drop down list of "Import from an existing folder" nothing happens.... any ideas why?

I already uploaded everything to a folder and want to move it for the ImageGallery if I just drag and drop the files to the album folders they don't show up in the "Photos" tab of the module so I thought this would be the best way rather than uploading them all again to the specific album. But no luck...



Forum Moderator, 4102 Posts

17 October 2009 at 5:47am

You should get a spinning wheel while it fetches the files in that folder. Can you replicate the issue on the demo site?


Community Member, 150 Posts

7 May 2010 at 5:58am

Hi Uncle Cheese,

Similar problem on SS2.3.7, using DOM2.3 (the zip downloaded via this forum).

When clicking on 'Add photo' button and then on 'Import from an existing folder' -> Select uploads -> Uploads (9 files). I can see the spinner for a moment, but then, nothing comes up...


class Photo extends DataObject
	static $db = array (
    'Title' => 'Text'

	static $has_one = array (
    'Image' => 'Image',
		'Page' => 'Page'

	public function getCMSFields_forPopup()
		return new FieldSet(
			new ImageField('Image'),
      new TextField('Title')


class Photo_Controller extends ContentController {


      $idom = new ImageDataObjectManager(
  			$this, // Controller
  			'Photos', // Source name
  			'Photo', // Source class
  			array(), // Headings 
  			'getCMSFields_forPopup' // Detail fields (function name or FieldSet object)
  		$fields->addFieldToTab('Root.Content.Photos', $idom);


Forum Moderator, 4102 Posts

8 May 2010 at 1:36am

Can you check Firebug for the error it's throwing and post it up here?


Community Member, 150 Posts

8 May 2010 at 6:25am

All I can see is this:

POST http://localhost:8888/       500 Internal Server Error		611ms	jquery.js (line 2806)
Response Headersview source
Date	Fri, 07 May 2010 18:21:36 GMT
Server	Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2
X-Powered-By	PHP/5.2.6
Expires	Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control	no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma	no-cache
Set-Cookie	PastMember=1; expires=Thu, 05-Aug-2010 18:21:36 GMT; path=/
Content-Length	0
Connection	close
Content-Type	text/html; charset="utf-8"
Request Headersview source
Host	localhost:8888
User-Agent	Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20100315 Firefox/3.5.9
Accept	text/html, */*
Accept-Language	en-us,en;q=0.5
Accept-Encoding	gzip,deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive	300
Connection	keep-alive
X-Requested-With	XMLHttpRequest
Referer	http://localhost:8888/
Content-Length	0
Content-Type	text/plain; charset=UTF-8
Cookie	PastMember=1; PHPSESSID=10f3e7a577dddc5b0988b8f955acea7a


Forum Moderator, 4102 Posts

8 May 2010 at 6:52am

Make sure error reporting is turned on in your PHP configuration so it gives you a readable error rather than a generic 500.


Community Member, 150 Posts

8 May 2010 at 7:02am

Ah thanks, sorry. Error is very familiar: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3922 bytes) in /Users/Menno/Sites/ on line 22

I think I know what this is. An image with resolution > 2000 (in this case 2573px width). [url=See]See [url] Please note that I agree with you that a 8000px wide image is not acceptable. However, 2500px... Is there a way to prevent this from happening? Many, many thanks in advance!


Community Member, 150 Posts

10 May 2010 at 7:21pm

UncleCheese, could you give my any direction (sorry, designer, learning every day), where I can create something like this:

If (after upload) GD finds that dimensions of uploaded image are > 2000 pixels, then cancel further processing (remove image) and show user message (sorry, please upload smaller image)...

Go to Top