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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Controller Help


Go to End


2 Posts   1684 Views

Avatar
eceers

Community Member, 24 Posts

17 February 2011 at 6:40pm

I have written a little controller to return a Object from passed id. All works A OK! with one exception.

If the url is submitted like this http//www.example.com/processattendees/send/50000004527-49230 all is ok.

The problem is that if the url is submitted like http//www.example.com/processattendees/send/50000004527/49230 it breaks the controller.

I'm assuming that the controller is getting lost because of the extra forward slash. Is there anything I can do in the controller to stop the extra slash breaking things?

Any help or pointers would be greatly apreciated.

Avatar
Ryan M.

Community Member, 309 Posts

18 February 2011 at 7:57am

http://doc.silverstripe.org/sapphire/en/topics/controller#url-handling

The extra slash is making the controller think there's another step in the URL. You might need to tweak your url handling.