Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » userdefinedform on 2.4 stable

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1 2
Go to End
Author Topic: 2555 Views
  • webtonic
    Avatar
    Community Member
    26 Posts

    userdefinedform on 2.4 stable Link to this post

    I have installed and when try to change page type to user form, (save and publish) receive error "Error saving Content" and page will not save.

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    Make sure you use a daily build (or trunk) of UserForms. 0.2 is not compatible with it. We will be releasing a stable 0.3 build of UDF for 2.4 compatibility in the coming weeks.

    If you are using trunk make sure you have rebuilt the database.

  • webtonic
    Avatar
    Community Member
    26 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    Thanks Will - made no difference. Will have to wait for stable build 0.3

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    Can you open up firebug if you have it installed and view the console panel when you get the error - it should output a more useful one. No tickets currently exist about creating a field and I can do it successfully so its likely somethings up in your environment.

  • webtonic
    Avatar
    Community Member
    26 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    Hi Will - firebug error

    ERROR [User Error]: Couldn't run query:
    INSERT INTO "EditableFormField_versions" ("ClassName", "Created", "LastEdited", "Name", "Title", "Sort", "Required", "CanDelete", "ParentID", "Default", "CustomErrorMessage", "CustomRules", "CustomSettings", "CustomParameter", "Version", "RecordID", "AuthorID") VALUES ('EditableTextField', '2009-06-20 19:55:43', '2010-05-21 21:17:24', 'EditableTextField1', 'Name', 0, '1', '1', 3, null, null, null, null, null, 1, 1, 1)

    Unknown column 'CustomParameter' in 'field list'
    IN POST /admin/EditForm
    Line 536 in /home/stagton/public_html/sapphire/core/model/MySQLDatabase.php

    Source
    ======
    527:    }
    528:    
    529:    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    530:       // try to extract and format query
    531:       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    532:          $formatter = new SQLFormatter();
    533:          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    534:       }
    535:       
    * 536:       user_error($msg, $errorLevel);
    537:    }
    538:    
    539:    /**
    540:     * Return a boolean type-formatted string
    541:     *
    542:     * @param array $values Contains a tokenised list of info about this data type

    Trace
    =====
    <ul>user_error(Couldn't run query:
    INSERT INTO "EditableFormField_versions" ("ClassName", "Created", "LastEdited", "Name", "Title", "Sort", "Required", "CanDelete", "ParentID", "Default", "CustomErrorMessage", "CustomRules", "CustomSettings", "CustomParameter", "Version", "RecordID", "AuthorID") VALUES ('EditableTextField', '2009-06-20 19:55:43', '2010-05-21 21:17:24', 'EditableTextField1', 'Name', 0, '1', '1', 3, null, null, null, null, null, 1, 1, 1)

    Unknown column 'CustomParameter' in 'field list',256)
    line 536 of MySQLDatabase.php

    MySQLDatabase->databaseError(Couldn't run query: INSERT INTO "EditableFormField_versions" ("ClassName", "Created", "LastEdited", "Name", "Title", "Sort", "Required", "CanDelete", "ParentID", "Default", "CustomErrorMessage", "CustomRules", "CustomSettings", "CustomParameter", "Version", "RecordID", "AuthorID") VALUES ('EditableTextField', '2009-06-20 19:55:43', '2010-05-21 21:17:24', 'EditableTextField1', 'Name', 0, '1', '1', 3, null, null, null, null, null, 1, 1, 1) | Unknown column 'CustomParameter' in 'field list',256)
    line 134 of MySQLDatabase.php

    MySQLDatabase->query(INSERT INTO "EditableFormField_versions" ("ClassName", "Created", "LastEdited", "Name", "Title", "Sort", "Required", "CanDelete", "ParentID", "Default", "CustomErrorMessage", "CustomRules", "CustomSettings", "CustomParameter", "Version", "RecordID", "AuthorID") VALUES ('EditableTextField', '2009-06-20 19:55:43', '2010-05-21 21:17:24', 'EditableTextField1', 'Name', 0, '1', '1', 3, null, null, null, null, null, 1, 1, 1))
    line 583 of Database.php

    SS_Database->manipulate(Array)
    line 139 of DB.php

    DB::manipulate(Array)
    line 1048 of DataObject.php

    DataObject->write()
    line 494 of Versioned.php

    Versioned->publish(Stage,Live,)

    call_user_func_array(Array,Array)
    line 693 of Object.php

    Object->__call(publish,Array)

    EditableTextField->publish(Stage,Live,)
    line 90 of EditableFormField.php

    EditableFormField->doPublish(Stage,Live)
    line 129 of UserDefinedForm.php

    UserDefinedForm->doPublish()
    line 769 of LeftAndMain.php

    LeftAndMain->save(Array,Form,SS_HTTPRequest)
    line 296 of Form.php

    Form->httpSubmission(SS_HTTPRequest)
    line 134 of RequestHandler.php

    RequestHandler->handleRequest(SS_HTTPRequest)
    line 152 of RequestHandler.php

    RequestHandler->handleRequest(SS_HTTPRequest)
    line 147 of Controller.php

    Controller->handleRequest(SS_HTTPRequest)
    line 283 of Director.php

    Director::handleRequest(SS_HTTPRequest,Session)
    line 127 of Director.php

    Director::direct(/admin/EditForm)
    line 127 of main.php

    </ul>

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    Ah ok known bug - http://doc.silverstripe.org/upgrading:2.4.0?s[]=upgrading#user-defined_forms.

    To fix that login to your database (phpmyadmin usually) and select the EditableFormField table in your database. Click the structure button and hit delete on the CustomParameter field.

  • webtonic
    Avatar
    Community Member
    26 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    thanks this has fixed the saving error - the page type does not change to a user defined form it stays as Site Tree! with no form options showing

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: userdefinedform on 2.4 stable Link to this post

    Hmm run a /dev/build again, flush the cms - admin?flush=1 and try to change the pagetype again. Create a new UDF and see if that works.

    2555 Views
Page: 1 2
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.