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.

All other Modules /

Discuss all other Modules here.

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

ImageDataObjectManager/SWFUpload - "Import from an existing folder" no files


Go to End


2 Posts   1899 Views

Avatar
chris.poirier

Community Member, 6 Posts

12 March 2010 at 7:32pm

I have an ImageDataObjectManager setup with the code below. When I open the popup to add a Slideshow Image and select a folder under "Import from an existing folder", I see the loading icon spinning and then nothing displays below where there should be the list of files.

HomePage.php:

...
      $slideshowfield = new ImageDataObjectManager(
         $this,
         'Slideshow',
         'SlideshowImage',
				 'Image',
         array(
	    		'Title' => 'Title',
	    		'Description' => 'Description'
         ),
         'getCMSFields_forPopup'
      );
      $slideshowfield->setAddTitle( 'Slideshow Image' );
      $slideshowfield->relationAutoSetting = true;
      $fields->addFieldToTab( 'Root.Content.Slideshow', $slideshowfield );
...

SlideshowImage.php:

class SlideshowImage extends DataObject {
 
   static $db = array(
      'Title' => 'Varchar(100)',
			'Description' => 'Varchar(255)'
   );
	 static $has_one = array(
      'Image' => 'Image',
      'HomePage' => 'HomePage'
   );
 
   function getCMSFields_forPopup() {
      $fields = new FieldSet();
      $fields->push( new TextField( 'Title', 'Title' ) );
      $fields->push( new TextareaField( 'Description', 'Description' ) );
			$fields->push( new ImageField( 'Image', 'Image' ) );
   
      return $fields;
   }
 
}

Avatar
UncleCheese

Forum Moderator, 4102 Posts

13 March 2010 at 3:11am

Check firebug for the result of the ajax request.