- Issue created by @mxr576
\Drupal\search_api\Plugin\views\field\SearchApiDate
depends on \Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface
from the datetime module, so when you visit a Views based page that leverages the search_api_date
Views field plugin on a site where the datetime module is not yet installed, you get a WSOD with
Error: Class "Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface" not found in Drupal\search_api\Plugin\views\field\SearchApiDate->render_item() (line 43 of modules/contrib/search_api/src/Plugin/views/field/SearchApiDate.php).
This happened to when a tried the search_api_solr_log
module and visited /admin/reports/search-api-solr-log
.
I am aware of the complexity of the answer here, since Views field plugins are only loaded when Views module is enabled therefore the datetime module is only a missing dependency when the Views module is enabled.
This probably means adding a transitional dependency on datetime might not be the right approach, maybe Search API could auto-enable datetime when Views module is installed - or at least it could have a runtime requirement check with error severity when Views module is enabled without the datetime module, or else...?
Active
1.0
Views integration