Problem/Motivation

Heartened to see it was getting geocode data from IPs, was expecting to be filing an issue asking for documentation/support on how to know if the Maxmind database, GeoLite2-City.mmdb, was indeed placed such that it could be successfully used. That was the fortunately. But unfortunately:

drush visitors:rebuild:location
There are 1 locations to process.
 1/1 [============================] 100% < 1 sec/< 1 sec 40.5 MiB
In ExceptionHandler.php line 56:
                                                                                                                                                                                                                                                            
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'location_postal_code' in 'field list': UPDATE "visitors" SET "location_continent_code"=:db_update_placeholder_0, "location_country_code"=:db_update_placeholder_1, "location_country_name"=:db_u  
  pdate_placeholder_2, "location_region"=:db_update_placeholder_3, "location_city"=:db_update_placeholder_4, "location_postal_code"=:db_update_placeholder_5, "location_latitude"=:db_update_placeholder_6, "location_longitude"=:db_update_placeholder_7,  
   "location_area_code"=:db_update_placeholder_8                                                                                                                                                                                                            
  WHERE ("visitors_ip" = :db_condition_placeholder_0) AND ("location_latitude" IS NULL); Array                                                                                                                                                              
  (                                                                                                                                                                                                                                                         
      [:db_update_placeholder_0] => NA                                                                                                                                                                                                                      
      [:db_update_placeholder_1] => US                                                                                                                                                                                                                      
      [:db_update_placeholder_2] => United States                                                                                                                                                                                                           
      [:db_update_placeholder_3] => MA                                                                                                                                                                                                                      
      [:db_update_placeholder_4] => Natick                                                                                                                                                                                                                  
      [:db_update_placeholder_5] => 01760                                                                                                                                                                                                                   
      [:db_update_placeholder_6] => 42.2878                                                                                                                                                                                                                 
      [:db_update_placeholder_7] => -71.3587                                                                                                                                                                                                                
      [:db_update_placeholder_8] => 506                                                                                                                                                                                                                     
      [:db_condition_placeholder_0] => 209.6.29.9                                                                                                                                                                                                           
  )                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                            
In StatementWrapperIterator.php line 111:
                                                                                                 
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'location_postal_code' in 'field list'  

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork visitors-3452867

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mlncn created an issue. See original summary.

bluegeek9’s picture

Thank you for reporting the bug. The field name is `location_postal`. There will be a patch soon.

  • bluegeek9 committed 7005e14e on 8.x-2.x
    Issue #3452867: Drush command to rebuild location data fails with...
bluegeek9’s picture

Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support to this project makes other volunteer contributions more sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triaging issues and adding more context to existing issues.
  • Writing documentation or patches for this project.

  • bluegeek9 committed cb711fce on 8.x-2.x
    Issue #3452867 by bluegeek9: Drush command to rebuild location data...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.