- πΊπΈUnited States smustgrave
Based on #18 seems like could still be an issue. Least should be investigated more.
- last update
over 1 year ago 29,457 pass
Using core 8.7.6, if you make a JSON:API resource request which has an include and an entity does not have that included entity reference field populated, the following results:
Warning:
Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 265 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 147)
Drupal\jsonapi\IncludeResolver->resolveIncludeTree(Array, Object) (Line: 74)
The code stems from IncludeResolver.php:
$references[$target_type][] = $field_item->get($field_item::mainPropertyName())->getValue();
Check that the field returned a value before using it.
Write a patch.
Needs work
9.5
Last updated
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Based on #18 seems like could still be an issue. Least should be investigated more.