I tried a clean install of the -dev code to set up a cck field to show a YouTube video and ran into a slew of undefined variables and a wrongly-named variable_get() that was causing all providers to be rejected as invalid. I've attached a patch.

I still see a few errors, but with these changes things are mostly working.

CommentFileSizeAuthor
#1 emfield.patch13.76 KBkarens
emfield.patch10.32 KBkarens

Comments

karens’s picture

StatusFileSize
new13.76 KB

After more work I've found fixes for most of the things causing error messages when embedding YouTube videos. Most of the fixes should be right, but I'm not sure what to do with the one on line 188 of emfield.module. I added a TODO explaining that one and changed it to at least keep the error message from displaying when you edit the field settings.

karens’s picture

Title: Undefined variables and invalid provider » YouTube problems: Undefined variables and invalid provider

Changing title.

alex ua’s picture

Title: YouTube problems: Undefined variables and invalid provider » Need to find fix for _emfield_field_submit_id()
Status: Needs review » Needs work

Thanks Karen! I've committed your changes to dev. I've changed the title and changed the status to "code needs work" until aaron can take a look at the code you point to. I'll also roll a new alpha release in a few minutes.

alex ua’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs work » Needs review

I'm changing the status to "needs review"- this is still marked as a "TODO" in the 2.x version. Aaron- can you take a look?

aaron’s picture

hmmm... i saw that earlier, and forgot about this particular issue. i'll have to dig into it when i have the time...