Multilingual support for Google Autocomplete
Added multilingual search capability by applying the default country scope to the search query. This ensures that language-specific characters are supported in the search form, making locations with such characters properly searchable.
Improved handling of partial Google Place API responses
When the Location field sends a partial or invalid query to the Google Place API, or when the detected location is too generic, the system now...
XF\PrintableException: Batch install error: Line 35: The function get_entity_name may not be called in a template.
Only functions with whitelisted prefixes are allowed. - Template name: admin:allf_area_list - src/XF/Mvc/Entity/Entity.php:1276
Stack Trace
#0 src/XF/AddOn/DataType/Template.php(98): XF\Mvc\Entity\Entity->save(true, false)
#1 src/XF/Job/AddOnData.php(111): XF\AddOn\DataType\Template->importAddOnData('AL/LocationFiel...', Object(SimpleXMLElement), 0, 7.99841)
#2 src/XF/Job/AddOnInstallBatch.php(343): XF\Job\AddOnData->run(7.99841)
#3 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepData(Object(XF\Timer))
#4 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#5 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#6 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#7 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#8 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Wutime\AdBlockTracker\XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Wutime\AdBlockTracker\XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2824): XF\Mvc\Dispatcher->run()
#13 src/XF.php(806): XF\App->run()
#14 admin.php(15): XF::runApp('XF\\Admin\\App')
#15 {main}
When the Location field sends a partial or invalid query to the Google Place API, or when the detected location is too generic, the system now returns the error: “Address is not precise enough.”
When trying to update from 2.0.3 to 2.0.5 on my staging server:
Code:XF\PrintableException: Batch install error: Line 35: The function get_entity_name may not be called in a template. Only functions with whitelisted prefixes are allowed. - Template name: admin:allf_area_list - src/XF/Mvc/Entity/Entity.php:1276 Stack Trace #0 src/XF/AddOn/DataType/Template.php(98): XF\Mvc\Entity\Entity->save(true, false) #1 src/XF/Job/AddOnData.php(111): XF\AddOn\DataType\Template->importAddOnData('AL/LocationFiel...', Object(SimpleXMLElement), 0, 7.99841) #2 src/XF/Job/AddOnInstallBatch.php(343): XF\Job\AddOnData->run(7.99841) #3 src/XF/Job/AddOnInstallBatch.php(99): XF\Job\AddOnInstallBatch->stepData(Object(XF\Timer)) #4 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8) #5 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8) #6 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8) #7 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8) #8 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag)) #9 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(Wutime\AdBlockTracker\XF\Admin\Controller\Tools), NULL) #10 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(Wutime\AdBlockTracker\XF\Admin\Controller\Tools), NULL) #11 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch)) #12 src/XF/App.php(2824): XF\Mvc\Dispatcher->run() #13 src/XF.php(806): XF\App->run() #14 admin.php(15): XF::runApp('XF\\Admin\\App') #15 {main}
We have reproduced this issue with our automated tests, so there is no specific use case reported by customers, but Google changed how it replies in the case when a non-existing street is requested for a country. Now we handle it better, so invalid addresses should reported as non-exising, instead of converting into a country (using address approximation),When the Location field sends a partial or invalid query to the Google Place API, or when the detected location is too generic, the system now returns the error: “Address is not precise enough.”
A new method - getEntityNameLowerCase has been added to address the template error - get_entity_name not available.
This issue is related to a XenForo bug reported at https://xenforo.com/community/threads/breaking-change-in-xenforo-2-3-7-in-getter-syntax.232161/ that will be resolved in version 2.3.8.
Meanwhile, please apply this package and install the latest version of the affected add-on to resolve the error.
I get the following error every time I attempt to enter a value for the Google Places API Key.
"[E_WARNING] Undefined array key 0"
This release fixes an error logged in the server errors in case there is an error in API response (e.g. invalid API key).
location-form-xf23.js?_v=7730ce9d:141 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'cloneNode')
at b.initLocationForm (location-form-xf23.js?_v=7730ce9d:141:87)
at b.init (location-form-xf23.js?_v=7730ce9d:96:22)
at c (core-compiled.js?_v=7730ce9d:193:444)
at b (core-compiled.js?_v=7730ce9d:194:141)
at NodeList.forEach (<anonymous>)
at Object.initialize (core-compiled.js?_v=7730ce9d:195:205)
at Object.activate (core-compiled.js?_v=7730ce9d:44:468)
at message.min.js?_v=7730ce9d:5:189
at core-compiled.js?_v=7730ce9d:50:53
at core-compiled.js?_v=7730ce9d:107:26
initLocationForm @ location-form-xf23.js?_v=7730ce9d:141
init @ location-form-xf23.js?_v=7730ce9d:96
c @ core-compiled.js?_v=7730ce9d:193
b @ core-compiled.js?_v=7730ce9d:194
initialize @ core-compiled.js?_v=7730ce9d:195
activate @ core-compiled.js?_v=7730ce9d:44
(anonymous) @ message.min.js?_v=7730ce9d:5
(anonymous) @ core-compiled.js?_v=7730ce9d:50
(anonymous) @ core-compiled.js?_v=7730ce9d:107
Promise.then
b @ core-compiled.js?_v=7730ce9d:106
setupHtmlInsert @ core-compiled.js?_v=7730ce9d:48
handleAjax @ message.min.js?_v=7730ce9d:5
l @ core-compiled.js?_v=7730ce9d:38
ajax @ core-compiled.js?_v=7730ce9d:41
await in ajax
click @ message.min.js?_v=7730ce9d:4
_onEvent @ core-compiled.js?_v=7730ce9d:190
a @ core-compiled.js?_v=7730ce9d:188
(anonymous) @ core-compiled.js?_v=7730ce9d:192
ErrorException: [E_WARNING] Undefined array key 0 in src/addons/AL/LocationField/Service/Data.php at line 110
[LIST=1]
[*]XF::handlePhpError() in src/addons/AL/LocationField/Service/Data.php at line 110
[*]AL\LocationField\Service\Data->getAvailableCityList() in src/addons/AL/LocationField/XF/Pub/Controller/Misc.php at line 37
[*]AL\LocationField\XF\Pub\Controller\Misc->actionLocationFieldLoadList() in src/XF/Mvc/Dispatcher.php at line 362
[*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
[*]XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
[*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
[*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2824
[*]XF\App->run() in src/XF.php at line 806
[*]XF::runApp() in index.php at line 23
[/LIST]
I am having difficulties to get this addon to work, I am not using the Google APIs and instead I'm using the country/area/city lists. I have experienced three problems:
1. When the country/area/city are configured to obtain the lists from the database, I cannot press the "edit" button which expands the UI to edit a post, the console shows an error:
Code:location-form-xf23.js?_v=7730ce9d:141 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'cloneNode') at b.initLocationForm (location-form-xf23.js?_v=7730ce9d:141:87) at b.init (location-form-xf23.js?_v=7730ce9d:96:22) at c (core-compiled.js?_v=7730ce9d:193:444) at b (core-compiled.js?_v=7730ce9d:194:141) at NodeList.forEach (<anonymous>) at Object.initialize (core-compiled.js?_v=7730ce9d:195:205) at Object.activate (core-compiled.js?_v=7730ce9d:44:468) at message.min.js?_v=7730ce9d:5:189 at core-compiled.js?_v=7730ce9d:50:53 at core-compiled.js?_v=7730ce9d:107:26 initLocationForm @ location-form-xf23.js?_v=7730ce9d:141 init @ location-form-xf23.js?_v=7730ce9d:96 c @ core-compiled.js?_v=7730ce9d:193 b @ core-compiled.js?_v=7730ce9d:194 initialize @ core-compiled.js?_v=7730ce9d:195 activate @ core-compiled.js?_v=7730ce9d:44 (anonymous) @ message.min.js?_v=7730ce9d:5 (anonymous) @ core-compiled.js?_v=7730ce9d:50 (anonymous) @ core-compiled.js?_v=7730ce9d:107 Promise.then b @ core-compiled.js?_v=7730ce9d:106 setupHtmlInsert @ core-compiled.js?_v=7730ce9d:48 handleAjax @ message.min.js?_v=7730ce9d:5 l @ core-compiled.js?_v=7730ce9d:38 ajax @ core-compiled.js?_v=7730ce9d:41 await in ajax click @ message.min.js?_v=7730ce9d:4 _onEvent @ core-compiled.js?_v=7730ce9d:190 a @ core-compiled.js?_v=7730ce9d:188 (anonymous) @ core-compiled.js?_v=7730ce9d:192
2. If I go to the edit URL directly, the addon mostly works and the dropdowns are updated according to the selected country/region. However, there are some countries that returns an error. I haven't made an exhaustive investigation but it fails if I select "Cocos Islands":
Code:ErrorException: [E_WARNING] Undefined array key 0 in src/addons/AL/LocationField/Service/Data.php at line 110 [LIST=1] [*]XF::handlePhpError() in src/addons/AL/LocationField/Service/Data.php at line 110 [*]AL\LocationField\Service\Data->getAvailableCityList() in src/addons/AL/LocationField/XF/Pub/Controller/Misc.php at line 37 [*]AL\LocationField\XF\Pub\Controller\Misc->actionLocationFieldLoadList() in src/XF/Mvc/Dispatcher.php at line 362 [*]XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264 [*]XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121 [*]XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63 [*]XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2824 [*]XF\App->run() in src/XF.php at line 806 [*]XF::runApp() in index.php at line 23 [/LIST]
3. But for my particular use case, I do not need to select a country so I configure it to be read only and configured to my particular country. With this configuration, the drop downs are not updated at all so the State/Area dropdown is displayed correctly but the City dropdown is fixed at the cities from the first state in the list and doesn't get udpated when you select new states. This same behavior happens in the filter dropdown in the thread list page.
Any idea how to fix it?
We use essential cookies to make this site work, and optional cookies to enhance your experience.