Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » user defined form - cannot add fields

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 763 Views
  • jwill123
    Avatar
    Community Member
    5 Posts

    user defined form - cannot add fields Link to this post

    I installed the user defined forms on 3.03 and can add a new page (User Defined Form), but do not see the form tabs that allow me to add form fields.

    Update - after doing a flush-all, I see the tabs now, now I cannot add a field. I get "There has been an error".

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: user defined form - cannot add fields Link to this post

    Check your browser XHR section (or your php error log) for the actual error message and backtrace.

    If you're using Chrome then this is found under 'Web Inspector' => 'Network' => 'XHR' then try add again.

  • jwill123
    Avatar
    Community Member
    5 Posts

    Re: user defined form - cannot add fields Link to this post

    Thanks for the response, I get the attached reply.

    Attached Files
  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: user defined form - cannot add fields Link to this post

    1) Turn on dev mode
    2) Try again

  • jwill123
    Avatar
    Community Member
    5 Posts

    Re: user defined form - cannot add fields Link to this post

    I see the attached error.

    Attached Files
  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: user defined form - cannot add fields Link to this post

    Great so now open up that line (that only shows that a request failed, not why) and look at the Response tab to see the back trace.

  • jwill123
    Avatar
    Community Member
    5 Posts

    Re: user defined form - cannot add fields Link to this post

    ERROR [User Error]: Couldn't run query:
    INSERT INTO "EditableFormField_versions" ("Required", "CustomRules", "CustomSettings", "Default", "CustomErrorMessage", "LastEdited", "ClassName", "Created", "Name", "Title", "Sort", "CanDelete", "CustomParameter", "ParentID", "Version", "RecordID", "AuthorID") VALUES ('1', 'a:0:{}', 'a:6:{s:10:\"ExtraClass\";s:0:\"\";s:10:\"RightTitle\";s:0:\"\";s:9:\"MinLength\";s:0:\"\";s:9:\"MaxLength\";s:0:\"\";s:4:\"Rows\";s:1:\"1\";s:10:\"ShowOnLoad\";s:4:\"Show\";}', null, null, '2013-02-16 15:12:26', 'EditableTextField', '2008-11-03 10:10:51', 'EditableTextField1', '*First Name:', '0', '1', null, '81', 1, 1, 2)

    Unknown column 'CanDelete' in 'field list'
    IN POST /admin/pages/edit/EditForm
    Line 580 in /home/acthoust/public_html/framework/model/MySQLDatabase.php

    Source
    ======
    571:    }
    572:
    573:    public function databaseError($msg, $errorLevel = E_USER_ERROR) {
    574:       // try to extract and format query
    575:       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    576:          $formatter = new SQLFormatter();
    577:          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    578:       }
    579:
    * 580:       user_error($msg, $errorLevel);
    581:    }
    582:
    583:    /**
    584:     * Return a boolean type-formatted string
    585:     *
    586:     * @param array $values Contains a tokenised list of info about this data type

    Trace
    =====
    user_error(Couldn't run query:
    INSERT INTO "EditableFormField_versions" ("Required", "CustomRules", "CustomSettings", "Default", "CustomErrorMessage", "LastEdited", "ClassName", "Created", "Name", "Title", "Sort", "CanDelete", "CustomParameter", "ParentID", "Version", "RecordID", "AuthorID") VALUES ('1', 'a:0:{}', 'a:6:{s:10:\"ExtraClass\";s:0:\"\";s:10:\"RightTitle\";s:0:\"\";s:9:\"MinLength\";s:0:\"\";s:9:\"MaxLength\";s:0:\"\";s:4:\"Rows\";s:1:\"1\";s:10:\"ShowOnLoad\";s:4:\"Show\";}', null, null, '2013-02-16 15:12:26', 'EditableTextField', '2008-11-03 10:10:51', 'EditableTextField1', '*First Name:', '0', '1', null, '81', 1, 1, 2)

    Unknown column 'CanDelete' in 'field list',256)
    MySQLDatabase.php:580

    MySQLDatabase->databaseError(Couldn't run query: INSERT INTO "EditableFormField_versions" ("Required", "CustomRules", "CustomSettings", "Default", "CustomErrorMessage", "LastEdited", "ClassName", "Created", "Name", "Title", "Sort", "CanDelete", "CustomParameter", "ParentID", "Version", "RecordID", "AuthorID") VALUES ('1', 'a:0:{}', 'a:6:{s:10:\"ExtraClass\";s:0:\"\";s:10:\"RightTitle\";s:0:\"\";s:9:\"MinLength\";s:0:\"\";s:9:\"MaxLength\";s:0:\"\";s:4:\"Rows\";s:1:\"1\";s:10:\"ShowOnLoad\";s:4:\"Show\";}', null, null, '2013-02-16 15:12:26', 'EditableTextField', '2008-11-03 10:10:51', 'EditableTextField1', '*First Name:', '0', '1', null, '81', 1, 1, 2) | Unknown column 'CanDelete' in 'field list',256)
    MySQLDatabase.php:132

    MySQLDatabase->query(INSERT INTO "EditableFormField_versions" ("Required", "CustomRules", "CustomSettings", "Default", "CustomErrorMessage", "LastEdited", "ClassName", "Created", "Name", "Title", "Sort", "CanDelete", "CustomParameter", "ParentID", "Version", "RecordID", "AuthorID") VALUES ('1', 'a:0:{}', 'a:6:{s:10:\"ExtraClass\";s:0:\"\";s:10:\"RightTitle\";s:0:\"\";s:9:\"MinLength\";s:0:\"\";s:9:\"MaxLength\";s:0:\"\";s:4:\"Rows\";s:1:\"1\";s:10:\"ShowOnLoad\";s:4:\"Show\";}', null, null, '2013-02-16 15:12:26', 'EditableTextField', '2008-11-03 10:10:51', 'EditableTextField1', '*First Name:', '0', '1', null, '81', 1, 1, 2))
    Database.php:655

    SS_Database->manipulate(Array)
    DB.php:175

    DB::manipulate(Array)
    DataObject.php:1174

    DataObject->write()
    EditableFormField.php:380

    EditableFormField->populateFromPostData(Array)
    FieldEditor.php:157

    FieldEditor->saveInto(UserDefinedForm)
    Form.php:1229

    Form->saveInto(UserDefinedForm)
    CMSMain.php:825

    CMSMain->save(Array,Form,SS_HTTPRequest)
    Form.php:360

    Form->httpSubmission(SS_HTTPRequest)
    RequestHandler.php:184

    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    RequestHandler.php:204

    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    Controller.php:153

    Controller->handleRequest(SS_HTTPRequest,DataModel)
    LeftAndMain.php:357

    LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
    AdminRootController.php:89

    AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
    Director.php:307

    Director::handleRequest(SS_HTTPRequest,Session,DataModel)
    Director.php:119

    Director::direct(/admin/pages/edit/EditForm,DataModel)
    main.php:126

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: user defined form - cannot add fields Link to this post

    Ok, so looks like you upgraded userforms recently? You'll need to jump into your database and run a quick query.

    http://www.silverstripe.org/all-other-modules/show/10228?start=8#post276161

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