Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get this error printed twice on drush commands like cc all. It comes from hook_views_data() in apachesolr_views.views.inc at line 43 when it's calling getFields().
"0" Status: : php_network_getaddresses: getaddrinfo failed: Name or service not known
The cause of this error is that my site has 3 solr environments, 2 of which are inaccessible locally, but are needed for other site environments so they just sit in the database being unused. Apachesolr views attempts to add fields from all environments as views fields. We should allow users to choose which environments to use for apachesolr views fields
Comment | File | Size | Author |
---|---|---|---|
#1 | apachesolr_views.views_.inc-2034419.patch | 651 bytes | chaunceyt |
Comments
Comment #1
chaunceyt CreditAttribution: chaunceyt commentedI was getting this error also. Here is a patch that addresses the issue.
Thanks
Comment #2
acbramley CreditAttribution: acbramley commented@chaunceyt the outer loop in that function is going over each environment so adding $env_id = apachesolr_default_environment(); is effectively overriding that to loop over the default environment for however many environments there are. This means if there were other environments with different fields they would not be included.