Posted by Duncan Pierce on July 30, 2007 at 2:33pm
Jump to:
| Project: | Content Type Administration by Organic Group |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When you disable the OGCTA module the README states "...a reversal of any changes made during installation is performed." but in practice it doesn't re-enable the standard OG "Group details" block.
Ideally it should re-enable the standard OG block. Otherwise a note in the README (and maybe on-screen when disabling the modules) to remind users to re-enable it manually would help.
Comments
#1
You are correct that disabling the module does not bring the old block back.
However, uninstallation should as it is part of the .install file's uninstall function.
Nevertheless, I can see the value of changing this back during a simple disable instead, so I'll change this issue to a feature request and think about moving the functionality to the hook_disable function (at least, I think there is a hook like that).
#2
Done. Will be included in the next release.
Note: Sorry everyone, but I may have jacked up your blocks table. I should have been making an entry for my new block for each theme you have installed. I now do, but did not before. Consequently, you should examine the block entries for the og block, delta 0, and make sure you don't have duplicates. In my blocks table I had overwritten every theme's entry so that it said 'garland' - i.e. I had six identical entries in the table for the garland theme and none for the others. You should edit them from top to bottom (in phpmyadmin) so that the og entry for the 0 delta has the name of the other deltas it is close to.
Anyway, the new additions to my module include both a hook_enable and hook_disable.
I'm hoping that hook_enable is called at install because I removed the code from install and put it into enable. Since disable/uninstall is a two step process, there's no problem there for sure.
#3
I've checked this and my blocks table looks reasonably ok. You are correct in noting that the OGCTA block only has an entry for the selected theme (I have 2 enabled) but there doesn't appear to be any damage to the records for the standard OG blocks.
#4
Good. I think I screwed mine up while I was figuring out what was messed up in the first place. In other words, I had the install file in an intermediate state (not as it is now) and disabled, then reenabled the module. I had not looked at the blocks table before this, so I'm glad to hear that the original install file didn't screw things up.
#5