Solved Error: Cannot change display location to (Required to upgrade)

Sadiq6210

Licensed
Licensed
User Moods Manager
Required Custom Fields On Upgrade
Change Type Resource
Joined
Aug 26, 2019
Messages
68
Reaction score
29
Hello,

I upgraded the addon from 2.0.1 to 2.0.2
Now I am facing this error if I try to change the (display location) for any exist custom field to (Required to upgrade). Also, I cannot create new fields with display location (Required to upgrade)

1567460030521.png

Code:
XF\Db\Exception: MySQL query error [1265]: Data truncated for column 'display_group' at row 1 src/XF/Db/AbstractStatement.php:217
Generated by: UOB 3 Sep 2019 at 12:34 AM
Stack trace
INSERT  INTO `xf_user_field` (`display_group`, `display_order`, `field_type`, `field_choices`, `max_length`, `required`, `moderator_editable`, `display_template`, `field_id`, `match_type`, `user_editable`, `match_params`, `xs_rcfou_required`, `show_registration`, `viewable_profile`, `viewable_message`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1265, '01000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1265, '01000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1452): XF\Db\AbstractAdapter->insert('xf_user_field', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1184): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Mvc/FormAction.php(69): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Mvc/FormAction.php(187): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/XF/Admin/Controller/AbstractField.php(188): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\AbstractField->actionSave(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:UserField', 'Save', Object(XF\Mvc\RouteMatch), Object(XwhQihCFPSNPkwLNBTbVZHUAnYc5iRYaWz9em9XyJgwVosLWYX7URUBcField), NULL)
#11 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XwhQihCFPSNPkwLNBTbVZHUAnYc5iRYaWz9em9XyJgwVosLWYX7URUBcField), NULL)
#12 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#14 src/XF.php(390): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(40) "/forum/admin.php?custom-user-fields/save"
  ["referrer"] => string(56) "/forum/admin.php?custom-user-fields/add"
  ["_GET"] => array(1) {
    ["custom-user-fields/save"] => string(0) ""
  }
  ["_POST"] => array(18) {
    ["field_id"] => string(5) "testt"
    ["title"] => string(7) "rrrrrrr"
    ["description"] => string(7) "bgdfhgf"
    ["display_group"] => string(15) "requiredupgrade"
    ["display_order"] => string(1) "1"
    ["field_type"] => string(7) "textbox"
    ["match_type"] => string(4) "none"
    ["max_length"] => string(1) "0"
    ["field_choice"] => array(1) {
      [0] => string(0) ""
    }
    ["field_choice_text"] => array(1) {
      [0] => string(0) ""
    }
    ["user_editable"] => string(3) "yes"
    ["moderator_editable"] => string(1) "1"
    ["viewable_profile"] => string(1) "1"
    ["display_template"] => string(0) ""
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(39) "/forum/admin.php?custom-user-fields/add"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Hello,

He must have had an error, could you uninstall it and then reinstall it please ?

Regards, CRUEL-MODZ
 
Hello,
he must have had an error could uninstall it and then reinstall it please?
It was mentioned I must uninstall it if I upgraded from 2.0.0 only, while I already have 2.0.1 so I did direct upgrade

OK I will try to uninstall it and let you know :) Thanks
 
It was mentioned I must uninstall it if I upgraded from 2.0.0 only, while I already have 2.0.1 so I did direct upgrade

OK I will try to uninstall it and let you know :) Thanks
Hello,

Yes it's all your normal thing it's the duration of the installation that must have had an error, for time I tested the installation (and upgrade on all !) several times

Regards, CRUEL-MODZ
 
Last edited:
I reinstalled and the error fixed :) Thanks

Another question, why there are 2 options to select (Required to upgrade)?

1567461689021.png

I noticed that I must select both of them or the addon will not work.
 
Hello,

Yes there are two options because when you buy something it asks you for a ta of fields, but all it is not necessarily mandatory it is for this reason that there are two fields, the Admins can propose a field without making it mandatory ;)

Regards, CRUEL-MODZ
 
Hello,

Yes there are two options because when you buy something it asks you for a ta of fields, but all it is not necessarily mandatory it is for this reason that there are two fields, the Admins can propose a field without making it mandatory ;)

Regards, CRUEL-MODZ

I see, it makes sense :) Thanks for the great update
 
Back
Top Bottom