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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

$allowed_actions changes


Go to End


3 Posts   2595 Views

Avatar
tv

Community Member, 44 Posts

14 June 2013 at 10:21am

Edited: 14/06/2013 10:22am

I was using the 3.0 compatible version of the SecureFiles module. Once a folder in assets is marked as secure in the backend, the module adds a .htaccess file to the folder and sends any requests to that folder through main.php to detect member permissions. Everything was working fine on 3.0.4 with the following director rules:

Director:
  rules:
    'assets/$Action': 'SecureFileController'

I am upgrading to 3.1 now and when I attempt to view a file located in a folder marked as secure ( for example: http://mysite.com/mypage/assets/Secure/securefile.m4a), I get the following error:

Action 'securefile' isn't available on class SecureFileController

Do I need to change my route configuration or does this have anything to do with the changes to $allowed_actions in 3.1?

Thanks for any help.

Avatar
Willr

Forum Moderator, 5523 Posts

15 June 2013 at 6:14pm

You probably just need to take off the $Action - 'assets': 'SecureFileController' as I assume everything would just go through the 1 action?

Avatar
elgordo

Community Member, 70 Posts

4 November 2013 at 8:45pm

There is a 3.1 compatible branch of secure files here, https://github.com/timsnadden/silverstripe-securefiles/tree/3.1 - however it suffers from the same issue as previously mentioned regarding the foldername being mistaken for an action.

1) What are the best ways to debug routing issues?
2) Is there any way in routes.yml or indeed the controller to wipe and previous routing rules and start afresh.

Cheers

Gordon