TypeError: FieldFormatter\ChartsFieldFormatter::__construct(): Argument #10 ($uuidService) must be of type Drupal\Component\Uuid\Php

Created on 19 January 2023, almost 2 years ago
Updated 17 April 2024, 7 months ago

Problem/Motivation

Formatter is not working with tablefield field type, throwing an error due to wrong call in the const

TypeError: Drupal\charts_field_formatter\Plugin\Field\FieldFormatter\ChartsFieldFormatter::__construct(): Argument #10 ($uuidService) must be of type Drupal\Component\Uuid\Php, Drupal\Component\Uuid\Com given, called in D:\MAMP\htdocs\cms-drupal-d8\web\modules\contrib\charts_field_formatter\src\Plugin\Field\FieldFormatter\ChartsFieldFormatter.php on line 70 in Drupal\charts_field_formatter\Plugin\Field\FieldFormatter\ChartsFieldFormatter->__construct() (line 37 of modules\contrib\charts_field_formatter\src\Plugin\Field\FieldFormatter\ChartsFieldFormatter.php).

Steps to reproduce

The field tablefield is not rendering, It throws an error

Proposed resolution

Correct the call of the service in the constructor, replace Php $uuidService by UuidInterface $uuid_service.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇹🇳Tunisia matio89 UTC+1 🇹🇳

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024