Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Start-Recipe Form Tutorial Does Not Work

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1844 Views
  • PassePartout
    Avatar
    Community Member
    21 Posts

    Start-Recipe Form Tutorial Does Not Work Link to this post

    Hello,

    So I'm trying to create a registration page and was following the start-recipe tutorial. To start things off beginning at "Start by creating a page called Registration.php". If you follow the instructions you get an error when trying to build. I have tried a couple ways to resolve this issue as you will see in the comments section on that tutorial page. I may have just been avoiding the true error as I seem to just be changing what error I get and where. If somebody could look into this or try out the code and get it to work let me know,

    cheers

  • PassePartout
    Avatar
    Community Member
    21 Posts

    Re: Start-Recipe Form Tutorial Does Not Work Link to this post

    I have done a few changes but here are my files ( Registration.php and RegistrationsDataObject.php. As the comments say, I had a few errors which I tried to address.

    The first was "Parse error: syntax error, unexpected T_PRIVATE in *****/mysite/code/Registration.php on line 71" which was fixed by taking away the "}" on line 68 and putting it at the end of the page.

    This made another error appear "Error in Ajax evaluator on line 974: missing ; before statement
    Parse error: syntax error, unexpected $end in *****/mysite/code/Registration.php on line 136" which was fixed by removing the following code

    function extraJs() {
    $v =
    <<<JS
    /* ALL YOUR JAVASCRIPT TRICKS HERE */

    JS;
    return $v;
    }

    However now i get another problem when I go in the CMS and on the Registration page type I created, under the "registrations" tab, when i go to "add registrations data object" I get this error... "Data-integrity is broken in TariffsDataObject"

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