Installed the module and used all default settings.

Uploaded a SWF file and got this error displaying eventhough the video uploaded successfully and works fine

when the content is viewed, this error message appears above the video. The videos displays with no problem.

UPDATE:
I added swf to the list of allowed files for upload and it got rid of the error message. Works well.

I think the bug here is why it permitted upload of swf even if I didnt have it in the list of allowed files. The upload still went though, eventhough it shouldnt have and caused the Division By Zero error.

Comments

petermilad’s picture

Title: warning: Division by zero in test/sites/all/modules/video/includes/common.inc on line 17 » +1

I get the same error too in video module when trying to view the node after a successful upload.

petermilad’s picture

Title: +1 » warning: Division by zero in test/sites/all/modules/video/includes/common.inc on line 17

if you found anything that could fix this error try to keep it on public

hypertext200’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide me more informations, what you exactly got? and what are the versions your using?

tborrome’s picture

Status: Postponed (maintainer needs more info) » Active

Re-opening - information is already on description - re-stating below. Version is 6.x-3.4

SCENARIO (EASY TO REPRODUCE)
1. Installed the module and used all default settings.

2. Uploaded a SWF file and got this error displaying eventhough the video uploaded successfully and works fine

3. when the content is viewed, this error message: "Division by zero in test/sites/all/modules/video/includes/common.inc on line 17" appears above the video. The videos displays with no problem

TEMPORARY WORKAROUND:
I added swf to the list of allowed files for upload and it got rid of the error message.

I think the bug here is why it permitted upload of swf even if I didnt have it in the list of allowed files. The upload still went though, eventhough it shouldnt have and caused the Division By Zero error.

cmsproducer’s picture

When creating the filefield, you may get this message:
=== Only web-standard videos are supported through the video widget. If needing to upload other types of files, change the widget to use a standard file upload ===

It means that you have specified an upload file extension that is not acceptable. If you do this, you will get the said error message even if you are trying to upload/play a commonly acceptable file such as swf, wmv, flv etc

iLLin’s picture

Status: Active » Closed (fixed)

I cannot reproduce this in the latest version 3.9. Closing, please reopen if you still have this issue.

mistermustard’s picture

I had this problem, but I was displaying my videos through views fields. I found that going to the relevant view and editing the settings for my 'content: video' field got rid of the error message.

If you go down to the very bottom of the settings for the field that's causing the problems, you'll see a 'Format' dropdown. I found mine was set to 'video' and changing it to 'videofield embedded' solved the problem.

I guess that's technically a "workaround" as it probably solved the problem by avoiding the troublesome common.inc file altogether.

Hope this helps.