Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Im using the Media module to embed youtube videos. Id like like to use this module to make the node title be the title of the video according to youtube.
If I create a view and show the embedded file field it outputs the title according to youtube correctly. I have this field as a token for title generation but when I try and use it the title is left blank.
Im not sure, but im assuming this is because the youtube title isnt stored by drupal. Is there a way to access it eg with PHP? The Automatic Nodetitles module has the same issue but ive posted here as this seems the more advanced module.
Comments
Comment #1
bforchhammer CreditAttribution: bforchhammer commentedIf it's not stored in the database, then I assume that there is a function for generating it, yes. Let's see if anyone in the Media:Youtube issue queue can tell you which one it is...
Comment #2
stefan.r CreditAttribution: stefan.r commentedThe youtube title is stored as the filename of the file object (field "filename" in the file_managed table) in MediaInternetYouTubeHandler::getFileObject(), so the PHP code for this would be:
Comment #3
Devin Carlson CreditAttribution: Devin Carlson commentedThis is fixed per #2.