Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3340608
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:37:38+00:00 2026-05-18T00:37:38+00:00

I have a custom module that returns data from a web service call. It

  • 0

I have a custom module that returns data from a web service call. It comes back from an XML response, which I am converting to an array.

Once I have the array, I do:

$output = theme('search_srs_results', $data);
return $output;

But I am getting a white screen. No apache/php/watchdog errors.

I’ve done this before in another module without any difficulty. My theme hook is defined, and points to a template file, passing the $data argument. If I dump $output before it’s returned, its NULL.

$data definitely has a populated array before being themed.

If I do theme(‘item_list’, $data);, it renders, no white screen.

I tried reading the docs again on hook_theme and theme() but I don’t seem to be doing anything wrong.

Here are the theme functions:

/**
 * Implementation of hook_theme()
 */

function srs_finder_theme() {
  return array(
    'search_srs_results' => array(
      'template' => 'srs-finder-results',
      'arguments' => array('data' => null),
    ),
  );
}

/**
 * Implementation of hook_preprocess()
 */

function srs_finder_preprocess_search_srs_results(&$vars) {
  $data = $vars['data'];
}

Whats missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:37:39+00:00Added an answer on May 18, 2026 at 12:37 am

    I don’t understand why you need hook_preprocess() function at all. $data should automatically be available to srs-finder-results.tpl.php. Thats because you’re passing this variable in the call theme('src_src_results', $data) and the fact that you have declared that there is 1 argument in hook_theme().

    srs-finder-results.tpl.php file should reside in the src_finder module folder. You need to implement the code for that! (Alternatively as nikit has commented above, provide a theme_search_srs_results function. In that case you will need to remove the template array entry)

    [Note: If other users of the module want to override this theme template they can always provide their own implementation of srs-finder-results.tpl.php in the theme folder of the theme that is active.]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a module in flex in which I add a custom component.
I have custom errors configured in my web.config, but IIS 6.0 is returning the
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For
I have a few models that need to have custom find conditions placed on
I have a custom control that implements IPostBackEventHandler. Some client-side events invoke __doPostBack(controlID, eventArgs).
So I have created a custom module for Drupal 6.x and it works as
I'm not sure what I'm doing wrong here... I have a custom HashTable that
I have around ~40 custom modules and a custom skin on a DotNetNuke site
I have custom coded several enterprise applications for mid to large organizations to use
hi i would like to create a custom calendar, this calendar will have custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.