Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Successfully installed the module and got it running, but at some point between intial install success and performing simple actions (changing the duration format & editing a field) the http://www.oursite.org/admin/content/brightcove_video page stopped working. From the browser we see:
The website encountered an unexpected error. Please try again later.
And in the Apache logs:
Error: Call to a member function getFileUri() on null in /var/www/something/htdocs/modules/brightcove/src/BrightcoveVideoListBuilder.php on line 129...
D8.2.7
Brightcove 8.x-1.2
Comment | File | Size | Author |
---|---|---|---|
#10 | video-list-image-check-2867884-10.patch | 750 bytes | yce |
Comments
Comment #2
justkristin CreditAttribution: justkristin commentedJust upgraded Drupal to 8.3, and now the whole site is down! The apache log is full of:
Attempt to uninstall Brightcove went like this:
Help?
Comment #3
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commentedThe 1st error:
Call to a member function getFileUri() on null in /var/www/something/htdocs/modules/brightcove/src/BrightcoveVideoListBuilder.php on line 129
Points to this section of the source code:
Which raises the question: have you modified the thumbnail image style?
The 2nd error:
Class 'Brightcove\\API\\Client' not found
Means that the PHP-API-Wrapper library was not found. This was probably caused by the core upgrade overwriting composer.json and one way to resolve that may have been to repeat the "Install library dependency (PHP-API-Wrapper)" step in the installation guide.
As for the 3rd error:
The following reasons prevent the modules from being uninstalled: There is content for the entity type: Brightcove Playlist. Remove brightcove playlist entities., There is content for the entity type: Brightcove Video. href="/admin/modules/uninstall/entity/brightcove_video">Remove brightcove video entities., There is content for the entity type: Brightcove Player. Remove brightcove player entities.
You need to remove the content before uninstalling the module.
Without further further knowledge of what could have caused the 1st error, the fastest way to get back up and running may be to restore a DB backup taken before the changes were made, or - if a backup is not available - start over with a fresh site
drush sql-dump > ../backup-broken.sql && drush sql-drop
.In addition to following the installation guide (linked above) for the installation and configuration of the module and library, I recommend reading Parts 3 & 4 of the Brightcove Video Connect for Drupal 8 blog series for a detailed explanation on proper usage of the module.
Please do, however, post the steps you took which could have caused the 1st error so we can determine whether the issue is reproducible and requires remedy.
Comment #4
justkristin CreditAttribution: justkristin commentedThank you, sir. Because of a DisplaySuite/8.3 cluster f (I updated core to see if it would fix the error), we had to roll back a day. There is still a problem with thumbnails, but I will have to dig in again once the rest of the furor subsides.
Comment #5
justkristin CreditAttribution: justkristin commentedOk, sir. Sorry about the lag - yay, Jury Duty! :) I have rolled back as far as I could, but am still getting error number one. Starting fresh is not an option at this time, unfortunately. I will ask my designer if he messed with the thumbnail display settings, but would it matter if he had? At the moment, I can view the playlists using the content tab for them, but when I try to view videos using the video content tab, all I get is:
The error that shows in the apache logs is:
Thank you so much for your help!
Comment #6
justkristin CreditAttribution: justkristin commentedTried applying patch in #58 here, but no love:
https://www.drupal.org/node/2705925#comment-11713583
Comment #7
justkristin CreditAttribution: justkristin commentedStill stuck at Error: Call to a member function getFileUri() on null in /var/www/www.oursite.org/htdocs/modules/brightcove/src/BrightcoveVideoListBuilder... when I try to view videos (but not playlists - they show up just fine). Can anyone tell me how to proceed debugging this? We are close to 2/3 done, so a rebuild is not an option...
Comment #8
justkristin CreditAttribution: justkristin commentedVideos chosen in fields are also not showing up in the published content, despite no errors in browser console, or apache logs
Comment #9
justkristin CreditAttribution: justkristin commentedHave done some more poking, and the thumbnail image style is there and fine, and the thumbnails are also there when I create a view... It is solely a problem with the video admin page...
Comment #10
yce CreditAttribution: yce at Pronovix for BrightCove commentedHi,
I've checked the issue, and looks like the file which was belong to the BrightcoveVideo entity was deleted, that's why the list shows an error because it tries to load it.
I'm working on a solution, which will take care of the deleted files on the entity properly.
In the meantime you can apply the patch which I've uploaded to get around the error.
Comment #11
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commentedComment #12
justkristin CreditAttribution: justkristin commentedThe patch in #10 works so far! Thank you! :)
Comment #14
yce CreditAttribution: yce at Pronovix for BrightCove commented@justkristin, I've uploaded the fix to the latest dev version.
There is an update hook which will take care of the invalid references on the BrightcoveVideo entities, so after running the updates, and re-syncing the video, you should get back the missing images from Brightcove (of course only if you haven't already updated any of the videos with missing images).
Comment #15
jan.mashat CreditAttribution: jan.mashat at Pronovix for BrightCove commentedComment #17
BoobaaNeeds some minor adjustments, eg. don't throw a fatal (division by zero) when there's nothing to update, and no need to save the entity twice if both images are gone.
Comment #19
yce CreditAttribution: yce at Pronovix for BrightCove commentedFixed the issues, thanks for the review.
Comment #20
Boobaa