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.
By CatsFromStonehenge on
The geolocation module (somebody else's) does not reference my mapping_uk module or vice versa, and yet this happens when doing 'drush cr':
PHP Fatal error: Call to undefined method Drupal\mapping_uk\UKMappingCode::getViewsFieldData() in /Library/WebServer/Documents/my_project/modules/geolocation/geolocation.views.inc on line 20
Fatal error: Call to undefined method Drupal\mapping_uk\UKMappingCode::getViewsFieldData() in /Library/WebServer/Documents/my_project/modules/geolocation/geolocation.views.inc on line 20
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined method Drupal\mapping_uk\UKMappingCode::getViewsFieldData() in
/Library/WebServer/Documents/my_project/modules/geolocation/geolocation.views.inc, line 20
There must be some logical explanation that I'm missing here. Any ideas how to debug this?
Thanks!
This is geolocation.views.inc:
<?php
/**
* @file
* Provide views data for geolocation.module.
*/
use Drupal\field\FieldStorageConfigInterface;
/**
* Implements hook_field_views_data().
*
* Views integration for taxonomy_term_reference fields.
* Adds a term relationship to the default field data.
*
* @see field_views_field_default_views_data()
*/
function geolocation_field_views_data(FieldStorageConfigInterface $field_storage) {
// User the geofield service to get the views data.
return \Drupal::service('geolocation.core')->getViewsFieldData($field_storage);
}
Comments
You should open up a bug
You should open up a bug report in the module issue queue.