21491 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 298 Views |
-
SilverStripe 2.4 Book Example Contact Page Error

19 January 2012 at 11:17am
Hi guys,
Not sure where to ask this question, but thought this was as good a place to start as any.
I've been using the PACKT Pub book SilverStripe 2.4 Module Extension, Themes, and Widgets to get me started with SS.
I was using the example Contact Form code as the basis for a Contact Page in my first project. When I tried my form for the first time the server returned an "unknown page error" when the form was submitted to .../contact-us/Form
After a bit of diagnosis I came to the conclusion that the $allowed_actions given in the book example prevented the form submission from occurring (well at least that's what I discovered).
In the ContactPage controller the $allowed_actions is defined as: array('sent') but this seems to prevent the form from submitting correctly. Changing the allowed_actions to include 'Form' gets things working correctly.
Has anyone else tried to build the Contact Form example (page 223) and got it working exactly as documented?
BTW I did correct the missing apostrophe in the ContactPage Model definition.
Cheers,
Innes (NZ) -
Re: SilverStripe 2.4 Book Example Contact Page Error

20 January 2012 at 4:00pm
Might want to email the author directly. And yes you'll need the form function name as an allowed_action. So it's either a bug in the book or 2.4.6 has changed in some way. I believe there is an errata section on github to include the most up to date code - https://github.com/xeraa/silverstripe-book/
| 298 Views | ||
|
Page:
1
|
Go to Top |

