Location custom field by AddonsLab

Location custom field by AddonsLab [Paid] 2.3.0

No permission to buy ($39.99)
Discovered with a new install of Bob's CAS addon. Entered an ID, the field title and then hitting "save"...nothing more...have tried a dozen combinations and all result in an error.

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: [URL='https://forum.ih8mud.com/admin.php?users/woody.1720/edit']woody[/URL]
[*]May 14, 2026 at 1:16 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO [ICODE]xf_xa_cas_ad_field[/ICODE] ([ICODE]display_group[/ICODE], [ICODE]display_order[/ICODE], [ICODE]field_type[/ICODE], [ICODE]field_choices[/ICODE], [ICODE]max_length[/ICODE], [ICODE]required[/ICODE], [ICODE]display_template[/ICODE], [ICODE]wrapper_template[/ICODE], [ICODE]field_id[/ICODE], [ICODE]match_type[/ICODE], [ICODE]editable_user_group_ids[/ICODE], [ICODE]match_params[/ICODE], [ICODE]hide_title[/ICODE], [ICODE]display_on_list[/ICODE], [ICODE]display_on_tab[/ICODE], [ICODE]display_on_tab_field_id[/ICODE], [ICODE]location_options[/ICODE]) 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://forumname.com/admin.php?xa-cas/ad-fields/add"
  ["_GET"] => array(1) {
    ["xa-cas/ad-fields/save"] => string(0) ""
  }
  ["_POST"] => array(19) {
    ["_xfToken"] => string(8) "********"
    ["field_id"] => string(5) "color"
    ["title"] => string(5) "Color"
    ["description"] => string(0) ""
    ["display_group"] => string(6) "header"
    ["display_order"] => string(1) "1"
    ["category_ids"] => array(1) {
      [0] => string(0) ""
    }
    ["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"
  }
}

[/code
 
Discovered with a new install of Bob's CAS addon. Entered an ID, the field title and then hitting "save"...nothing more...have tried a dozen combinations and all result in an error.

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: [URL='https://forum.ih8mud.com/admin.php?users/woody.1720/edit']woody[/URL]
[*]May 14, 2026 at 1:16 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
INSERT  INTO [ICODE]xf_xa_cas_ad_field[/ICODE] ([ICODE]display_group[/ICODE], [ICODE]display_order[/ICODE], [ICODE]field_type[/ICODE], [ICODE]field_choices[/ICODE], [ICODE]max_length[/ICODE], [ICODE]required[/ICODE], [ICODE]display_template[/ICODE], [ICODE]wrapper_template[/ICODE], [ICODE]field_id[/ICODE], [ICODE]match_type[/ICODE], [ICODE]editable_user_group_ids[/ICODE], [ICODE]match_params[/ICODE], [ICODE]hide_title[/ICODE], [ICODE]display_on_list[/ICODE], [ICODE]display_on_tab[/ICODE], [ICODE]display_on_tab_field_id[/ICODE], [ICODE]location_options[/ICODE]) 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://forumname.com/admin.php?xa-cas/ad-fields/add"
  ["_GET"] => array(1) {
    ["xa-cas/ad-fields/save"] => string(0) ""
  }
  ["_POST"] => array(19) {
    ["_xfToken"] => string(8) "********"
    ["field_id"] => string(5) "color"
    ["title"] => string(5) "Color"
    ["description"] => string(0) ""
    ["display_group"] => string(6) "header"
    ["display_order"] => string(1) "1"
    ["category_ids"] => array(1) {
      [0] => string(0) ""
    }
    ["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"
  }
}

[/code

Thank you for the report, we will check this and release a fix soon.

Thank you!
 
@woody the issue seems to be caused by order of installation of add-ons - Location field was already installed when CAS filter was installed, and the setup code from the location field did not run to alter the tables of the CAS add-on. A patch is sent to you via DM, we will release the fix soon with some other changes.

Thank you!
 
AddonsLab updated Location custom field by AddonsLab with a new update entry:

Feature-update: XenForo 2.3 support, smarter geocoding, and display template fixes

Display templates now show your formatted values correctly
Custom display templates now render the right variable-based content — including the field's title and description. Fields no longer appear blank when an address format can't be built.

More reliable geocoding
Temporary geocoding failures (for example, a misconfigured Google Maps key) no longer get cached for a long time. They're now retried within minutes and recover automatically once the underlying issue is fixed.

Full XenForo...

Read the rest of this update entry...
 
AddonsLab updated Location custom field by AddonsLab with a new update entry:

Value display HTML support and clickable map links

Full support for HTML in "Value display HTML"

In this release, we have fully enabled the standard "Value display HTML" field for location fields. Any HTML entered there now renders exactly as written on the front end — just like every default XenForo custom field. This lets you make the address a clickable link to any map provider of your choice (Google Maps, Yandex, Bing, OpenStreetMap, and so on), or display any other custom markup you need.

Previously, "Value display HTML" did...

Read the rest of this update entry...
 
Back
Top Bottom