Jump to:

5452 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » List of images from file store?

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

Page: 1
Go to End
Author Topic: 686 Views
  • datswicked
    Avatar
    Community Member
    15 Posts

    List of images from file store? Link to this post

    Hi All,

    i have added a simple image to my site, as below code.. When i try to edit the page in the cms, and choose Attach image 'From the File Store' the drop down list will not load. i.e. no folders no images, just says 'loading...' i can load from my computer successfully.

    I am running the latest MAMP, SS and Modules; DataObjectManager, uploadify, ecommerce, payment-v0.3.0

    I have tried removing DataObjectManager & uploadify and dev/build?flush=1 and flush=all

    it appears ok when i load the image panel from the wysiwyg tinymce editor, just not the specific image tab?? Any advice would be greatly appreciated.
    Thanks in advance

    public static $has_one = array(
          'HeroShot' => 'Image'
       );
    ...
    function getCMSFields() {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab("Root.Content.Images", new ImageField('HeroShot', 'Load your hero image'));
    return $fields;
    }

  • datswicked
    Avatar
    Community Member
    15 Posts

    Re: List of images from file store? Link to this post

    HI All,
    Still having this issue? can anyone please shed some light? would really appreciate it.

    My client is about to start loading images and it is starting to driving me nuts..

    Images work all around, just the list wont display as per my below post.

    When i try to edit the page in the cms, and choose Attach image 'From the File Store' the drop down list will not load. i.e. no folders no images, just says 'loading...' i can load from my computer successfully.

    Thanks in advance.

  • Craftnet
    Avatar
    Community Member
    58 Posts

    Re: List of images from file store? Link to this post

    Hi,
    This is quick solution:
    Try change to

    new ImageField
    to
    new UploadField
    and add
    limit on the extension (required)

    Another idea - a few times to help me (has happened is because the site Transferred to another server)

    Check if you do not have blank entries in assets
    best to check this by entering the WYSIWYG and try to add an attachment - if you jump out the files is empty entries try the "search new file" in Images
    If this does not help to go into a database and search the File blank title and remove these entries

    Sorry for my bad English

  • datswicked
    Avatar
    Community Member
    15 Posts

    Re: List of images from file store? Link to this post

    Thanks Craftnet,

    sorry for late reply but have been off on other projects for a while, I have managed to get this working buy changing the htaccess files.
    changing the RewriteBase / to suite the location of the site, i was using sub folders and adding the containing folder name seems to have fixed it.
    RewriteBase /foldername

  • alex123
    Avatar
    Community Member
    18 Posts

    Re: List of images from file store? Link to this post

    Hi All,

    I do 2 solutions on my site.

    1->$fields->addFieldToTab("Root.Content.Slides", new UploadField('SlideImage1', 'Image')); -> change to UploadField
    2->change on .htaccess

    Both of them doesn't work.

    Please help,

    686 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.