7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Import from an existing folder - not working?
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 | Next > | |
| Author | Topic: | 1533 Views |
-
Import from an existing folder - not working?

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...
-Thanks
-
Re: Import from an existing folder - not working?

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?
-
Re: Import from an existing folder - not working?

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...
<?php
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
'Image',
array(), // Headings
'getCMSFields_forPopup' // Detail fields (function name or FieldSet object)
);
$fields->addFieldToTab('Root.Content.Photos', $idom); -
Re: Import from an existing folder - not working?

8 May 2010 at 1:36am
Can you check Firebug for the error it's throwing and post it up here?
-
Re: Import from an existing folder - not working?

8 May 2010 at 6:25am
All I can see is this:
POST http://localhost:8888/website.nl/www/admin/EditForm/field/Photos/import/1 500 Internal Server Error 611ms jquery.js (line 2806)
ParamsHeadersPostPutResponseCacheHTML
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=/website.nl/www/
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:1.9.1.9) 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/website.nl/www/admin/EditForm/field/Photos/upload
Content-Length 0
Content-Type text/plain; charset=UTF-8
Cookie PastMember=1; PHPSESSID=10f3e7a577dddc5b0988b8f955acea7a -
Re: Import from an existing folder - not working?

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.
-
Re: Import from an existing folder - not working?

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/beursvanberlage.nl/www/sapphire/filesystem/GD.php on line 22
I think I know what this is. An image with resolution > 2000 (in this case 2573px width). [url=See http://www.silverstripe.org/all-other-modules/show/276260?start=8]See [url]http://www.silverstripe.org/all-other-modules/show/276260?start=8. 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!
-
Re: Import from an existing folder - not working?

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)...
| 1533 Views | ||
| Go to Top | Next > |


