Location custom field by AddonsLab

Location custom field by AddonsLab [Paid] 1.8.3

No permission to buy ($39.99)
Error during upgrade:
"Exception: xf_allf_google_place_cache: MySQL query error [1071]: Specified key was too long; max key length is 767 bytes"
FYI, this also breaks the "Thread Filter" plugin when the install fails.
 
You may want to care for this situation:

1. Users should choose country, area and city! All three fields are needed!

2. While searching it should be possible to search for
  • country,
  • country and area
  • country, area and city

I have tried to make this possible, but now i get a lot of errors for not set
  • Undefined index: city_id
  • src/addons/AL/FilterFramework/Field/LocationField.php:103

The search form should have an option for "all" at the top of area and city.
And the script should be ok with that.
 
AddonsLab updated Location custom field by AddonsLab with a new update entry:

Short state code in Full address formatting options

In this release, we have implemented one new option called {shortState} - Short state in the Options for location fields Full address format. State option shows full state name and this option will show it using the 2-digit state code.

The new version is available for all licensed customers at https://customers.addonslab.com/marketplace.php/my-services/

Thank you!

Read the rest of this update entry...
 
Hello
I get this error message when I try to create a topic.
PHP version 7.2.34

Code:
ErrorException: [E_WARNING] Use of undefined constant JSON_THROW_ON_ERROR - assumed 'JSON_THROW_ON_ERROR' (this will throw an Error in a future version of PHP) in src/addons/AL/LocationField/Service/DataValidator.php at line 34
XF::handlePhpError() in src/addons/AL/LocationField/Service/DataValidator.php at line 34
AL\LocationField\Service\DataValidator->validate() in src/addons/AL/LocationField/XF/CustomField/Definition.php at line 45
AL\LocationField\XF\CustomField\Definition->_validateFieldTypeLocation() in src/XF/CustomField/Definition.php at line 217
XF\CustomField\Definition->isValid() in src/XF/CustomField/Set.php at line 200
XF\CustomField\Set->set() in src/addons/AL/LocationField/EnhancedSet.php at line 35
AL\LocationField\EnhancedSet->set() in src/XF/CustomField/Set.php at line 105
XF\CustomField\Set->bulkSet() in src/XF/Service/Thread/Creator.php at line 394
XF\Service\Thread\Creator->setCustomFields() in src/XF/Pub/Controller/Forum.php at line 697
XF\Pub\Controller\Forum->setupThreadCreate() in src/XF/Pub/Controller/Forum.php at line 874
XF\Pub\Controller\Forum->actionPostThread() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2344
XF\App->run() in src/XF.php at line 512
XF::runApp() in index.php at line 20
 
I tried to reinstall everything and deactivated the forum beforehand.
Now, when I enter the license key and the Google API ID, I get this error message in the control panel.

Code:
ErrorException: [E_WARNING] Use of undefined constant JSON_THROW_ON_ERROR - assumed 'JSON_THROW_ON_ERROR' (this will throw an Error in a future version of PHP) in src/addons/AL/LocationField/Service/GeoCoder.php at line 148
XF::handlePhpError() in src/addons/AL/LocationField/Service/GeoCoder.php at line 148
AL\LocationField\Service\GeoCoder->_persistApiResultsData() in src/addons/AL/LocationField/Service/GeoCoder.php at line 116
AL\LocationField\Service\GeoCoder->getAddressInformation() in src/addons/AL/LocationField/OptionValidator.php at line 17
AL\LocationField\OptionValidator::validateApiKey()
call_user_func_array() in src/XF/Entity/Option.php at line 206
XF\Entity\Option->verifyOptionValue() in src/XF/Mvc/Entity/Entity.php at line 787
XF\Mvc\Entity\Entity->_verifyValueCustom() in src/XF/Mvc/Entity/Entity.php at line 632
XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 567
XF\Mvc\Entity\Entity->__set() in src/XF/Repository/Option.php at line 114
XF\Repository\Option->updateOptions() in src/XF/Admin/Controller/Option.php at line 82
XF\Admin\Controller\Option->actionUpdate() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2344
XF\App->run() in src/XF.php at line 512
XF::runApp() in admin.php at line 13
 
