Closed (fixed)
Project:
Video Upload
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 May 2008 at 18:46 UTC
Updated:
4 Jul 2008 at 19:15 UTC
I can't seem to get the module to work under my site. I get the following error:
warning: Cannot use a scalar value as an array in ...../modules/cck/content.module on line 606.
I am using cck-5.x-1.7 and PHP version 5.2.5
What could be causing this error?
Comments
Comment #1
jhedstromI'm not able to duplicate this error, although while I was trying, I found a few bugs in calls to the t() function, which I fixed and committed to CVS.
Could you provide more information about how and where this is happening?
Thanks,
Jonathan
Comment #2
vatoloco commentedIn my content type I am only adding the video upload field nothing else.
As soon as I save it I get the following errors:
* warning: Cannot use a scalar value as an ....../modules/cck/content.module on line 606.
* Video uploads currently unavailable. If this problem persists, contact the system administrator.
I am using cck-5.x-1.7, PHP version 5.2.5 and Drupal 5.7 and placing the ...\library\Zend folder under the video_upload folder.
Could it be that one of the other CCK field modules is causing the problem.
I am using the following CCK modules:
CCK Taxonomy
Content Copy
Content Field Privacy
Content Taxonomy
Content Taxonomy Autocomplete
Content Taxonomy Options
Content Templates
Date
Date Copy
EMail
Embedded Audio Field
Embedded Image Field
Embedded Media Field
Embedded Media Import
Embedded Media Thumbnail
Embedded Video Field
Fieldgroup
Image
Link
Node Reference
Number
Option Widgets
Text
User Reference
Video Upload Field
Comment #3
jhedstromHey vatoloco,
The first error I'm still not sure about (regarding using a scalar for an array), as I can't seem to reproduce it, so it may in fact be due to a different module.
Regarding the second error, this is caused when the module can't connect to youtube. More detailed errors (regarding the specific reason, if known) are thrown in watchdog, so you could try looking there (admin/logs/watchdog). Also, if you browse to admin/reports/status, the module will provide detailed errors if it's missing certain things.
Let me know if you find (or don't find) anything in those two places.
-Jonathan
Comment #4
vatoloco commentedI made sure that my account information was correct for Youtube.
I checked in watchdog and got the following errors:
*YouTube Connection failed with Expected response code 200, got 403
and
*Authentication to YouTube succeeded, but failed to generate a token
Comment #5
jhedstromThis is a good sign, in that you are authenticating :)
The 403 response is sent by YT when"
A few obvious questions:
* Do you have more than 1000 videos on your account? (yt api disallows uploads after 1000)
* Do you have the developer key properly set in your settings? (yt will authenticate w/o a developer key, but you can't upload video w/o one)
Some less obvious possibilities:
* The module attempts to account for illegal characters, but it's possible that I forgot one. What settings did you configure the field with in terms of default title, keywords, description and developer tags? If any of those are blank, what is your site name (this gets sent in the event of blank defaults)?
However, if that were the problem, I would expect the response code to be 400 instead of 403...so that may be a wile goose chase. I'll try and look into this a bit more...let me know if you find anything.
Cheers,
Jonathan
Comment #6
vatoloco commented* Do you have more than 1000 videos on your account?
NO, I have less 50
* Do you have the developer key properly set in your settings?
Yes, I made sure the key was correct, along with user name and password
I've been testing the module with the following settings:
For the title I am using [user] token (username)
For the description I am using [user] token (username)
For the keywords I am using "uploaded, video"
For the developer tags I am using "uploaded, video"
I am going to install cck and only this module on a clean drupal install and see if I still get errors.
Comment #7
kev52 commentedi have the same problem with drupal 5.7 and cck 1.7 and don't know why?
Comment #8
jhedstromI'm still unable to reproduce the "Cannot use a scalar value" error, but I'll continue to look into it.
Comment #9
drutube commentedI'm getting this before and after updating cck to dev as of today.
"warning: Cannot use a scalar value as an array in /home/womannet/public_html/sites/all/modules/cck/content.module on line 617."
The line reference is to 617
The code below is from cck-5.x-1.x-dev starting at line 615 and ending at line 620
Comment #10
jhedstromI am still unable to reproduce this warning on a clean install, with only the video upload module enabled. Any additional information involving your site configuration may help me track it down.
Comment #11
drutube commentedHere is the content export of the content type in case that helps.
Comment #12
jhedstromThanks Drutube. With that content definition, I was able to reproduce the issue, and fix it. The fix has been committed to 5.x-dev, and to the new 5.x Beta release.
Comment #13
drutube commentedDefiantly fixed. Thank you John. This is an extremely cool thing you've done. Great work.
Comment #14
drutube commentedJohn,
As I noted here the scalar / array thing is fixed. However now it exposes a another problem I'm having that might be better explained in another post as a feature request. In short I've done some research on the Youtube errors and I'm mightily confused now. I'll post separate. Thanks again.
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.