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.
- jmvaughn responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 12:05 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn created topic »TagIt 3.0 for Zikula« 09:34 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Initilization Works; Delete Doesn't
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Mar 15, 2003
- 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!
- Moderated by:
- Support
