Problem/Motivation

Queue worker gives the next error on site-install.

Error: Call to a member function isAdjusted() on null in brightcove/src/Entity/BrightcovePlayer.php on line 240 #0 brightcove/src/Plugin/QueueWorker/BrightcovePlayerQueueWorker.php(64): Drupal\brightcove\Entity\BrightcovePlayer::createOrUpdate(Object(Brightcove\Object\Player\Player), Object(Drupal\Core\Entity\Sql\SqlContentEntityStorage), 'default')

#1 core/lib/Drupal/Core/Cron.php(167): Drupal\brightcove\Plugin\QueueWorker\BrightcovePlayerQueueWorker->processItem(Array)
#2 core/lib/Drupal/Core/Cron.php(133): Drupal\Core\Cron->processQueues()
#3 core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#4 core/includes/install.core.inc(1812): Drupal\Core\ProxyClass\Cron->run()
#5 core/includes/install.core.inc(672): install_finished(Array)
#6 core/includes/install.core.inc(550): install_run_task(Array, Array)
#7 core/includes/install.core.inc(121): install_run_tasks(Array)

Error: Call to a member function isAdjusted() on null in Drupal\brightcove\Entity\BrightcovePlayer::createOrUpdate() (line 240 of brightcove/src/Entity/BrightcovePlayer.php).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

l0ke created an issue. See original summary.

l0ke’s picture

Status: Active » Needs review
FileSize
890 bytes

Add simple condition before processing.

douggreen’s picture

I get this error too. The code assumes that whenever there's a studio_configuration, that there is also a player. If this assumption is right, then we should track down why there is no player. If it's not true, then there are more places in the code that need to check for a missing player.

douggreen’s picture

jan.mashat’s picture

Title: Error: Call to a member function isAdjusted() on null in /var/www/build752/docroot/modules/contrib/brightcove/src/Entity/BrightcovePlayer.php on line 240 » Cover case with no configured players
Status: Needs review » Postponed (maintainer needs more info)

@l0ke @douggreen

Brightcove accounts will always start out with a default player configuration with playerID of "default". However, a customer could delete that player and then the Brightcove account would not have any player configurations, but this is not a practical situation.

Does the patch cover this, or are there "more places in the code that need to check for a missing player"?

yce’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.