- Issue created by @taylormade415
- First commit to issue fork.
- Status changed to Needs work
almost 2 years ago 3:17pm 8 February 2023 Thank you for reporting this issue.
I think I might have found one reason why you're having the exception from core:
Call to a member function getConfigDependencyName() on nullCan you please double check that the display mode you're referencing exist already before running `field_create` ?
I think you are actually hitting a bug from core and the only workaround from now is to create the view mode/form mode before running the import.
Let me know
- πΊπΈUnited States taylormade415
i'm only creating display modes for `view` and `default` so pretty sure those exist regardless right? All said "default" is not listed at /admin/structure/display-modes/form nor /admin/structure/display-modes/view.
- πΊπΈUnited States taylormade415
CORRECTION. I was attempting to add the view-mode: "teaser" which doesn't exist by default. I unset that and it worked with your @dev branch that checks `$component = $entity_view_display ? $entity_view_display->getRenderer($field_name) : NULL;`
Yes indeed, thank you for testing again.
The issue was with the
teaser
view mode.If you create the View mode first, it will work. I have just tested it again too.
This is however a new bug from core and I will open a separate ticket on the core issue queue.
For now, this issue can be closed as it "work as design".
Feel free to comment again if you have any further issue.
TY for you report.
Hopefully this module helped you!
- Status changed to Closed: works as designed
almost 2 years ago 2:03pm 9 February 2023 For the record, I've found a bug already open for this issue on core.
https://www.drupal.org/project/drupal/issues/2741429 π calculateDependencies doesn't check $mode_entity if it is NULL Needs work