10446 Posts in 2223 Topics by 1719 members
| Go to End | Next > | |
| Author | Topic: | 2056 Views |
-
User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

12 June 2010 at 9:21am
I am using User Forms 0.3.0 with SS 2.4.0 and I get the "Error Creating Field" green box in the bottom left corner when I want to add a field.
There are some fixes for the older versions of User Forms but I couldn't find anything for 0.3.0.
My Firebug console shows this:
ERROR [User Error]: Uncaught SS_HTTPResponse_Exception: I can't handle sub-URLs of a Form object.
IN GET /admin/EditForm/field/Fields/addfield?NewID=1&Type=EditableTextField
Line 305 in /hermes/web02/b4/moo.mysite/sapphire/core/control/RequestHandler.phpSource
======
296: /**
297: * Throws a HTTP error response encased in a {@link SS_HTTPResponse_Exception}, which is later
caught in
298: * {@link RequestHandler::handleAction()} and returned to the user.
299: *
300: * @param int $errorCode
301: * @param string $errorMessage
302: * @uses SS_HTTPResponse_Exception
303: */
304: public function httpError($errorCode, $errorMessage = null) {
* 305: throw new SS_HTTPResponse_Exception($errorMessage, $errorCode);
306: }
307:
308: /**
309: * Returns the SS_HTTPRequest object that this controller is using.
310: *
311: * @return SS_HTTPRequestTrace
=====
<ul>RequestHandler->httpError(404,I can't handle sub-URLs of a Form object.)
line 165 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/field/Fields/addfield)
line 127 of main.php</ul>
Thank you,
-
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

12 June 2010 at 11:14am
Hm Haven't seen this specific error with it before. A couple things to try
* Rebuild the database
* Turn off JS combining by adding Requirements::set_combined_files_enabled(false);
* Reload the CMS with a ?flush=1. -
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

13 June 2010 at 4:38am
thanks will,
so i reinstalled the userforms folder, deleted all editable and userforms tables. I ran dev/build and flushed the cms.
i also added the line of code at the bottom my config file but unfortunately i am still getting the same error.
firebug this time is (very similar):
ERROR [User Error]: Uncaught SS_HTTPResponse_Exception: I can't handle sub-URLs of a Form object.
IN GET /admin/EditForm/field/Fields/addfield?NewID=1&Type=EditableFormHeading
Line 305 in /hermes/web02/b4/moo.talksolarorg/sapphire/core/control/RequestHandler.phpSource
======
296: /**
297: * Throws a HTTP error response encased in a {@link SS_HTTPResponse_Exception}, which is later
caught in
298: * {@link RequestHandler::handleAction()} and returned to the user.
299: *
300: * @param int $errorCode
301: * @param string $errorMessage
302: * @uses SS_HTTPResponse_Exception
303: */
304: public function httpError($errorCode, $errorMessage = null) {
* 305: throw new SS_HTTPResponse_Exception($errorMessage, $errorCode);
306: }
307:
308: /**
309: * Returns the SS_HTTPRequest object that this controller is using.
310: *
311: * @return SS_HTTPRequestTrace
=====
<ul>RequestHandler->httpError(404,I can't handle sub-URLs of a Form object.)
line 165 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/field/Fields/addfield)
line 127 of main.php</ul>
i want to continue trying but i need guidance, not sure what to try next.
thanks, p.
-
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

13 June 2010 at 11:47am
And the other common issue to check is the folder is named 'userforms' and not 'userforms-r10012'. I don't think that would be the cause (since normally you would get a white screen but check
)
Hm perhaps try a completely new install (SS 2.4, UDF 0.3 and new database) and see what happens. What is your environment? (php version, server os, etc) I will try and reproduce.
-
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

14 June 2010 at 4:50am
hi will,
my server settings are:
Platform: Debian
MySQL: 5.0.77
Perl: 5.8.8
PHP: 5.2.12is this enough to simulate?
thanks!
-
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

14 June 2010 at 12:37pm
Thanks Pietro.
I have made a ticket to look into it http://open.silverstripe.org/ticket/5709. I won't have time to setup a test machine for it this week but I will check with that environment.
-
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

14 June 2010 at 3:07pm
Thank you Will, I will keep looking into it as well.
I let you know if I find anything,
P.
-
Re: User Forms 0.3.0 with SS 2.4.0 - Error Creating Field

18 June 2010 at 8:56am
I'm getting the "Error Creating Field" now too, but the underlying error is different from what you've posted.
In the console, I'm getting this:
Failed to load resource: the server responded with a status of 500 (Error: "Couldn't run query: INSERT INTO "EditableFormField_versions" ("ClassName", "CanDelete", "LastEdited", "Created", "Name", "Title", "Default", "Sort", "Required", "CustomErrorMessage", "CustomRules", "CustomSettings", "ParentID", "ShowOnLoad", "Version", "CustomParameter", "RecordID", "AuthorID") VALUES ('EditableDropdown', '1', '2010-06-17 15:02:25', '2010-06-17 15:02:25', null, null, null, '0', '0', null, null, null, '0', '0', 1, null, 42, 1) Unknown column 'ShowOnLoad' in 'field list'" at line 536 of /Applications/MAMP/htdocs/sapphire/core/model/MySQLDatabase.php)
ShowOnLoad looks like it comes from EditableFormField on line 28
static $defaults = array(
"CanDelete" => "1",
"ShowOnLoad" => "1"
);My EditableFormField table has a ShowOnLoad column, but EditableFormField_versions and EditableFormField_Live do not.
I've rebuilt the database, but it hasn't helped.Manually adding the column ShowOnLoad to the EditableFormField_versions table seems to have fixed the problem. This seems like a less-than-optimal situation.
Another oddity I've noticed is that the wiki says there might be problems if you have a 'CustomParameter' column in your EditableFormField tables, but I don't see how it could work without it. ( see http://doc.silverstripe.org/upgrading:2.4.0#user-defined_forms )
Here's the entire error message:
ERROR [User Error]: Couldn't run query:
INSERT INTO "EditableFormField_versions" ("ClassName", "CanDelete", "LastEdited", "Created", "Name", "Title", "Default", "Sort", "Required", "CustomErrorMessage", "CustomRules", "CustomSettings", "ParentID", "ShowOnLoad", "Version", "CustomParameter", "RecordID", "AuthorID") VALUES ('EditableDropdown', '1', '2010-06-17 15:02:25', '2010-06-17 15:02:25', null, null, null, '0', '0', null, null, null, '0', '0', 1, null, 42, 1)Unknown column 'ShowOnLoad' in 'field list'
IN GET /admin/EditForm/field/Fields/addfield?NewID=1&Type=EditableDropdown
Line 536 in /Applications/MAMP/htdocs/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", "CanDelete", "LastEdited", "Created", "Name", "Title", "Default", "Sort", "Required", "CustomErrorMessage", "CustomRules", "CustomSettings", "ParentID", "ShowOnLoad", "Version", "CustomParameter", "RecordID", "AuthorID") VALUES ('EditableDropdown', '1', '2010-06-17 15:02:25', '2010-06-17 15:02:25', null, null, null, '0', '0', null, null, null, '0', '0', 1, null, 42, 1)Unknown column 'ShowOnLoad' in 'field list',256)
line 536 of MySQLDatabase.phpMySQLDatabase->databaseError(Couldn't run query: INSERT INTO "EditableFormField_versions" ("ClassName", "CanDelete", "LastEdited", "Created", "Name", "Title", "Default", "Sort", "Required", "CustomErrorMessage", "CustomRules", "CustomSettings", "ParentID", "ShowOnLoad", "Version", "CustomParameter", "RecordID", "AuthorID") VALUES ('EditableDropdown', '1', '2010-06-17 15:02:25', '2010-06-17 15:02:25', null, null, null, '0', '0', null, null, null, '0', '0', 1, null, 42, 1) | Unknown column 'ShowOnLoad' in 'field list',256)
line 134 of MySQLDatabase.phpMySQLDatabase->query(INSERT INTO "EditableFormField_versions" ("ClassName", "CanDelete", "LastEdited", "Created", "Name", "Title", "Default", "Sort", "Required", "CustomErrorMessage", "CustomRules", "CustomSettings", "ParentID", "ShowOnLoad", "Version", "CustomParameter", "RecordID", "AuthorID") VALUES ('EditableDropdown', '1', '2010-06-17 15:02:25', '2010-06-17 15:02:25', null, null, null, '0', '0', null, null, null, '0', '0', 1, null, 42, 1))
line 583 of Database.phpSS_Database->manipulate(Array)
line 139 of DB.phpDB::manipulate(Array)
line 1048 of DataObject.phpDataObject->write()
line 192 of FieldEditor.phpFieldEditor->addfield(SS_HTTPRequest)
line 134 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 152 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/field/Fields/addfield)
line 127 of main.php
| 2056 Views | ||
| Go to Top | Next > |


