Hello - This is regarding EE 2.0.2 build 20100430
I have a module with an action - It seems to be installed correctly:
//upd.zipsearch.php
function install()
{
$data = array(
'module_name' => 'Zipsearch' ,
'module_version' => $this->version,
'has_cp_backend' => 'n',
'has_publish_fields' => 'n'
);
$this->EE->db->insert('modules', $data);
$sql = "INSERT INTO exp_actions (class, method) VALUES ('Zipsearch', 'do_zip_search')";
$this->EE->db->query($sql);
return TRUE;
}Looking at phpmyadmin, I can see that the module does appear to be installed correctly. I can also see that the associated action ID is 27. The class is “Zipsearch” (The classname I’m using for the module class) and the method being used is “do_zip_search” which should relate to the do_zip_search() function which is present in my module class.
However, if I go to http://mysite.com/index.php?ACT=27, all I get is a blank page. If I go to ACT=10 (which is the action ID of the search module), it will perform as expected.
I’m confused because the module name, classname, constructor function and the related “do_zip_search()” function all seem to be correct.
Debugging shows that the last sql call was:
SELECT `class`, `method`
FROM (`exp_actions`)
WHERE `action_id` = '27'Which results in the correct action class and method being shown.
I also have debugging turned on in /webroot/index.php, and I still receive a completely blank screen (no errors).
Any ideas?
How does mod.zipsearch.php’s do_zip_search() method look - what does it return? If you put a die(“Hi there!”) in it, do you see that text when you go to http://mysite.com/index.php?ACT=27 ? If so you know it’s getting called, and it’s probably something wrong with the way you return the data.
woops, let this one slip by.
I have edited do_zip_search() to only return true, return false, do nothing at all and to have all the code in there I want, all with the same affect of generating a blank screen.
Iterations I’ve done:
function do_zip_search() {
return true;
}
function do_zip_search() {
return false;
}
function do_zip_search() {
//do all sorts of stuff
}
function do_zip_search() {
}
function do_zip_search() {
die('for the love of god, please show up');
}Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.