Fatal error when removing last sub-field

Created on 13 November 2023, about 1 year ago
Updated 15 November 2023, about 1 year ago

Problem/Motivation

Where there is only 1 subfield of a data field, it is possible to delete it but then the field become unmanageable.

Steps to reproduce

Create a data field with a subfield.
Delete this data field.
Edit the field: in the "field settings" tab throws error 500 and also trying to delete the datafield throws error 500 with

Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper:
"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1 OFFSET 0' at line 5: SELECT 1 AS "expression" FROM "product__field_test_" "t" WHERE LIMIT 1 OFFSET 0; Array ( )"
at /web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php line 46

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy giuse69

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

Comments & Activities

Production build 0.71.5 2024