Drupal theme function is not called?

No replies
Last seen: 10 years 3 weeks ago
Joined: 2011-04-18

I am trying to create a theme function that create a little iframe for my videos. I am calling the function in my menu callback function. The problem is that the theme function is not called. I tried to append the module name at the beginning of the theme function and also removed and it didn't help. I clear the cache every time I make changes and enabled the backtrace in my devel module and I see the following warning:

warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'mymodule_mobile_mymodue_mobile_build_iframe' not found or invalid function name in call_user_func_array() (line 656 of /var/www/includes/theme.inc). =>

function my_callback_function(){
$output = theme('mymodule_mobile_build_iframe',array(
'arg1'=> $stream,
'arg2'=> $node->nid,)
return $output

function mymodule_mobile_theme(){

return array(
'mymodule_mobile_build_iframe' => array(
'arguments' => array(
'arg1' => NULL,
'arg2' => NULL,),),);


function theme_mymodule_mobile_build_iframe($arg1,$arg2){

$host = 'http://www.myhost.com';

$output = '<video width="320" height="240" controls="controls"> <source src=
"'.$host.'/'.$arg1.'/'.$arg2.'/playlist.m3u8" type="video/mp4" />
Your browser does not support the video tag.

return $output;

Thank you all in advance!

Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:

Contact us

Below are the supported keyboard shortcuts for our video player.

Start / stop video
Go to next video
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
Jump to a percentage (2 is 20%, for example)
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
1 month
6 months
10% off
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.