TypeError: Cannot access offset of type string on string in Drupal\rate\Plugin\views\field\RateWidgetField->

Created on 26 September 2024, about 2 months ago

Problem/Motivation

After creating the second widget, the widget field cannot be added to the view.

Adding a node widget field TypeError: Cannot access offset of type string on string in Drupal\rate\Plugin\views\field\RateWidgetField->buildOptionsForm() (line 99 of E:\OSPanel\domains\test\web\modules\contrib\rate\src\Plugin\views\field\RateWidgetField.php).

Adding a comment widget field, the comment page does not open TypeError: Cannot access offset of type string on string in Drupal\rate\Plugin\views\field\RateWidgetField->render() (line 228 of E:\OSPanel\domains\test\web\modules\contrib\rate\src\Plugin\views\field\RateWidgetField.php).

When I add a second widget I expect that the views will have either a separate field for each widget or one field with the ability to select a widget, but now the views only have one Rate widget field, which is not identified with any widget and I don't know how to associate this field with a specific widget. Maybe this would fix the error, but I don't understand how to do it.

Steps to reproduce

New installation of Drupal 10.3.5.
Create two widgets either for the node or for the comment.
Add the Rate widget field.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024