Closed (fixed)
Project:
Drupal PM (Project Management)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Mar 2015 at 04:54 UTC
Updated:
6 Apr 2015 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dbt102 commentedThis patch leaves a clean db.
Comment #2
dbt102 commentedComment #3
dbt102 commentedComment #4
d34dman commentedHi dbt102,
Thanks for reporting the bug.
Those two fields are shared between various pm content types. So it should be the responsibility of individual projects to take care of it, instead of pm.
Also we should be using field_delete_instance. It could be possible that the webadmin could have "re used" the field somewhere else. If you set the second paramter to TRUE, it would delete those tables if no body else is using the field.
This could be a bug if one of our sub project (pmissue/pmtimetracking ...) is not calling field_delete_instance in uninstall. If those fields are being reused, then what you saw is the expected behaviour.
So can you elaborate on which all modules were enable and then disabled and uninstalled please?
Comment #5
dbt102 commentedHi D34dMan,
Thanks for looking at this issue. There were several things I noticed in terms of unexpected behaviors when I fully installed (enabled all submodules then created nodes using all content types), used, then tried to fully uninstall PM in an existing site (on my local_dev). To better understand what was going on (what the issue really was) I decided to setup a new PM basic install.
To do this I setup a new site D7.35, with just two additional contrib modules (admin_menu and module_filter). Then I loaded PM using the Drush command 'drush en -y pm' . So this got me setup quickly, and installed PM 7.x-2.0
I also setup a 2nd local install so I could compare pm 7.x-2.0 to 7.x-2.x-dev . For this I setup a new site D7.35, with the same two additional contrib modules (admin_menu and module_filter). This time I cloned PM into sites/all/modules and then, using drush added in all the PM module dependancies. Then I enabled only the PM base module.
So at this point I had two separate fresh (no content) sites with PM 2.0 on the one, and PM 2.x-dev on the other.
On the PM 2.0 site, I checked to make sure that the PM base module was already enabled during the "drush en -y pm" install, and it was. Then I checked the db to see what PM fields were enabled thus far. Those are the 4 listed in this issue. So I disabled the PM base module, then uninstalled it, and checked the db again, and those fields were still there.
On the PM 2.x-dev site, I enabled just the PM base module, checked it the same way, and the results were the same.
I realize those two fields are shared between multiple sub-modules, and I saw other kinds of issues there, but I thought it easiest to start with what I assumed would be expected the expected 'normal' behavior.
Comment #6
d34dman commentedThanks for the detailed report. It is indeed a bug, pm core module is not supposed to create any field. Assigning this issue to myself as fixing this requires a different approach (cleaning up install file). Thanks a lot dbt102. Would commit a fix to dev soon.
Comment #7
d34dman commentedComment #9
d34dman commentedThis should be fixed in latest Dev ( as per commit in #8 )
Comment #10
dbt102 commentedNope. That commit, IMHO, made matters worst. (sorry, don't mean that to be critical)
To test your new commit, I moved my old PM directory to the trash, dropped the db and reinstalled my 2.x-dev test site. Then I cloned PM again, and enabled only the PM base module. When I did this, I got the message that the dependancies would be installed first, and I noticed that one of those dependencies listed was the PM permissions module. When enabling was complete, I rebuilt the permissions (as per notice).
Then, when I checked the db, there were no pm related entries. So I tried to disable the modules, but could not because they were both greyed out.
Comment #12
d34dman commentedComment #13
dbt102 commentedOk that looks better ...
I did a 'git pull' from local pm2.x-dev than was able to delete both pm_permissions and pm_base. The uninstalled them OK. Then checked the db. That was clean.
Nice job. Changed status to rtbc.
Comment #14
d34dman commentedAlready committed, thanks for testing. you are awesome!