1. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

[resolved] error when adding a field

Discussion in 'Showcase Support' started by electrogypsy, Nov 22, 2018.

  1. electrogypsy

    electrogypsy New Member AMS Premium SC Premium

    XF: 2.0.11
    SC: 3.0.0 RC3

    Not sure if it's because I'm doing something wrong (it's my first time playing with the custom fields) but I get the following error when trying to add a field to a category:

    Administrator log in | Squat the Planet

    Code:
    Server error log
    XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'allow_view_field_owner_in_user_group_ids' in 'field list' src/XF/Db/AbstractStatement.php:212
    Generated by: Matt Derrick Nov 22, 2018 at 12:25 PM
    Stack trace
    INSERT  INTO `xf_xa_sc_item_field` (`display_group`, `display_order`, `field_type`, `field_choices`, `max_length`, `required`, `display_template`, `field_id`, `match_type`, `match_params`, `hide_title`, `is_searchable`, `is_filter_link`, `fs_description`, `display_on_list`, `display_on_tab`, `display_on_tab_field_id`, `allow_use_field_user_group_ids`, `allow_view_field_user_group_ids`, `allow_view_field_owner_in_user_group_ids`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    ------------
    
    #0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
    #1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
    #2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
    #3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
    #4 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
    #5 src/XF/Mvc/Entity/Entity.php(1403): XF\Db\AbstractAdapter->insert('xf_xa_sc_item_f...', Array, false)
    #6 src/XF/Mvc/Entity/Entity.php(1135): XF\Mvc\Entity\Entity->_saveToSource()
    #7 src/XF/Mvc/FormAction.php(69): XF\Mvc\Entity\Entity->save(true, false)
    #8 src/XF/Mvc/FormAction.php(159): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
    #9 src/XF/Admin/Controller/AbstractField.php(188): XF\Mvc\FormAction->run()
    #10 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\AbstractField->actionSave(Object(XF\Mvc\ParameterBag))
    #11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\Showc...', 'Save', 'json', Object(XF\Mvc\ParameterBag), 'xa_scItemFields', Object(XenAddons\Showcase\Admin\Controller\ItemField), NULL)
    #12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
    #13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
    #14 src/XF.php(329): XF\App->run()
    #15 admin.php(13): XF::runApp('XF\\Admin\\App')
    #16 {main}
    Request state
    array(4) {
      ["url"] => string(33) "/admin.php?xa-sc/item-fields/save"
      ["referrer"] => string(58) "https://squattheplanet.com/admin.php?xa-sc/item-fields/add"
      ["_GET"] => array(1) {
        ["xa-sc/item-fields/save"] => string(0) ""
      }
      ["_POST"] => array(16) {
        ["field_id"] => string(17) "infoshop_services"
        ["title"] => string(8) "Services"
        ["description"] => string(39) "What services does this location offer?"
        ["display_group"] => string(6) "header"
        ["display_order"] => string(1) "1"
        ["category_ids"] => array(1) {
          [0] => string(1) "2"
        }
        ["field_type"] => string(8) "checkbox"
        ["match_type"] => string(4) "none"
        ["max_length"] => string(1) "0"
        ["field_choice"] => array(4) {
          [0] => string(11) "zine_making"
          [1] => string(12) "zine_library"
          [2] => string(10) "other_misc"
          [3] => string(0) ""
        }
        ["field_choice_text"] => array(4) {
          [0] => string(11) "Zine Making"
          [1] => string(12) "Zine Library"
          [2] => string(5) "Other"
          [3] => string(0) ""
        }
        ["display_template"] => string(0) ""
        ["_xfToken"] => string(8) "********"
        ["_xfRequestUri"] => string(32) "/admin.php?xa-sc/item-fields/add"
        ["_xfWithData"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
      }
    }
     
  2. electrogypsy

    electrogypsy New Member AMS Premium SC Premium

    here's a screen shot of the field i was trying to add if that helps:

    screenshot-squattheplanet.com-2018.11.22-12-44-17.png
     
  3. Bob

    Bob Developer Staff Member

    The issue is a field that is supposed to be in a table is missing. Is it possible to get DB access via phpMyAdmin or is this a localhost test instance?
     
  4. electrogypsy

    electrogypsy New Member AMS Premium SC Premium

    sure, i pm'ed you my info
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.