1042 Posts in 379 Topics by 372 members
| Go to End | Next > | |
| Author | Topic: | 2031 Views |
-
userdefinedform on 2.4 stable

21 May 2010 at 4:43pm
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.
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 8:18pm
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.
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 8:31pm
Thanks Will - made no difference. Will have to wait for stable build 0.3
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 8:34pm
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.
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 9:19pm
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.phpSource
======
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 typeTrace
=====
<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.phpMySQLDatabase->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.phpMySQLDatabase->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.phpSS_Database->manipulate(Array)
line 139 of DB.phpDB::manipulate(Array)
line 1048 of DataObject.phpDataObject->write()
line 494 of Versioned.phpVersioned->publish(Stage,Live,)
call_user_func_array(Array,Array)
line 693 of Object.phpObject->__call(publish,Array)
EditableTextField->publish(Stage,Live,)
line 90 of EditableFormField.phpEditableFormField->doPublish(Stage,Live)
line 129 of UserDefinedForm.phpUserDefinedForm->doPublish()
line 769 of LeftAndMain.phpLeftAndMain->save(Array,Form,SS_HTTPRequest)
line 296 of Form.phpForm->httpSubmission(SS_HTTPRequest)
line 134 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 152 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 283 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 127 of Director.phpDirector::direct(/admin/EditForm)
line 127 of main.php</ul>
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 9:25pm
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.
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 9:33pm
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
-
Re: userdefinedform on 2.4 stable

21 May 2010 at 9:39pm
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.
| 2031 Views | ||
| Go to Top | Next > |

