Hi there,
I am trying to upgrade a site from 2.2.3 to 2.3.1 and I am having trouble with making the existing forms work with the UserForms module.
There are two errors. One on the public side, one on the CMS side:
1. No contact page will display on the public side and instead I get an error like this:
[User Error] Object::__call() Method 'setCustomValidationMessage' not found in class 'TextField'
GET /contact-us/?isDev=1
Line 133 in C:\wamp\www\viva_exp_2.3\sapphire\core\Object.php
Source
124
125 } else if($config['function_str']) {
126 $function = Object::$extraMethods[$this->class][strtolower($methodName)]['function'] = create_function('$obj, $args', $config['function_str']);
127 return $function($this, $args);
128
129 } else {
130 user_error("Object::__call() Method '$methodName' in class '$this->class' an invalid format: " . var_export(Object::$extraMethods[$this->class][$methodName],true), E_USER_ERROR);
131 }
132 } else {
133 user_error("Object::__call() Method '$methodName' not found in class '$this->class'", E_USER_ERROR);
134 }
135 }
136
137 /**
138 * This function allows you to overload class creation methods, so certain classes are
139 * always created correctly over your system.
Trace
* Object::__call() Method 'setCustomValidationMessage' not found in class 'TextField'
Line 133 of Object.php
* Object->__call(setCustomValidationMessage,Array)
* TextField->setCustomValidationMessage('Firstname' is required.)
Line 297 of UserDefinedForm.php
* UserDefinedForm_Controller->Form()
Line 253 of UserDefinedForm.php
* UserDefinedForm_Controller->index(HTTPRequest)
Line 162 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 28 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/contact-us/)
Line 115 of main.php
2. On the CMS side, there is a new tab called "Recipients", which I assume is where submissions from the form are sent. (Even though it doesn't state anywhere on the tab exactly what it's for). When trying to add a recipient, I get this:
[Warning] HTMLEditorField should save into an HTMLText or HTMLVarchar field. If you don't, your template won't display properly. This changed in version 2.2.2, so please update your database field 'EmailBody'
POST /admin/EditForm/field/EmailRecipients/AddForm
Line 98 in C:\wamp\www\viva_exp_2.3\sapphire\forms\HtmlEditorField.php
Source
89 }
90
91 function saveInto($record) {
92 if($record->escapeTypeForField($this->name) != 'xml') {
93 user_error("HTMLEditorField should save into an HTMLText or HTMLVarchar field.
94 If you don't, your template won't display properly.
95 This changed in version 2.2.2, so please update
96 your database field '$this->name'",
97 E_USER_WARNING
98 );
99 }
100
101 $content = $this->value;
102
103 $content = preg_replace('/mce_real_src="[^"]+"/i', "", $content);
104
Trace
* HTMLEditorField should save into an HTMLText or HTMLVarchar field. If you don't, your template won't display properly. This changed in version 2.2.2, so please update your database field 'EmailBody'
Line 98 of HtmlEditorField.php
* HtmlEditorField->saveInto(UserDefinedForm_EmailRecipient)
Line 850 of Form.php
* Form->saveInto(UserDefinedForm_EmailRecipient)
Line 581 of ComplexTableField.php
* ComplexTableField->saveComplexTableField(Array,ComplexTableField_Popup,HTTPRequest)
Line 228 of Form.php
* Form->httpSubmission(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 121 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 121 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 121 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/admin/EditForm/field/EmailRecipients/AddForm)
Line 115 of main.php
Any ideas anyone?
Cheers
Aaron