Error: Cannot unset offset in a non-array variable in Drupal\tablefield\Plugin\Field\FieldType\TablefieldItem->setValue() (line 164 of modules/contrib/tablefield/src/Plugin/Field/FieldType/TablefieldItem.php)

Created on 6 November 2023, about 1 year ago
Updated 24 July 2024, 4 months ago

Problem/Motivation

Error: Cannot unset offset in a non-array variable in Drupal\tablefield\Plugin\Field\FieldType\TablefieldItem->setValue() (line 164 of modules/contrib/tablefield/src/Plugin/Field/FieldType/TablefieldItem.php)

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇩🇪Germany DiDebru

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

Comments & Activities

  • Issue created by @DiDebru
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    2 pass
  • @didebru opened merge request.
  • Status changed to Needs review 10 months ago
  • 🇮🇳India SandeepSingh199

    Hi @DiDebru, I got the same issue while trying to add New Rows in table. After your patch, its working fine.

    Marking this ticket to Needs Review.

  • 🇧🇪Belgium tvb

    Similar problem here (version 8.x-2.4):

    The website encountered an unexpected error. Please try again later.
    TypeError: Cannot access offset of type string on string in Drupal\tablefield\Plugin\Field\FieldType\TablefieldItem->setValue() (line 187 of modules/contrib/tablefield/src/Plugin/Field/FieldType/TablefieldItem.php).

    It is resolved after installing the patch.

  • 🇧🇪Belgium tvb

    Ignore my previous comment.

    Apparently the configuration settings at /admin/config/content/tablefield had disappeared.

    The TypeError message is gone after setting a CSV separator and defaults for number of rows and columns.

    No patch required.

Production build 0.71.5 2024