Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » ImageDataObjectManager/SWFUpload - "Import from an existing folder" no files

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1285 Views
  • chris.poirier
    Avatar
    Community Member
    6 Posts

    ImageDataObjectManager/SWFUpload - "Import from an existing folder" no files Link to this post

    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;
    }

    }

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageDataObjectManager/SWFUpload - "Import from an existing folder" no files Link to this post

    Check firebug for the result of the ajax request.

    1285 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.