Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Extensions and Distributions Support ::  Modules ::  Initilization Works; Delete Doesn't

Moderated by: Support Team

Bottom
Initilization Works; Delete Doesn't

  • Link to this postingPosted: 13.03.2003, 02:06
    Profile
    HeadHead
    rank:
    Freshman Freshman
    registered:
     March 2003
    Status:
    offline
    last visit:
    15.03.03
    Posts:
    3
    I'm beginning work on a module which adds four new tables to the database. I've gotten my initialization routine to work nicely, adding the tables and session vars that I need. But when I test "Remove", it reports that the module was removed, but the tables (and Session vars) remain in the database.

    It appears that the module_delete() function in my pninit.php file doesn't seem to be called at all. If I put my delete code up into my init block, it works without error -- adding and then deleting the same table when I initialise. That rules out a database rights issue, which I also checked.

    When I test the Template module, it works perfectly as well. When I copy the Template delete function and just change the module from "template" to my module name, and change the name of the pnTable name, I get the previous result: PN reports a sucessful removal (no error message -- and I test for DB errors), but no change to the database.

    Thanks in advance for any tips for validating my init and delete functions to get this working.
  • Link to this postingPosted: 13.03.2003, 10:38
    Profile Homepage
    dberansky
    rank:
    Professional Professional
    registered:
     June 2002
    Status:
    offline
    last visit:
    02.04.03
    Posts:
    746
    it has to work. check and double check for stupid errors, like typos, etc., especially the function name.
  • Link to this postingPosted: 15.03.2003, 22:40
    Profile
    HeadHead
    rank:
    Freshman Freshman
    registered:
     March 2003
    Status:
    offline
    last visit:
    15.03.03
    Posts:
    3
    I ended up removing all of the "function module_upgrade($oldversion)" code that I had modified only to comment out the template example code. It didn't appear that this commented out my module_delete() function, but once I got rid of that code, the delete code worked perfectly.

    Thanks for the pointer!

Start ::  Extensions and Distributions Support ::  Modules ::  Initilization Works; Delete Doesn't

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to Zikula