• 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.

Add Field error

woody

New Member
CAS Premium
CAS Version
CAS 2.3.9
XenForo Version
XF 2.3.10
PHP Version
PHP 8.4.21
Database & Version
MySQL 10.3.39 (10.3.39-MariaDB-log)
Are there any errors being throw?
Yes
Simply trying to add a new field (I have none yet) and no matter how simply I keep the field info, the following error appears:

Code:
[LIST]
[*]XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'location_options' in 'field list'
[*]src/XF/Db/AbstractStatement.php:225
[*]Generated by: woody
[*]May 14, 2026 at 12:22 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO `xf_xa_cas_ad_field` (`display_group`, `display_order`, `field_type`, `field_choices`, `max_length`, `required`, `display_template`, `wrapper_template`, `field_id`, `match_type`, `editable_user_group_ids`, `match_params`, `hide_title`, `display_on_list`, `display_on_tab`, `display_on_tab_field_id`, `location_options`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(43): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(61): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(219): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1578): XF\Db\AbstractAdapter->insert('xf_xa_cas_ad_fi...', Array, false)
#6 src/XF/Mvc/Entity/Entity.php(1306): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/XF/Mvc/FormAction.php(72): XF\Mvc\Entity\Entity->save(true, false)
#8 src/XF/Mvc/FormAction.php(190): XF\Mvc\FormAction->{closure:XF\Mvc\FormAction::saveEntity():70}(Object(XF\Mvc\FormAction))
#9 src/XF/Admin/Controller/AbstractField.php(193): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\AbstractField->actionSave(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\CAS:A...', 'Save', Object(XF\Mvc\RouteMatch), Object(AL\LocationField\XenAddons\CAS\Admin\Controller\AdField), NULL)
#12 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(AL\LocationField\XenAddons\CAS\Admin\Controller\AdField), NULL)
#13 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#15 src/XF.php(814): XF\App->run()
#16 admin.php(15): XF::runApp('XF\\Admin\\App')
#17 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(32) "/admin.php?xa-cas/ad-fields/save"
  ["referrer"] => string(55) "https://forum.ih8mud.com/admin.php?xa-cas/ad-fields/add"
  ["_GET"] => array(1) {
    ["xa-cas/ad-fields/save"] => string(0) ""
  }
  ["_POST"] => array(20) {
    ["_xfToken"] => string(8) "********"
    ["field_id"] => string(5) "color"
    ["title"] => string(13) "Vehicle Color"
    ["description"] => string(0) ""
    ["display_group"] => string(6) "header"
    ["display_order"] => string(1) "1"
    ["display_on_list"] => string(1) "1"
    ["category_ids"] => array(1) {
      [0] => 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) ""
    }
    ["location_options"] => array(8) {
      ["field_format"] => string(4) "form"
      ["country_field"] => array(4) {
        ["default"] => string(0) ""
        ["display_mode"] => string(6) "select"
        ["highlighted"] => string(0) ""
        ["custom_list"] => string(0) ""
      }
      ["full_address_format"] => string(52) "{streetAddress}, {zipCode} {city} {state}, {country}"
      ["filter_format"] => string(12) "range_search"
      ["state_field"] => array(1) {
        ["mode"] => string(4) "text"
      }
      ["city_field"] => array(1) {
        ["mode"] => string(4) "text"
      }
      ["zip_code_field"] => array(2) {
        ["mode"] => string(4) "text"
        ["regex"] => string(0) ""
      }
      ["street_address_field"] => array(2) {
        ["mode"] => string(4) "text"
        ["regex"] => string(0) ""
      }
    }
    ["editable_user_group"] => string(3) "all"
    ["display_template"] => string(0) ""
    ["wrapper_template"] => string(0) ""
    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(31) "/admin.php?xa-cas/ad-fields/add"
  }
}
 
The error is implying that the field location_options is missing from the xf_xa_cas_ad_field table. Is this local host install or is it a DB that I can access via phpMyAdmin?
 
The error is implying that the field location_options is missing from the xf_xa_cas_ad_field table.
That field is NOT a field that CAS adds to that table. Not sure WHERE that is coming from actually. I don't use that field in ANY of my addons.
 
what does it even do? CAS already has some very nice location (Google Maps) functionality.
agreed. It will be removed once I actually get CAS up and functioning entirely. My current Classifieds is massive (there have been over 50k vehicle for sale Classifieds posted), and building out CAS will take some time.
 
Back
Top