Error: Call to a member function getStorage() on null

Created on 12 December 2023, 7 months ago
Updated 27 June 2024, 1 day ago

Problem/Motivation

Adding existence check before stepping into the method to prevent this error.

๐Ÿ› Bug report
Status

RTBC

Version

1.4

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States EthanT Sarasota, Florida

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

Merge Requests

Comments & Activities

  • Open on Drupal.org โ†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update 7 months ago
    Waiting for branch to pass
  • Issue created by @EthanT
  • ๐Ÿ‡ฑ๐Ÿ‡นLithuania Evaldas Uลพkuras Kaunas, LT

    This issue is caused by ๐Ÿ“Œ Cleanup plugin constructors Fixed and the release 8.x-2.10 of Entity Browser.

    The new logic for plugin's construction. Instead of overriding constructor they add additional dependencies using just a create method.

  • Open on Drupal.org โ†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update 6 months ago
    Waiting for branch to pass
  • Open on Drupal.org โ†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update 6 months ago
    Waiting for branch to pass
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States edmund.dunn Olympia, WA

    Posting the static patch because using the MR doesn't allow pinning to a specific commit, so anyone can submit pretty much anything and inject it into our codebase IIRC. This also fixed our issue. Nice work!!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States joshua.boltz

    We were encountering this error:

    Error: Call to a member function createInstance() on null in Drupal\entity_browser_table\Plugin\Field\FieldWidget\EntityReferenceBrowserTableWidget->buildTableRows() (line 201 of /var/www/drupal/web/modules/contrib/entity_browser_table/src/Plugin/Field/FieldWidget/EntityReferenceBrowserTableWidget.php).

    And this patch resolves it too.

  • Status changed to RTBC 4 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jonathanwestman

    The patch resolved the issue caused by the release 8.x-2.10 of Entity Browser. Thanks.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States angelazer

    We were also encountering a similar error, and confirmed this patch resolves it:

    Error: Call to a member function getStorage() on null in Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget->formElementEntities() (line 759 of /code/web/modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php).

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia havran

    Same for me, the patch #4 resolved the issue caused by the release 8.x-2.10 of Entity Browser. Thanks.

Production build 0.69.0 2024