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.
I'm getting the foloowing error: Apr 11 15:21:56 ip-10-64-31-83 drupal: http://www.matriu.com|1302549715|php|67.188.135.24|http://www.matriu.com/content/wildlife-movie|http://www.matriu.com/|0||Notice: Undefined offset: 0 in template_preprocess_videojs() (line 78 of /home/matriu/html/modules/videojs/includes/videojs.theme.inc).
Comment | File | Size | Author |
---|---|---|---|
#18 | videojs.theme_.inc_.diff | 1.68 KB | anand_s |
#16 | videojs.theme_.inc_.txt | 1.74 KB | cangeceiro |
Comments
Comment #1
naterockhold CreditAttribution: naterockhold commentedI tested and the $items_mp4 array is empty so the offset of 0 fails while calling the file_create_url function.
Comment #2
mrfree CreditAttribution: mrfree commentedsubscribe
Comment #3
michael.k CreditAttribution: michael.k commentedI'm also seeing this when I run cron with drush (along with another error):
In the node I'm seeing the video but not the thumbnail. There's an annoying overlay of a question mark graphic, even though I sometimes see the thumbnail flash below it when the page renders.
BTW, I'm unable to upload a thumbnail of any type, but the FFmpeg conversion successfully creates a list with radio buttons and the selected one shows up properly in views lists.
Comment #4
robertPrs7 CreditAttribution: robertPrs7 commentedJust got VideoJS installed along with Video module. Created a file field video. Following install and creation of first video content on my site (silvermessenger.com/gestalt using drupal 7) - content was test_trailer.ogg video from VideoJS - I encountered two different error notices
On the dashboard:
Received the same error, but also an additional error on run of CRON.
Notice: Undefined offset: 0 in template_preprocess_videojs() (line 78 of /home/silverms/public_html/gestalt/sites/all/modules/videojs/includes/videojs.theme.inc).
On content page:
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home/silverms/public_html/gestalt/includes/entity.inc).
On home page:
• Notice: Undefined offset: 0 in template_preprocess_videojs() (line 78 of /home/silverms/public_html/gestalt/sites/all/modules/videojs/includes/videojs.theme.inc).
• Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /home/silverms/public_html/gestalt/includes/entity.inc).
Comment #5
Daemon_Byte CreditAttribution: Daemon_Byte commentedsubscribe
Comment #6
Daemon_Byte CreditAttribution: Daemon_Byte commentedsubscribe
Comment #7
karlold CreditAttribution: karlold commentedHi Daemon
I have the same error as above the player does not see the video file, I have used various file to no avail, but I do not understand why you write "subscribe" in your comments. I am new to Drupal and I am unsure what this means, as surely the person is subscribed to Drupal.org to leave comments in the first place?
Please would you explain.
Thank you, Karl
Comment #8
Daemon_Byte CreditAttribution: Daemon_Byte commentedBy writing subscribe it means I will get marked in this thread and any replies will show up in my dashboard. I just want to keep track of this issue as it's something I have been getting as well but not yet had the time to look into.
Comment #9
karlold CreditAttribution: karlold commentedDaemon thank you. It's obvious now you've told me. Thanks.
Comment #10
rizenine CreditAttribution: rizenine commentedsubscribe
Comment #11
rizenine CreditAttribution: rizenine commentedLooks like you will need either an flv or an mp4 attached. Not sure about the fix, but I believe that's what the code is looking for on line 78.
Not sure, but doesn't this fix it. Again I have not look it over much.
if (!isset($vars['flash']) && isset($items_mp4[0])) {
$vars['flash'] = file_create_url($items_mp4[0]['uri']);
}
Comment #12
gagarine CreditAttribution: gagarine commentedI run in the error when the field is empty. I don't think it should be solve in the processors. Process should certainly not run if we don't have any file.
EDIT
Quick fix: If the field is empty do nothing (videojs.module):
I'm more to keep field managing multi-field as it's explain on http://api.drupal.org/api/drupal/modules--field--field.api.php/function/...
But perhaps is useful for doing playlist stuff.. (one player for more than one video)
Comment #13
knalstaaf CreditAttribution: knalstaaf commentedSubscribing.
Comment #14
knalstaaf CreditAttribution: knalstaaf commentedFrom the read-me:
.
What is the "HTML5 extension"? I know about the FLV-extension, MP4-extension, MOV-extension, ... but what is the HTML5 extension?
Comment #15
goldlilys CreditAttribution: goldlilys commentedSubscribing
Errors i'm getting are:
Notice: Undefined offset: 0 in template_preprocess_videojs() (line 78 of htdocs/sites/all/modules/videojs/includes/videojs.theme.inc).
Notice: Undefined index: filemime in template_preprocess_videojs() (line 38 of htdocs/sites/all/modules/videojs/includes/videojs.theme.inc).
Notice: Undefined property: stdClass::$uri in file_validate_is_image() (line 1737 of htdocs/includes/file.inc).
Got the media working with videojs, but had to create a separate video field for either youtube or upload since videojs doesn't display YT videos.
Comment #16
cangeceiro CreditAttribution: cangeceiro commentedattached is a patch that removes the warning.
Comment #17
anand_s CreditAttribution: anand_s commentedSubscribe.
Comment #18
anand_s CreditAttribution: anand_s commentedcangeceiro, that didn't work for me, but I've made some changes myself (attached) that did work for me, and fixed the error for good.
Comment #19
ann_morris CreditAttribution: ann_morris commentedSubscribe
Comment #20
tyrusmanuel CreditAttribution: tyrusmanuel commentedsubscribe
Comment #21
BPSistema CreditAttribution: BPSistema commentedHi, we have solved the problem with the flv format:
at line 13, change codecs array with this:
and at line 74 change "if statement" with this code:
Comment #23
Gurgel69 CreditAttribution: Gurgel69 commentedI just tried this fix, but it did not do anything.
When I look at the old file and the new it seams to be the same.
I uses version 7.x-1.10.
Comment #24
mducharme CreditAttribution: mducharme commentedStill getting this warning in release and dev branches.
Comment #25
bradjones1This ticket appears to have gone a little off the rails. The goal here is to get a patch that fixes the problem and can be marked RTBC/committed against the -dev branch of the project. There's a patch in #18 which abated the "undefined offset" error outlined in the ticket summary - let's focus there.
The code snippet in #21 (I don't think) gets at the cause of this specific issue, and regardless would need to be rolled as a patch so others can evaluate it.
In that spirit I think the correct status is "needs review" - and if one or two others can check out the -dev copy and apply #18 against it, we can get this properly committed and closed.
Comment #26
timd.mackey CreditAttribution: timd.mackey commentedConfirmed that the patch in #18 fixed the "Undefined offset" error. (Using Drupal 7.10)
Comment #27
bradjones1Comment #28
michael.k CreditAttribution: michael.k commentedPatch in #18 fixed the "undefined offset" error for me, too.
Comment #29
Jorrit CreditAttribution: Jorrit commentedFixed in 7.x-1.x.
Comment #31
hendry.a CreditAttribution: hendry.a commentedsubscribe
Hi Everyone,
I'm face problem at videojs version 7.x.2.x (patch #16, patch #18, and code at #21 seem doesn't work):
can anyone help me about this problem? thank you.
Comment #32
Jorrit CreditAttribution: Jorrit commentedThis was a bug in the Video module. Please try the next 7.x-2.x-dev version of the Video module.