Skip to content
Snippets Groups Projects
  1. Dec 06, 2019
  2. Nov 18, 2019
    • Alexander Varwijk's avatar
      Issue #3095078 by Kingdutch, ronaldtebrake: Fix coding standards issues for PAReview (#5) · fb3651a6
      Alexander Varwijk authored
      * Make README conform to Drupal guidelines
      
      With the removal of the geocoder plugin you can no longer specify your
      own field. This should probably be a feature request in the future.
      
      * Implement hook_help for all modules
      
      * Fix javascript coding standards errors
      
      * Fix coding standards after PAReview
      
      * Implement DrupalPractice standards
      
      Where they make sense. Only need to implement dependency injection in
      the SocialGeolocationSettings form.
      
      * Implement dependency injection for SocialGeolocationSettings
  3. Oct 17, 2019
  4. Oct 16, 2019
    • Alexander Varwijk's avatar
      Fix Canada postal_code workaround · 39882ab3
      Alexander Varwijk authored
      The `$address->get` returns a `TypedData` reference. This is actually a
      class that has a reference to the value. When the value of the
      `$address` field is changed then so does the value of the `TypedData`
      object.
      
      Additionally when trying to return the value from `''` to its original
      value an error occurs. `TypedData` objects can not be converted to
      strings directly but `->getValue()` should be called.
      
      The fix is to retrieve a string value using `getValue()` from the typed
      data. This does not change and can be properly passed to `set` on the
      `$address` field when we're done with geocoding.
    • Alexander Varwijk's avatar
      Remove configuration from module install hook · c3a45f10
      Alexander Varwijk authored
      A default configuration file is now shipped and the values set by the
      install hook were outdated.
    • Alexander Varwijk's avatar
      Fix location details logic for content search · e912ead2
      Alexander Varwijk authored
      A micro-optimisation turned out to break things (changing `$form['#id']`
      to `$form_id` does not give the same results). This has been reverted.
      
      Additionally the splitting of geolocation field attachment can cause no
      field to be attached but page specific logic to still run. A check is
      added to see if the field exists before adding state configuration.
  5. Oct 15, 2019
    • Alexander Varwijk's avatar
      Decleare search_api_location as composer dependency · ac84692a
      Alexander Varwijk authored
      The module is used to provide the data type for indexing location date
      in the SOLR back-end so it's definitely required.
    • Alexander Varwijk's avatar
      Revert "Remove search_api_location dependency" · f6750541
      Alexander Varwijk authored
      This reverts commit 89dedc04.
      
      The search_api_location module is required because it adds the location
      data type that used to index location data in the SOLR backend.
    • Alexander Varwijk's avatar
      Merge branch '8.x-1.x' into feature/TB-3157-support-solr · b33cf07c
      Alexander Varwijk authored
      Removes the Geocoder plugin that is no longer used. The fix that was
      made in that plugin has been moved to the new code on the
      feature/TB-3157-support-solr branch.
    • Alexander Varwijk's avatar
      Add a default settings file for social_geolocation · fb724efe
      Alexander Varwijk authored
      There was no default settings file. This caused no geocoder to be
      configured. By adding a default settings file the location based
      filtering will now work out of the box.
      
      Fixes issue #3050523
    • Alexander Varwijk's avatar
      Add new dependencies to composer · b9f7c344
      Alexander Varwijk authored
      The Social Geolocation module will fail without the address module
      present because we use classes from it. Additionally if the address
      module ever removes the CommerceGuys/Addressing library then our module
      will also break so we depend on it directly.
      
      The geocoder module is not yet removed from the composer.json because
      that may cause it to be removed from platforms without being uninstalled
      in Drupal.
    • Alexander Varwijk's avatar
      Remove search_api_location dependency · 89dedc04
      Alexander Varwijk authored
      In a previous commit it was thought that this module was needed.
      However, it turned out that the used functionality is in the
      search_api_solr back-end and not the search_api_location module.
    • Alexander Varwijk's avatar
      Remove geocoder dump configuration for address fields · 98594146
      Alexander Varwijk authored
      Although the geocoder module can not be uninstalled because it may be
      depended on by others, the configuration for the geocoding of Open
      Social address field is removed. This geocoding is now handled by the
      social_geolocation module using the geolocation module.
      
      The post_update hook that adds the configuration is also removed as it
      is no longer needed. The post_update hook that removes the configuration
      should have no effect if the configuration isn't there because it's safe
      to call `unset` on non-existant values.
    • Alexander Varwijk's avatar
      Separate form handling for search and people overview · fa7d2827
      Alexander Varwijk authored
      The people overview can work without search back-end so the logic for
      altering the forms is split among the modules. The common logic for
      adding things to the forms is extracted to a shared function and cleaned
      up slightly.
      
      The container type for the location filter is made configurable because
      it should be a fieldset on the people overview and a details panel on
      the search page. This fixes a visual bug that currently exists on the
      people overview.
    • Alexander Varwijk's avatar
      Remove empty update hooks · d6daa3f8
      Alexander Varwijk authored
      The update hooks are no longer used. Drupal doesn't actually need update
      hooks to exist in order and will automatically pick up the next highest
      number. If an update hook no longer needs to run then it's safe to
      remove.
      
      The next update hook does still need to be 8004 because it will still
      need to execute on platforms that may have already ran 8003.
    • Alexander Varwijk's avatar
      Move query alter hook to views logic · 4cc10e47
      Alexander Varwijk authored
      The solr_query_alter hook is triggered too late in the search processing
      which causes search_api_location options not to be applied. To resolve
      this we hook into the views query altering which runs before the query
      is handed to the API. By checking whether the query will be handled by
      the Search API SOLR backend we achieve the same behavior.
  6. Oct 14, 2019
    • Alexander Varwijk's avatar
      Fix Canada inconsistency with Postalcodes for Nominatim · cfce6361
      Alexander Varwijk authored
      This re-introduces a fix that was previously done in Issue #3086891 to
      fix an inaccuracy with Nominatim that can lead to problems for Canadian
      Postal codes. The issue is explained here: https://www.openstreetmap.org/user/lonvia/diary/43143
      
      This fix was done in the Address Preprocessor which was removed because
      Geocoder is no longer used.
      
      Fixes #3086891
      Fixes #3086892
    • Alexander Varwijk's avatar
      Use AddressFormatter in address to string conversion · e2b23178
      Alexander Varwijk authored
      The logic in `_social_geolocation_address_to_string` is changed so use
      the `DefaultFormatter` of the CommerceGuys/Addressing library. This
      formatter takes the locale of the country of the address into account to
      create a properly formatted address string.
      
      This fixes an issue caused by Nominatim and Google interpreting
      addresses from left to right by default expecting the country to be last
      for Western countries.
      
      Two examples that can be used in testing:
      
      'Netherlands, Enschede' will geocode to an address in the United States
      for a city called Netherlands. 'Enschede, Netherlands' will correctly
      geocode to the city of Enschede in The Netherlands.
      
      Both '4 Magnolia Ave., Santa Ana, CA, United States' and 'United States,
      CA, Santa Ana, 4 Magnolia Ave.' will geocode correctly to the
      corresponding address with the Google Geocoding API. However, using
      Nominatim. only the former will result in a correctly geocoded address
      and the country first format returns no results.
      
      Using the formatter from this library also ensures that postal codes are
      formatted correctly as the position of a postal code in an address
      varies widely between countries and can lead to incorrect geocoding.
    • Alexander Varwijk's avatar
      Remove obsolete Geocoder processor · 694bc755
      Alexander Varwijk authored
      This processor was used to fix geocoding with the geocoder module.
      However, this module is no longer used so this Preprocessor is no longer
      needed.
    • Alexander Varwijk's avatar
      Fix the configurability of the used geocoder · 4fa5af3a
      Alexander Varwijk authored
      A configuration screen already existed to configure which geocoder
      plugin should be used. However, this wasn't actually wired up to affect
      any behaviour. The configuration is now used when loading the geocoding
      and the keys of the configuration values have been chosen so that they
      load the correct plugins.
      
      Configuration options are now only added to the form if the plugin for
      that option is enabled. This should help developers identify issues
      where the correct module was not yet enabled.
    • Alexander Varwijk's avatar
      Fix actual geocoding functionality · 9b83dad4
      Alexander Varwijk authored
      The geolocation module doesn't do any geocoding on its own unless you're
      using the Google Maps widget. However, we want to use the Address field
      instead. As the Geocoder module has been eliminated there is now no
      geolocation being done at all.
      
      This commit reintroduces the logic that existed in the original version
      of the geolocation module to perform the geolocation for our supported
      entities.
      
      Additionally this commit starts using the configuration that exists to
      switch between different geocoder modules.
      
      Finally a site_manager_assist check is added to the configuration. This
      restores previously removed configuration that was used in some
      Enterprise sites while maintaining the simpler silent-fail as used on
      most SaaS sites.
  7. Oct 10, 2019
    • Alexander Varwijk's avatar
      Introduce Social Geolocation Search module · 6d63aa5f
      Alexander Varwijk authored
      The Social Geolocation Search module is introduced to hold the
      configuration and alter hooks for supporting search in the Social
      Geolocation module. Since the `search_api_location` module is required
      for this to work it's better to move this into a 'connector' module
      than to force users of the geolocation module to also have search
      enabled.
      
      This commit also adds the alter hook that makes geolocation search work
      with SOLR. It's easier to keep an alter hook for each back-end than it
      is to find a unified solution that works with both.
      
      Some configuration changes have been made in how the geolocation module
      interacts with the address field which causes the actual geocoding to
      break.
    • Alexander Varwijk's avatar
      Remove geocoder dependency · 66d9b1cc
      Alexander Varwijk authored
      The geocoder and geolocation module have a lot of overlap and using them
      interchangeable can cause issues. The geolocation module has all the
      features we need and is required for the Social Geolocation Maps module
      to work, as well as helping us implement easier Search support in the
      future. Therefor the Geocoder module is removed as a dependency so that
      we reduce the total number of dependencies on sites using this module.
  8. Oct 09, 2019
  9. Oct 07, 2019
  10. Sep 30, 2019
  11. Sep 25, 2019
  12. Sep 17, 2019
  13. Sep 16, 2019
  14. Jul 16, 2019
  15. May 16, 2019
  16. May 14, 2019
Loading