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.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- craigh responded to »Using PageUtil::addVar() to load script code« 03:29 PM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
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
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
