Discovered this after exporting a number of bundle fields to default config, and getting the following errors when accessing the
manage display tab for a custom entity.

Error: Call to a member function getBaseId() on null in /var/www/doris/web/modules/composer/videojs/src/Plugin/Field/FieldFormatter/VideoJsPlayerListFormatter.php on line 71

Error: Call to a member function getBaseId() on null in /var/www/doris/web/modules/composer/videojs/src/Plugin/Field/FieldFormatter/VideoJsPlayerFormatter.php on line 196

Sorry it's difficult to identify exactly what triggered it.

However, the code that throw's the error is dead and unused, and needs removal in any case.

Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thursday_bw created an issue. See original summary.

thursday_bw’s picture

thursday_bw’s picture

Issue summary: View changes
bradjones1’s picture

Here's some cleanup as well - the if() is needlessly complicated. Plus some formatting fixes.

Status: Needs review » Needs work

The last submitted patch, 4: videojs-isapplicable.patch, failed testing.

The last submitted patch, 4: videojs-isapplicable.patch, failed testing.

bradjones1’s picture

Status: Needs work » Needs review

"CI error"... hmm

Jeff Veit’s picture

Just got it too. First edit after turning on videojs after site migrate.

And the patch #4 works for me.

swim’s picture

Status: Needs review » Reviewed & tested by the community

Patch #4 does the trick, thanks bradjones.

muckermarc’s picture

I got a different error, when using the Entity Embed and File Entity Browser modules in conjunction with VideoJS.

The error appeared when editing embed buttons at /admin/config/content/embed or when trying to embed an image from the File Browser into a CKEditor text field.

Here's the error generated to help others who might be searching for this text:

The website encountered an unexpected error. Please try again later.
InvalidArgumentException: Missing required properties for an EntityDisplay entity. in Drupal\Core\Entity\EntityDisplayBase->__construct() (line 122 of core/lib/Drupal/Core/Entity/EntityDisplayBase.php). Drupal\Core\Entity\Entity\EntityFormDisplay->__construct(Array, 'entity_form_display') (Line: 224)
Drupal\Core\Config\Entity\ConfigEntityStorage->doCreate(Array) (Line: 184)
Drupal\Core\Entity\EntityStorageBase->create(Array) (Line: 528)
Drupal\Core\Entity\Entity::create(Array) (Line: 571)
entity_get_form_display(NULL, NULL, 'default') (Line: 69)
Drupal\videojs\Plugin\Field\FieldFormatter\VideoJsPlayerListFormatter::isApplicable(Object) (Line: 128)

The patch in #4 worked a treat - thanks!

fooway’s picture

I also have this issue and the patch doesn't work.
-------------------------------------------------------------------
The website encountered an unexpected error. Please try again later.
Error: Call to a member function getBaseId() on null in Drupal\videojs\Plugin\Field\FieldFormatter\VideoJsPlayerListFormatter::isApplicable() (line 71 of modules/contrib/videojs/src/Plugin/Field/FieldFormatter/VideoJsPlayerListFormatter.php).
-------------------------------------------------------------------

_shY’s picture

Status: Reviewed & tested by the community » Closed (won't fix)