Hi there, well. It looks like the addon is working properly now.
Thank you for your efforts.

What else I noticed.
When entering the location with Google Autocomplete, the order of the street and house number is correct.
But then the topic is mixed up.

(20) [verkauft] - Test des Artikel Standortes | TX-Board - das T5 : T6 : T7 Forum 2021-09-11 1...png(20) [verkauft] - Test des Artikel Standortes | TX-Board - das T5 : T6 : T7 Forum 2021-09-11 1...png
At least in German-speaking countries, the street is then the house number.
 
Last edited:
I would like to display the Location Custom Field via a template modification in the template post_macros. This also works with other custom fields, such as {$ thread.custom_fields.textfild}. With the Location Custom Field the output is only "Array". What do I have to enter for it to work. Would be grateful for help.
 
I would like to display the Location Custom Field via a template modification in the template post_macros. This also works with other custom fields, such as {$ thread.custom_fields.textfild}. With the Location Custom Field the output is only "Array". What do I have to enter for it to work. Would be grateful for help.

You can show the value using the appropriate macro:

HTML:
<xf:macro
    template="allf_custom_fields_macros"
    name="filter_value_location"
    arg-info="{$field_value_here}"
    />

We will address the issue you have highlighted in your previous post and will inform you soon.

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

New formatting options for the building number and street name

In this release, we have implemented two new formatting placeholders - {streetName} and {buildingNumber} in the Options for location fields Full address format.
Those placeholders allow admins to set order of street name and building number independent of each other, as our existing placeholder {streetAddress} shows the building number and street name together.

The new version is available for all licensed customers at https://customers.addonslab.com/marketplace.php/my-services/...

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

Bug-fix: Call to protected AddonsLab\Core\Xf2\Admin\EntityConfig::__construct()

This release fixes a PHP error related to update in the [AL] Core package:
Error: Call to protected AddonsLab\Core\Xf2\Admin\EntityConfig::__construct() from scope AL\LocationField\App src/addons/AL/LocationField/App.php:20

The new version is available for all licensed customers at https://customers.addonslab.com/marketplace.php/my-services/

Thank you!

Read the rest of this update entry...
 
One big limitation of this for my purposes is that the list of cities only includes incorporated cities and not other municipal units. Ideally this list should include not only cities, but also towns and counties. For example, I'd expect the list to include "City of Boston", "Town of Shutesbury", and "County of Franklin." These are all meaningful administrative units but City of Boston is the only one on this list that appears in the add-on's list of cities.
 
I have an issue with the Google API autocomplete and range-based search feature that I wanted to inquire with the community about. The problem is that if I have two custom location fields filled in using autocomplete and one has the value "San Diego, CA" and the other has value "United States", the location filter doesn't work the way you'd expect for these two fields.

For example, based on these two fields, if I search for threads within 1 mile of San Diego, CA, you'd think that the "United States" thread would show up in the results in addition to the "San Diego" thread but that's not the case...only the "San Diego" thread shows up. In other words, for larger city/state/country boundaries that encompass smaller towns/cities, why don't those larger boundaries always show up when searching for threads related to the smaller unit?

Is there a fix for this? I'd like users to be able to enter their address, for example, and have all threads associated with cities, counties, states, etc., in which that address is located, show up in the results. Does Google autocomplete/range search have this capability?
 
I'm wondering if this addon is still in development and I'm interested in developing one similar if it isn't. Mine would need to find members that are within a certain proximity of a US zipcode. City/State would also be ideal but not necessary. This would be a directory of sorts and I haven't seen anyone do this, except in XF 1.x.
 
Top Bottom