Steps to reproduce:

  • Install Drupal 8.6.12
  • Add & enable module: gmap_polygon_field
  • Create a new field
The website encountered an unexpected error. Please try again later.
TypeError: Argument 7 passed to Drupal\gmap_polygon_field\Plugin\Field\FieldWidget\GmapPolygonFieldBasicWidget::__construct() must be an instance of Drupal\token\Token, instance of Drupal\Core\Utility\Token given, called in /var/www/html/web/modules/contrib/gmap_polygon_field/src/Plugin/Field/FieldWidget/GmapPolygonFieldBasicWidget.php on line 60 in Drupal\gmap_polygon_field\Plugin\Field\FieldWidget\GmapPolygonFieldBasicWidget->__construct() (line 42 of modules/contrib/gmap_polygon_field/src/Plugin/Field/FieldWidget/GmapPolygonFieldBasicWidget.php).
Drupal\gmap_polygon_field\Plugin\Field\FieldWidget\GmapPolygonFieldBasicWidget->__construct('gmap_polygon_field_basic_widget', Array, Object, Array, Array, Object, Object) (Line: 60)
Drupal\gmap_polygon_field\Plugin\Field\FieldWidget\GmapPolygonFieldBasicWidget::create(Object, Array, 'gmap_polygon_field_basic_widget', Array) (Line: 122)

Comments

vslklv created an issue. See original summary.

vslklv’s picture

Title: The website encountered an unexpected error when module was enabled and field was created » Fatal Error because of a contrib Token module dependency
StatusFileSize
new3.21 KB

The module description says that

This module has no dependencies on other modules

but seems it depends on contrib module: Token.

The patch removes this dependency.

vslklv’s picture

Status: Active » Needs review

  • lingros committed db352f3 on 8.x-1.x
    Issue #3040847 by vslklv: Fatal Error because of a contrib Token module...
lingros’s picture

Status: Needs review » Fixed

Hi, thank you for the bug report and the patch, I've added it to the current dev version. And I've also fixed most coding standards.

Status: Fixed » Closed (fixed)

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