Updated: Comment #0

Problem/Motivation

Attempting to delete a field from the instance-edit page results in a Fatal error:
Fatal error: Cannot use object of type Drupal\field\Entity\FieldInstance as array in /var/www/d8/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php on line 204

Proposed resolution

Fix it

Remaining tasks

Reviews

User interface changes

None

API changes

None

#1953408: Remove ArrayAccess BC layer from field config entities

Test patch coming

Files: 
CommentFileSizeAuthor
#4 interdiff.txt758 byteslarowlan
#4 field-instance-delete-2110779.2.patch1.95 KBlarowlan
PASSED: [[SimpleTest]]: [MySQL] 59,004 pass(es).
[ View ]
#1 delete-instance.fail_.patch1.06 KBlarowlan
FAILED: [[SimpleTest]]: [MySQL] 58,989 pass(es), 0 fail(s), and 3 exception(s).
[ View ]
#1 instance-delete.pass_.patch1.94 KBlarowlan
FAILED: [[SimpleTest]]: [MySQL] 58,598 pass(es), 0 fail(s), and 3 exception(s).
[ View ]

Comments

larowlan’s picture

Status:Active» Needs review
StatusFileSize
new1.94 KB
FAILED: [[SimpleTest]]: [MySQL] 58,598 pass(es), 0 fail(s), and 3 exception(s).
[ View ]
new1.06 KB
FAILED: [[SimpleTest]]: [MySQL] 58,989 pass(es), 0 fail(s), and 3 exception(s).
[ View ]

Simpletest playing up locally, hoping for red/green here but might need to use 301 in test instead of 200.
Regardless, its a 500 now.

Status:Needs review» Needs work

The last submitted patch, instance-delete.pass_.patch, failed testing.

larowlan’s picture

+++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php
@@ -209,6 +210,17 @@ function cardinalitySettings() {
+    $this->drupalPost(NULL, array(), t('Delete field'));

meh its drupalPostForm now

larowlan’s picture

Status:Needs work» Needs review
StatusFileSize
new1.95 KB
PASSED: [[SimpleTest]]: [MySQL] 59,004 pass(es).
[ View ]
new758 bytes

this time?

amateescu’s picture

Status:Needs review» Reviewed & tested by the community

Looks good.

alexpott’s picture

Status:Reviewed & tested by the community» Fixed

Committed 9afeeb2 and pushed to 8.x. Thanks!

Status:Fixed» Closed (fixed)

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