Closed (outdated)
Project:
Answers
Version:
7.x-3.0
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2012 at 23:01 UTC
Updated:
9 Nov 2018 at 17:03 UTC
Jump to comment: Most recent
Comments
Comment #1
chipcleary commentedHi @royvandijk,
I think you raise a good point.
As background, Answers is built using the Features module. This is a known issue in Features and, as it turns out, the appropriate behavior has been fairly extensively debated #1055460: Disabling a feature does not disown content type.
The concern is potentially deleting data when someone might want to reinstall Answers later.
Based on the debate above, the approach I'd suggest is that when someone uninstalls the module, the module asks: Would you like to:
Then it does the needful based on the response. How does this approach work for all?
Comment #2
maxilein commentedMy experience was this:
After installing answers i added a new field "details" to the question content type. I uninstalled Answers (because I had to identify bugs), I also deleted questions and answers types manually.
Then I reinstalled answers.
I ran into a pdo error problem, because the reinstalled module did not add the field again. the error was raised each time I tried to add a new question.
The procedure you explain above seems plausible, but it is too easy to get off track and stuck with some unexpected results.
Comment #3
chipcleary commentedHi, here is some code that will allow you to manually "clean up" after answers. It deletes content types and a menu that Answers creates.
It is not yet packaged up nicely into an uninstall module. Nor will it prevent the issue @maxilein describes in #2 above if you reinstall Answers.
Comment #4
amins commented@Chip,
How do we use this function? create a content with php codes or write a module or maybe any other way?
Thanks
Comment #5
amins commentedI found this solution: to manually delete a content type that was created by a feature: Comment #16 http://drupal.org/node/1055460#comment-4343708
Comment #6
chipcleary commented@james.icast, glad you found a solution. Probably now not helpful, but if you want to use the code in #3, the easiest way is probably to:
Comment #7
datthanhphu commentedJVmNc5msK2
Comment #8
bluegeek9 commented