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

Image Collection problem - directory listing denied


Go to End


2 Posts   1869 Views

Avatar
qlex

Community Member, 68 Posts

7 October 2009 at 3:29am

Hi,
installed the module, created a new page and added two images through "Images" tab.
When trying to view the published page i get:

Directory listing denied.

The url created is /my_website/foto/. Module is in root directory under its standard image_collection name.

thanx for any hints,
qlex

Avatar
TheRealBrian

Community Member, 1 Post

10 October 2009 at 4:30pm

I ran into the same problem so I searched the sources for "directory listing denied" and here is what I found.

public function index(HTTPRequest $request)
{
// return 403 error if indexing is not allowed
if(!$this->AllowIndex)
return new HTTPResponse(_t('ImageCollection.ERROR403', 'Directory listing denied.'), 403);

// render page
return array();
}

In the admin section, the content tab of the page you created will have a checkbox for Allow Index, also labeled "When indexing is allowed, an index page with all images will be displayed if the page URL is loaded directly." Check this box and you will be able to go to the page. Otherwise, I believe you need to add the filename of the image you want to see.