The full error messages are:

Notice: Trying to get property of non-object in theme_brightcove_field_embed() (line 115 of /brightcove/brightcove_field/theme.inc).
Notice: Trying to get property of non-object in theme_brightcove_field_embed() (line 119 of /brightcove/brightcove_field/theme.inc).

The problematic function is theme_brightcove_field_embed() which pulls out a 'player' variable. The player variable at this point exists and is the numeric player ID entered on the Brightcove Video config at admin/config/media/file-types/manage/video/file-display.

The error occurs because brightcove_player_load() expects the player name configured at admin/config/media/brightcove/players. It is only getting the player ID and therefore fails to find the player in the database.

A workaround is to enter the player name into the form at admin/config/media/file-types/manage/video/file-display. However, this is obviously wrong because that form also wants a player id/key pair. Maybe this form needs to be changed to accept just a player name.

CommentFileSizeAuthor
#7 brightcove-n1355466-6.patch820 bytesdamienmckenna

Comments

justinph’s picture

Version: 7.x-3.1 » 7.x-3.2

Running into this too. It would appear that setting the player up in the admin doesn't actually manage to save anything to the brightcove_player table in the drupal db. I went in to mysql and manually set the player name, player_id, and player_key, and then this works. Still have to use the Player Name in the file-display admin, rather than the player ID.

hershel’s picture

I also see this issue. My brightcove_player table is populated just fine by the module. I am not using the "Brightcove media integration" nor the "Media" module, however, just the "Brightcove Field" module.

wojtha’s picture

I went to this too.

The solution is to add player first and then save or resave the video field settings.

patty.fresonke’s picture

Any new progress on this issue? I've run into it too...my brightcove_player table is populating just fine on its own, but when the video is 'pulled' into the page, it doesn't seem to grab that player info to display the video on the page. I'm not seeing the playerID or the playerKey when the page loads.

agileox’s picture

I have the same problem as patty.fresonke except that I do see the PlayerID value on the Content page source, but not the playerKey. I have verified that the values do exist in mysql brightcove_player table.

    <object id="myExperience" class="BrightcoveExperience">
    <param name="bgcolor" value="#FFFFFF" />
    <param name="width" value="425" />
    <param name="height" value="350" />
    <param name="playerID" value="" /><param name="@videoPlayer" value="1808779858001" />
    <param name="isVid" value="true" />
    <param name="isUI" value="true" />
    <param name="playerKey" value="" />

I am also getting the error when loading the edit page content node:

    Notice: Trying to get property of non-object in theme_brightcove_field_embed() (line 118 of .../sites/all/modules/brightcove/brightcove_field/theme.inc).
    Notice: Trying to get property of non-object in theme_brightcove_field_embed() (line 122 of .../sites/all/modules/brightcove/brightcove_field/theme.inc).

the referenced lines of code from theme.inc:

113  $code = '
114    <object id="' . $values['id'] . '" class="BrightcoveExperience">
115    <param name="bgcolor" value="#' . $values['bgcolor'] . '" />
116    <param name="width" value="' . $values['width'] . '" />
117    <param name="height" value="' . $values['height'] . '" />
118    <param name="playerID" value="' . $player->player_id . '" />'
119    . $asset_code . '
120    <param name="isVid" value="true" />
121    <param name="isUI" value="true" />
122    <param name="playerKey" value="' . $player->player_key . '" />
123    </object>';
124
125  return $code;

I've checked and re-checked each of the settings and read through the Brightcove Integration documentation several times.

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

I believe this happens when the file type settings for videos are set incorrectly for the Preview display mode for the video file type. Try going to admin/structure/file-types/manage/video/display/media_preview and ensuring that the file is set to be displayed, and then go to admin/structure/file-types/manage/video/file-display/media_preview and ensuring that the "Brightcove Preview Image" field is enabled.

damienmckenna’s picture

Version: 7.x-3.2 » 7.x-3.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new820 bytes

This patch gives records an error via watchdog() if the video player could not be loaded and the File Entity module is installed (used with Media v2) with a suggestion to check the file type display settings.

behoppe333’s picture

I am running into this problem and others in: After following all instructions I can't get Brightcove videos embedded in site content. If anyone from this thread can help, I would really appreciate it. Thanks.

k.dani’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)

It has been fixed in the latest release. Please note that version 5 will be the only supported version for Drupal 7.