10377 Posts in 2193 Topics by 1709 members
| Go to End | Next > | |
| Author | Topic: | 291 Views |
-
user defined form - cannot add fields

15 February 2013 at 7:53am Last edited: 15 February 2013 9:08am
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".
-
Re: user defined form - cannot add fields

16 February 2013 at 1:16pm
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.
-
Re: user defined form - cannot add fields

17 February 2013 at 2:47am
Thanks for the response, I get the attached reply.
-
Re: user defined form - cannot add fields

17 February 2013 at 9:09am
1) Turn on dev mode
2) Try again -
Re: user defined form - cannot add fields

17 February 2013 at 10:10am
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.
-
Re: user defined form - cannot add fields

17 February 2013 at 10:14am
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.phpSource
======
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 typeTrace
=====
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:580MySQLDatabase->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:132MySQLDatabase->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:655SS_Database->manipulate(Array)
DB.php:175DB::manipulate(Array)
DataObject.php:1174DataObject->write()
EditableFormField.php:380EditableFormField->populateFromPostData(Array)
FieldEditor.php:157FieldEditor->saveInto(UserDefinedForm)
Form.php:1229Form->saveInto(UserDefinedForm)
CMSMain.php:825CMSMain->save(Array,Form,SS_HTTPRequest)
Form.php:360Form->httpSubmission(SS_HTTPRequest)
RequestHandler.php:184RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:204RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:153Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:357LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:89AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:307Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:119Director::direct(/admin/pages/edit/EditForm,DataModel)
main.php:126 -
Re: user defined form - cannot add fields

17 February 2013 at 10:19am
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
| 291 Views | ||
| Go to Top | Next > |


