What it does (and this is only what it does): search the database for taxonomy terms that are no longer in use by any node and delete those terms (actually, two SQL statements).
This is necessary on some of my pages where people have exposed filters on views where I don't want them to choose a term (here: category) that has no items. Surely one may hack Views but that would only be the cure to the symptom not to the underlying problem (the orphaned taxonomy terms).
Since I'm using mostly tagging for my taxonomy (editors may create taxonomy terms at their own discretion) and I do not want them to have administer taxonomy privileges, this module is how I keep my vocabulaires 'clean'.
This modules implements hook_cron() and also features and administration page for the hurried user that needs to prune taxonomy immediately.
Since I'm a nice guy I would thus like to contribute this module. :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | tax_prune-6.x-1.1a.tgz | 2.78 KB | jmroth |
| #2 | tax_prune-6.x-1.1.tar_.gz | 2.73 KB | jmroth |
| #1 | tax_prune-6.x-1.0.tar_.gz | 1.12 KB | jmroth |
Comments
Comment #1
jmroth commentedComment #2
jmroth commentedAmongst a few bugs fixes I have already added a few more features:
- whitelist/blacklist
- tags based vocabularies pruning only (usually the biggest mess is in there)
- optionally removing empty vocabularies
- simulation
- disable cron (although having cron was the initial goal) ;)
Comment #3
jmroth commentedDamn bugs.
So sorry.
This will have you going when you wanna try it.
Comment #4
avpadernoHello, and thanks for applying for a CVS account; I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
As per Apply for contributions CVS access, your motivation should be expanded, and include a description of the features present in the module (including a comparison with eventual modules with similar purpose).
Comment #5
avpadernoI am changing status as per previous comment.
Comment #6
jmroth commentedAllow me the question: which would that be? Do you have any in mind? I don't ....
Comment #7
jmroth commentedOk,
at second glance there are two (!) similar modules:
As per #2 (feature list) I compare:
Clean Taxonomy
- no real UI
- no Cron
- no white/blacklist
- still in dev status
- The author is non-responsive to improvements that have already been posted for that module.
Then there is 'Delete Orphaned Terms' (maybe I could live with this).
I don't know how we could get there from the first module without a full rewrite. (What is the official procedure to get rid of that (duplicate) mess?)
The second might be worth a shot at combining efforts. But what does it help if there is a module but the maintainer is M.I.A.. I have time now, so please propose how to proceed or I'll just keep my innovation for myself. :-)
Comment #8
avpadernoThanks for your reply, jmroth.
I would first make clear that my previous comment was not because your code is less valid than the existing projects. Drupal motto is , and we tend to avoid work duplicates because we think that project with similar purpose confuse the final users. In this specific case, you could:
The motivation is not usually a valid one; if all users would prefer their own module just because they created it, then Drupal.org CVS would be full of duplicate modules. I am not saying that this is your motivation; I am just explaining a little further the reason why that motivation is not welcome on Drupal.org.
Comment #9
jmroth commentedYour are completely right with your argumentation, I actually did not search well enough it seems.
I will try to co-maintain "Delete Orphaned Terms", I am writing a patch as we speak.
THanks.
Comment #10
jmroth commentedI now created a co-maintainer request for Deleted Orphaned Terms: http://drupal.org/node/722052
Comment #11
avpadernoI am marking this report as postponed, until the current maintainer doesn't reply, or two weeks are passed.
Comment #12
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #15
avpaderno