Posted by sisko on February 21, 2010 at 6:34pm
Hello guys,
I'm developing my first real drupal module call samplemodule.
I have samplemodule.install with the following code in it :
<?php
// $Id$
function samplemodule_install(){
drupal_set_message('Testing the install hook : '.$phase);
# die('reaching here');
}
function samplemodule_uninstall(){
drupal_set_message('SampleModule module un-installed!');
}My problem is I get no confirmation message that my install and uninstall hooks are responding.
I need the install hook especially for setup procedures.
Can anyone tell me what I'm doing wrong ?
Comments
Little help please
Bump
Check API
Via api.drupal.org @ http://api.drupal.org/api/function/drupal_set_message/6
Try this code:
<?php
function samplemodule_install(){
drupal_set_message('Testing the install hook.', $type = 'status');
}
?>
- Ryan
Thanks but that did not work
Thanks but that did not work either.
The issue here is my hook_install is somehow not recognised nor called and so its code does not execute
I have samplemodule.install and in side it is the code below :
<?php
// $Id:
function samplemodule_install(){
#drupal_set_message('Testing the install hook : '.$phase);
drupal_set_message('Testing the install hook.', 'status');
die('reaching here');
}
function samplemodule_uninstall(){
drupal_set_message('samplemodule module un-installed!');
die('exiting');
}
What am I doing wrong or not doing ? Am I supposed to make drupal aware of my hook_install somewhere?
Please help
Finally got it ...
So I don't really know what changed but I got it working.
The weird thing is I went to the un-install modules area, and there was my module listed - I am positively certain I looked before but it was not listed.
Once I un-installed my module, my code for both hooK_install and hooK_uninstall worked fine.
My guess is I probably checked the un-install area before I had cleared cache perhaps.
Thanks for your input. Hope this helps someone else.
Mapping field problem while importing
hi, everybody,
I am totally new to drupal. I want to import data from an existing site. I installed node importer also. I am using ubercart as ecommerce application.
I uploaded the csv file , while mapping the fields the i dont see the price, sku fields. My question may not be related to this forum page but i didnt find the related page , i am having problem with this since last two days, can anyone help me, why it is not showing the price, sku fields while mapping.
You should make this a new
You should make this a new question in the forum instead of attaching it to someone else's, or no one will see your question.