• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Getting an error when creating trophies

Liam23

Active member
#1
:(
I get this error when I click Create New Trophy

Code:
Server Error
 
Undefined index: field_type
 
XenForo_Application::handlePhpError() in XenForo/Model/UserField.php at line 157
XenForo_Model_UserField->prepareUserField() in XenForo/Model/UserField.php at line 208
XenForo_Model_UserField->prepareUserFields() in XenForo/Helper/Criteria.php at line 664
XenForo_Helper_Criteria::getUserFields() in XenForo/Helper/Criteria.php at line 612
XenForo_Helper_Criteria::getDataForUserCriteriaSelection() in XenForo/ControllerAdmin/Trophy.php at line 47
XenForo_ControllerAdmin_Trophy->_getTrophyAddEditResponse() in XenForo/ControllerAdmin/Trophy.php at line 60
XenForo_ControllerAdmin_Trophy->actionAdd() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/beinggin/public_html/admin.php at line 13
 

Liam23

Active member
#4
With custom user field criteria I assume?

Does the field_type column exist in your xf_user_field table in the database?
:(
I get this error when I click Create New Trophy

Code:
Server Error
 
Undefined index: field_type
 
XenForo_Application::handlePhpError() in XenForo/Model/UserField.php at line 157
XenForo_Model_UserField->prepareUserField() in XenForo/Model/UserField.php at line 208
XenForo_Model_UserField->prepareUserFields() in XenForo/Helper/Criteria.php at line 664
XenForo_Helper_Criteria::getUserFields() in XenForo/Helper/Criteria.php at line 612
XenForo_Helper_Criteria::getDataForUserCriteriaSelection() in XenForo/ControllerAdmin/Trophy.php at line 47
XenForo_ControllerAdmin_Trophy->_getTrophyAddEditResponse() in XenForo/ControllerAdmin/Trophy.php at line 60
XenForo_ControllerAdmin_Trophy->actionAdd() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/beinggin/public_html/admin.php at line 13
Also when I click a users profile I get this error
Code:
Server Error
Undefined index: field_type
XenForo_Application::handlePhpError() in XenForo/Model/UserField.php at line 157
XenForo_Model_UserField->prepareUserField() in XenForo/Model/UserField.php at line 208
XenForo_Model_UserField->prepareUserFields() in XenForo/ControllerPublic/Member.php at line 184
XenForo_ControllerPublic_Member->actionMember() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/beinggin/public_html/index.php at line 13
 

Jake Bunce

XenForo moderator
Staff member
#10
No it's not. I just checked and the column is missing in your database. I manually recreated it with this query:

Code:
ALTER TABLE xf_user_field
ADD COLUMN field_type ENUM('textbox','textarea','select','radio','checkbox','multiselect') NOT NULL DEFAULT 'textbox'
AFTER display_order;
You will need to set the correct field_type for each field now that the column has been recreated.
 

Liam23

Active member
#11
No it's not. I just checked and the column is missing in your database. I manually recreated it with this query:

Code:
ALTER TABLE xf_user_field
ADD COLUMN field_type ENUM('textbox','textarea','select','radio','checkbox','multiselect') NOT NULL DEFAULT 'textbox'
AFTER display_order;
You will need to set the correct field_type for each field now that the column has been recreated.
WHAT!!!!! IT WAS THERE!!!!

and wait... What do I have to do? :p