After upgrading core to 8.5.2, and eploying to Acqui Cloud, Brightcove causes a fatal error. Note, the code works as expected in my local DevDesktop environment, and I am unable to recreate the error locally.

Fatal error: Class 'Drupal\brightcove\Entity\BrightcoveCmsEntity' not found in /mnt/www/html/xxx/docroot/modules/contrib/brightcove/src/Entity/BrightcovePlayer.php on line 30

The error is thrown via http and drush commands


I discovered the issue. Case-sensitivity of the class names. Class "brightcove/src/Entity/BrightcovePlayer.php" extends "BrightcoveCmsEntity", while class "brightcove/src/Entity/BrightcoveCMSEntity.php" is named as "BrightcoveCMSEntity".

I replaced all instances of "BrightcoveCmsEntity" with "BrightcoveCMSEntity", and the issue was resolved, it exposed the same issue with "BrightcoveVideoPlaylistCmsEntity".

Fatal error: Class 'Drupal\brightcove\Entity\BrightcoveVideoPlaylistCmsEntity' not found in /mnt/www/html/nhradev/docroot/modules/contrib/brightcove/src/Entity/BrightcoveVideo.php on line 75

Replacing all instances of "BrightcoveVideoPlaylistCmsEntity" with "BrightcoveVideoPlaylistCMSEntity" resolved all issues.

The plugin now works as expected in Acquia Cloud.

NOTE, the code worked locally because I am developing on Windows.

Files touched: brightcove/src/Entity/BrightcoveCMSEntity.php brightcove/src/Entity/BrightcoveCustomField.php brightcove/src/Entity/BrightcovePlayer.php brightcove/src/Entity/BrightcoveVideoPlaylistCMSEntity.php

brightcove/src/Entity/BrightcovePlaylist.php brightcove/src/Entity/BrightcoveVideo.php brightcove/src/Entity/BrightcoveVideoPlaylistCMSEntity.php brightcove/src/Form/BrightcoveVideoPlaylistForm.php

Reference: https://www.drupal.org/project/brightcove/issues/2969674

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.