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.

Customising the CMS /

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

List of images from file store?


Go to End


5 Posts   1876 Views

Avatar
datswicked

Community Member, 15 Posts

29 January 2012 at 6:29pm

Edited: 22/06/2012 1:24am

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

Avatar
datswicked

Community Member, 15 Posts

22 June 2012 at 1:23am

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.

Avatar
Craftnet

Community Member, 58 Posts

3 July 2012 at 11:02am

Edited: 03/07/2012 11:03am

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

Avatar
datswicked

Community Member, 15 Posts

27 August 2012 at 11:30pm

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

Avatar
alex123

Community Member, 18 Posts

4 February 2013 at 4:17pm

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,