When I create a Kaltura Media Node, the Contribution Wizard saves the node, but doesn't seem to save the entryId or tag information that's needed to create the "kaltura tag" which is then replaced by the node content. I put a dsm($node) function call into the node_kaltura_entry_insert function and got the following results:
stdClass Object
(
[title] => John Perkins: Saturday Morning Bible Study: CCDA 2007 Video
[body] =>
[type] => kaltura_entry
[uid] => 1
[status] => 1
[created] => 1231966781
[comment] =>
[changed] => 1231966781
[promote] => 0
[sticky] => 0
[kstatus] => 0
[kaltura_video_comment] => 0
[kaltura_media_type] => 1
[kaltura_thumbnail_url] => http://cdn.kaltura.com/p/13738/sp/1373800/thumbnail/entry_id/b7z2g1cu00/version/100000
[kaltura_partner_data] => user_id@1
[kaltura_download_url] => http://cdn.kaltura.com/p/13738/sp/1373800/raw/entry_id/b7z2g1cu00/version/0
[kaltura_entry_data] => a:1:{i:0;a:24:{s:6:"height";s:0:"";s:8:"data_url";s:82:"http://cdn.kaltura.com/p/13738/sp/1373800/flvclipper/entry_id/b7z2g1cu00/version/0";s:10:"media_date";s:0:"";s:15:"notification_id";s:6:"316863";s:8:"puser_id";s:1:"1";s:8:"group_id";s:0:"";s:3:"sig";s:32:"de984f89986ce34ed621ba26addaf092";s:11:"permissions";s:1:"1";s:15:"length_in_msecs";s:1:"0";s:4:"name";s:59:"John Perkins: Saturday Morning Bible Study: CCDA 2007 Video";s:13:"signed_fields";s:262:"notification_id,notification_type,puser_id,partner_id,entry_id,name,tags,search_text,media_type,length_in_msecs,permissions,thumbnail_url,kshow_id,roughcut_id,group_id,partner_data,status,width,height,data_url,download_url,download_size,media_date,signed_fields,";s:11:"roughcut_id";s:10:"0a4jpg5qe4";s:5:"width";s:0:"";s:12:"download_url";s:75:"http://cdn.kaltura.com/p/13738/sp/1373800/raw/entry_id/b7z2g1cu00/version/0";s:6:"status";s:1:"0";s:8:"entry_id";s:10:"b7z2g1cu00";s:13:"download_size";s:0:"";s:8:"kshow_id";s:10:"n74pn3yd1k";s:11:"search_text";s:136:"John Perkins Saturday Morning Bible Study CCDA 2007 Video ccda 2007 bible study john perkins techmission christian sermon urban ministry";s:13:"thumbnail_url";s:86:"http://cdn.kaltura.com/p/13738/sp/1373800/thumbnail/entry_id/b7z2g1cu00/version/100000";s:12:"partner_data";s:9:"user_id@1";s:4:"tags";s:88:"ccda, 2007, bible, study, john, perkins, techmission, christian, sermon, urban, ministry";s:10:"media_type";s:1:"1";s:17:"notification_type";s:9:"entry_add";}}
[kaltura_tags] => ccda, 2007, bible, study, john, perkins, techmission, christian, sermon, urban, ministry
[kaltura_entryId] => b7z2g1cu00
[kaltura_admin_tags] =>
[is_new] => 1
[nid] => 67365
[vid] => 70711
)
However, when I do a dsm($node) on the "alter" case of kaltura_nodeapi, I get the following results:
[nid] => 67365
[vid] => 70711
[type] => kaltura_entry
[status] => 1
[created] => 1231966781
[changed] => 1231966781
[comment] => 0
[promote] => 0
[sticky] => 0
[revision_timestamp] => 1231966781
[title] => John Perkins: Saturday Morning Bible Study: CCDA 2007 Video
[body] =>
[teaser] => <div class="kaltura_thumb"><a href="/john-perkins-saturday-morning-bible-study-ccda-2007-video-0"><img src="/width/120/height/90" /></a></div>
[log] =>
[format] => 0
[uid] => 1
[name] => admin
[picture] =>
[data] => a:33:{s:6:"submit";s:18:"Create new account";s:7:"form_id";s:13:"user_register";s:7:"contact";i:0;s:12:"nodeslocales";a:2:{s:2:"en";s:2:"en";s:2:"es";i:0;}s:8:"og_email";s:1:"2";s:14:"picture_delete";s:0:"";s:14:"picture_upload";s:0:"";s:12:"tasks_colour";s:0:"";s:9:"firstname";s:10:"Robert D. ";s:8:"lastname";s:5:"Smith";s:23:"subscriptions_subscribe";i:0;s:17:"mimemail_textonly";i:0;s:16:"guestbook_status";s:0:"";s:15:"guestbook_intro";s:0:"";s:20:"guestbook_send_email";s:0:"";s:18:"subscriptions_auto";i:0;s:20:"subscriptions_teaser";i:0;s:19:"mass_contact_optout";i:0;s:16:"privatemsg_allow";i:1;s:28:"privatemsg_setmessage_notify";i:1;s:20:"privatemsg_mailalert";s:1:"0";s:5:"Title";s:0:"";s:11:"Description";s:0:"";s:6:"format";s:1:"1";s:7:"display";s:1:"2";s:12:"current_date";s:10:"1194988341";s:10:"current_id";s:1:"2";s:15:"googleanalytics";a:1:{s:6:"custom";i:0;}s:8:"new_role";i:0;s:12:"new_role_add";s:1:"5";s:16:"new_role_add_qty";s:0:"";s:24:"new_role_add_granularity";s:3:"day";s:5:"block";a:1:{s:5:"block";a:2:{i:18;i:1;i:45;i:1;}}}
[field_kaltura_party_video] => Array
(
)
[path] => john-perkins-saturday-morning-bible-study-ccda-2007-video-0
[revision_moderation] => 0
[tags] => Array
(
snip...
)
[_workflow] =>
[nodewords] => Array
(
)
[0] =>
[1] =>
[last_comment_timestamp] => 1231966781
[last_comment_name] =>
[comment_count] => 0
[locations] => Array
(
)
[location] => Array
(
)
[moderate] => 0
[nodeasblock] => 0
[page_title] =>
[taxonomy] => Array
(
snip...
)
[files] => Array
(
)
[readmore] =>
[content] => Array
(
[field_kaltura_party_video] => Array
(
[#access] => 1
[#value] =>
[#weight] => 0
[#printed] => 1
)
[kaltura_thumbnail_url] => Array
(
[#weight] => 0
[#value] => <div class="kaltura_thumb"><a href="/john-perkins-saturday-morning-bible-study-ccda-2007-video-0"><img src="/width/120/height/90" /></a></div>
[#printed] => 1
)
[body] => Array
(
[#weight] => 0
[#value] =>
[#printed] => 1
)
[kaltura_tags] => Array
(
[#weight] => 1
[#value] =>
[#printed] => 1
)
[links_related] => Array
(
[#weight] => 1
[#value] =>
[#printed] => 1
)
[kaltura_admin_tags] => Array
(
[#weight] => 6
[#value] =>
[#printed] => 1
)
[#children] => <div class="kaltura_thumb"><a href="/john-perkins-saturday-morning-bible-study-ccda-2007-video-0"><img src="/width/120/height/90" /></a></div>
[#printed] => 1
)
)
Thus, it appears that the $node->kaltura_entryId is not being loaded at all, and thus the complicated series of tag-replacing and theming functions doesn't get a chance to be called, or else (in the case of the tag-replacing) doesn't work properly.
Furthermore, I checked in the node_kaltura table and I saw that there was only one record in there, despite that I have created multiple Kaltura Media Nodes.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | kaltura-smallint-to-big-358937-7.patch | 1.15 KB | webchick |
Comments
Comment #1
EvanDonovan commentedAlso, I noticed that the nid and vid for the one record in the {node_kaltura} table is 65535. However, this doesn't correspond to any of the Kaltura nodes that I created.
This error occurs when I try to create mixes and playlists as well.
I can't as yet reproduce it on my localhost test site, though both the live & development sites have the issue.
Apparently, the issue is due to the fact that our nid and vid #'s on our site are >65535 and that seems to be the maximum value that the %d type supports. I haven't thought of a solution yet. If my guess is right, though, I don't know why this isn't an issue in other functions, like node_save.
Comment #2
EvanDonovan commentedOk, I resolved the issue. The node_kaltura table schema needed to be changed so that the nid & vid fields were int(10) unsigned (as they are in the node table) instead of smallint(5) unsigned. This allows the INSERT command to work when nid and vid are >65535, as they are in our installation.
I suggest that the appropriate change be made to the install file in the next version of the module. I don't think it would cause a significant impact on performance and it would bring the schema inline with the schema in other tables with an nid field, such as the node table.
Comment #3
Zohar.Babin commentedThanks EvanDonovan,
Fixed in the code and will be committed in the next release !
Comment #4
EvanDonovan commentedThank you!
Comment #6
webchickLooks like this didn't get fixed. http://drupalcode.org/viewvc/drupal/contributions/modules/kaltura/kaltur... still shows 'small' for the int columns of nid/vid.
Comment #7
webchickHere's a patch.
Comment #8
xurizaemonA partial fix exists in Kaltura's SVN in the Andromeda branch of their Drupal module. However, it doesn't support upgrade from 6.x-1.x to Andromeda as the fix is applied to hook_schema() but not hook_update_N() function.
This (related) issue is on Github @ http://github.com/GiantRobot/drupal-kaltura/issues/7 and in Kaltura forums at http://www.kaltura.org/upgrade-drupal-6x-14-andromeda-svn-retains-smalli...
Comment #9
xurizaemonHave tested this on multiple sites. Marking RTBC.
Matching fix applied to my fork of Kaltura DRUPAL-6 Andromeda branch @ http://github.com/GiantRobot/drupal-kaltura
Comment #10
xurizaemonFor inclusion in #848826: Release co-ordination issue: 6.x-1.5
Comment #11
xurizaemonfixed in 6.x-1.5