When I uninstalled this module, the table defined in `node_convert_schema()` is not deleted. It's because the table name is defined by a contant but it is only defined in .module file. .module file is not loaded in uninstallation process and the constant is not found. As a result, the table is not deleted successfully.
The following message is shown when I used Drush command:
$ drush pm-uninstall node_convert
...
Use of undefined constant NODE_CONVERT_TEMPLATE_TABLE - [notice]
assumed 'NODE_CONVERT_TEMPLATE_TABLE'
node_convert.install:13
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | node_convert-fix_table_deletion_issue_on_uninstallation-2600758-4.patch | 1.21 KB | hgoto |
Comments
Comment #2
hgoto commentedHere is a patch. I'd like someone to test this one. Thank you in advance.
Comment #3
waverate commentedThis doesn't fix uninstalling an already existing node_convert module. However, after disabling the module and then deleting the node_convert_templates table from the database, future installations worked fine.
Steps to reproduce:
This may be close enough unless you can think of a way to fix an existing installation.
Comment #4
hgoto commented@waverate, thank you for checking the patch and sharing the issue. Thank you but I'm sorry, I cannot reproduce steps from 1 to 5 you showed (I cannot find what's wrong with the patch...). However, thanks to your comment I noticed that it's better to apply the change to the function `node_convert_update_7001()` and it may be better to use `module_load_include()` instead of `drupal_load()`.
Comment #5
hgoto commentedComment #6
waverate commented@hgoto patch at #4 is good.
Comment #7
Screenack commentedI just hit my head against this issue, so, moving from RTBC to stable will be most helpful.
Comment #8
gisleTwo years as RBTC and no response from the maintainers. Do you need co-maintainers?