Nik

@guttmann Works beautifully. Thanks for the help!

👍 (1)
Nik

Yep. I am redirecting from an ItemHolderPage to an ItemPage if there is only one item. Opening the ItemHolderPage in the CMS will still apply the redirect and open the CMS for the ItemPage

Nik

I am doing a redirect inside there if certain conditions I met, but the redirect also gets applied in the CMS, which want to prevent

Nik

Hello folks, is there a way to check whether I am in the CMS or not inside the init() function of a PageController?

Nik

Oh, thought it would reroute to the /home internally and then fail. Makes sense though. I'll give it a shot, thank you! 🙂

Nik

Hey folks, encountering an issue with form submissions. I have a really simple HTML form that is hardcoded in the HTML (does not come from a SilverStripe value). The PageController class has a handler named SubmitForm, and SubmitForm is in allowed_actions.

Trying to call this on a page that is not the HomePage works fine, eg: /contact/SubmitForm works. /about/SubmitForm works, too. /SubmitForm does not work, and throws a 404 instead. Why is this happening?