- Merge request !2945Issue #3080034: array_filter() expects parameter 1 to be array, null given FieldInstanceSettings.php:47 โ (Open) created by joshua-jake
- First commit to issue fork.
- First commit to issue fork.
- last update
over 1 year ago 29,388 pass - ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
Received a very similar error, also running a migration, and the above commit fixes itโ but i fear it will not be accepted, at least not as part of this issue/patch, given that the fix is in a regular Views plugin not a migration plugin.
- ๐ฉ๐ชGermany u.kurilla
I am working on a d7->d10 migration with 220 field_instance(s) to be migrated. It was frustrating and time consuming to get crashes of "drush mim" due to this array_filter issue (yes, crashes). I was not brave enough to suspect the core code to have a problem. It was only after i found this issue thread here that i simply removed the function call (patch #6) and all the problems disappeared! I am so happy, that you discussed this here.
However, i think the patch should find a way into the core code for all the d7+ drupal versions. - ๐จ๐ฆCanada joelpittet Vancouver
The Views handler doesnโt require a
sort
option, which is the root cause of the issue.Iโm hoping this doesnโt require any tests? Itโs just a quick DX fix to help people get over their migrations. I'm RTBC'ing because it gets me (and others) over the hump.
Here's my bad data:
a:8:{s:12:"entity_types";a:0:{}s:17:"field_permissions";a:1:{s:4:"type";i:0;}s:7:"indexes";a:1:{s:9:"target_id";a:1:{i:0;s:9:"target_id";}}s:8:"settings";a:4:{s:7:"handler";s:5:"views";s:16:"handler_settings";a:2:{s:9:"behaviors";a:1:{s:17:"views-select-list";a:1:{s:6:"status";i:0;}}s:4:"view";a:3:{s:4:"args";a:2:{i:0;s:56:"[field_collection_item:host:node:field-research-area:id]";i:1;s:47:"[field_collection_item:host:node:field-year:id]";}s:12:"display_name";s:17:"entityreference_1";s:9:"view_name";s:24:"utility_er_courses_upper";}}s:16:"profile2_private";b:0;s:11:"target_type";s:8:"academic";}s:12:"translatable";i:0;s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:37:"field_data_field_draft_course_section";a:1:{s:9:"target_id";s:36:"field_draft_course_section_target_id";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:41:"field_revision_field_draft_course_section";a:1:{s:9:"target_id";s:36:"field_draft_course_section_target_id";}}}}}s:12:"foreign keys";a:1:{s:12:"eck_academic";a:2:{s:5:"table";s:12:"eck_academic";s:7:"columns";a:1:{s:9:"target_id";s:2:"id";}}}s:2:"id";s:2:"70";}
And here's how I tracked it down:
SELECT * FROM `field_config` WHERE (`module` = 'entityreference') AND (`data` NOT LIKE '%sort%')