Jump to:

23581 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » My controller does not redirect correctly - multiform

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

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

Page: 1
Go to End
Author Topic: 1032 Views
  • otherjohn
    Avatar
    Community Member
    125 Posts

    My controller does not redirect correctly - multiform Link to this post

    Hi all,
    I have created a controller which has multiform on it.
    The form shows fine but it doesn't redirct on submission correctly. I get a 404 error

    <?php

    class FBController extends Controller
    {
       static $allowed_actions = array ();
       
       
       function FacebookSetupMF() {
    return new FacebookSetupMF($this, 'FacebookSetupMF');
       }
    }


    form shows correctly at domain.com/FBController/
    but when I submit it goes to domain.com/FacebookSetupMF?MultiFormSessionID=cb7feaaf9e07dc5ff0fa6f8f48d49100ae289bc8

    and I get a Page not found?

  • KINKCreative
    Avatar
    Community Member
    56 Posts

    Re: My controller does not redirect correctly - multiform Link to this post

    Did you ever find a solution to this? I am having exactly this challenge

  • martimiz
    Avatar
    Forum Moderator
    1091 Posts

    Re: My controller does not redirect correctly - multiform Link to this post

    In this example SilverStripe is looking for a page called FacebookSetupMF, when in fact this is meant as an Action parameter for your controller telling it to call the FacebookSetupMF() function instead.

    So you have to tell your controller to allow that:

    static $allowed_actions = array ('FacebookSetupMF');

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