Hi there, and thanks for your great module.
I have a problem to configure my content type : I have the folowing taxonomy (this is a recipe)
- Recipe (vocabulary)
- By type
. Snack
. Ice cream- By difficulty
. easy
. medium
. hard
So I have a basic hierarchical taxonomy, By type is the parent of Snack and Ice cream and By difficulty is the parent of easy, medium and hard.
I need to show these options when creating content separately (what this module do very well with the selection of the term and the depth).
But My problem is that the native taxonomy selection provided by drupal is already here. I would like to hide it to only show the content taxonomy fields.
See my screenshot to see my problem
It is possible ? How to do that ?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Sequence_type.jpg | 192.52 KB | Axmodeux |
| taxonomy_field.jpg | 27.15 KB | zmove |
Comments
Comment #1
macco commentedRemove the association of the content in the vocabularies.
This is all handeld by the content.taxonomy-module.
Macco
Comment #2
zmove commentedI think about that way, but I don't like the way to say to drupal to not associate a taxonomy with the content it created for...
I care that this nonsense put bugs on others modules which could need the association.
It seems me more logical to keep the association between taxonomy and the content type, but to hide it.
What do you think about this reflexion and do you have a solution ?
Comment #3
mh86 commentedHi!
Nice idea and immediately fixed :)
I have implemented hook_form_alter, which means that all taxonomy form fields on node creation page get hidden, if there exists a content taxonomy field.
See diff for changes.
You need to download the updated dev snapshot (this can take some time until the project page gets automatically updated).
Comment #4
zmove commentedGood, nice, incredible, wonderfull !
B.I.G T.H.A.N.K.S
Comment #5
Axmodeux commentedHello,
It's me .... again :P
"Vive les crêpes" ^^
It was because I have the same problem that I installed Taxonomy Access Control. I changed the right on my vocabularies to hide those default combos.
I'm happy to find that I'm not alone in the case.
Then, you find a solution, mh86 ... But I don't understand how I can hide those default combos !?
We just need to have name between the category and the field ?
I join a screenshot too.
Bye
Comment #6
mh86 commentedI like crêpes, getting hungry when talking about ;)
The solution should be pretty simple... If a content type has any content taxonomy fields, all form fields generated by the taxonomy module get hidden automatically, there is no need for any settings.
@Axmodeux: as far as I remember, you have tested the version of content taxonomy, where I changed the weights. If so, and the taxonomy module still has weight 1, please change it back to 0 :)
Comment #7
Axmodeux commentedHappy
I will find some other questions, don't worry :P
Comment #8
ray007 commentedJust looked at your last checking.
Just because there is a content_taxonomy field in a content_type doesn't mean that there may not be other vocabularies associated with the contenttype. I think it would make sense to remove the taxonomy form widgets for the vocabularies used by the content_taxonomy fields, but not the whole fieldset.
Comment #9
zmove commentedHi,
I just update the content taxonomy module to test the taxonomy hiding and it don't works.
When I add a content taxonomy field in my content type, it don't hide the original taxonomy list, and I didn't see options to apply this change.
Do I make something wrong ?
Comment #10
Anonymous (not verified) commented+1
I also have found that the hiding does not work. Any updates regarding this?
Please let me know as I cannot live correctly without this module!
Comment #11
Caleb G2 commentedThe hiding is not working for me either, but commenting out "unset($node->taxonomy);" at line 126 of content_taxonomy.module lets me just use the normal taxonomy selector without having content_taxonomy.module erase what was selected. (which serves the same purpose basically)
I got that idea from this thread. Something is definitely funky, this obviously shouldn't be required....
Update: Nevermind there is another case when the terms are getting unset somewhere, so this module is more or less useless for what I'm trying to use it for at the moment...4 work hours later.
Comment #12
keathmilligan commentedI've stepped through this with a debugger and I see why the default taxonomy fields are not being hidden. The content_taxonomy_form_alter function that was added is being called before the standard taxonomy module's taxonomy_form_alter function, so at the time that the new hook function is called, the "unset($form['taxonomy']);" statement has no effect since there is not yet a taxonomy element to remove.
I don't think this is the right approach to fixing the problem any way. We need more fine-grained control over which vocabularies to handle via CCK / content_taxonomy and remove the standard fields.
Comment #13
abloodworth commentedI'd also really love it if you could keep the association with your content type the proper category (in case removing it messes up other modules), but currently I get two of the same field if I do this. Any chance this bug/feature request will still be fixed?
Comment #14
dalinI disagree with keathmilligan. Unsetting the vocabularies in question _would_ be the proper way to go about this. This should not wreck other modules. On the contrary, it's a far better technique than disassociating the vocabulary from the content type at admin/content/taxonomy, that's where other modules should be looking for this stuff.
Also I can't think of a use case where one would want two controls on the same form that are labeled the same, but only one works. So I think auto-removal of the cck generated vocabulary is the way to go. I'm of the school that believes less is more.
The way to get around this is to have the weight in the systems table of content_taxonomy to be lower than taxonomy. To get this, in the installation file, add
db_query('UPDATE {system} SET weight = 5 WHERE name='content_taxonomy');
Combining that with the hiding technique should do the trick.
Comment #15
mh86 commentedif the content taxonomy module is located in 'sites/all/modules' instead of 'modules' (where all the core modules are), then the taxonomy module gets always called before the content taxonomy without changing the weight.
Comment #16
mistresskim commentedCan someone please explain how to implement the hiding of the native taxonomy tags? Has this been coded into
the module or do I have to do select something somewhere? I'm still seeing both.
Comment #17
Oghnia commentedAny update on this problem.
This is extremely important - I can not hide it either,, any solutions
Comment #18
mistresskim commentedThis module is working for me: http://drupal.org/project/taxonomy_hide
Comment #19
Oghnia commentedI don't think taxonomy_hide works for hiding taxonomy list in forms...
Comment #20
Oghnia commentedI also thought about hiding it using CSS but the fieldset doesn't have a distinctive class to it (which is common),,, if this can be done then we can just set it to display:hide;
I have multiple taxonomies on the form therefor they are grouped in a fieldset... if we can add a class to it that should work (class="grouped_taxonomy") and maybe for single taxonomies that are not in a group the name of the taxonomy in the div
any ideas on how to do this
Comment #21
zmove commentedThe CSS solution is not that good, because if the visitor use a web browser that don't load CSS or if he disabled them, he will see the form.
Comment #22
Oghnia commentedWell I have to argue the no CSS solution,,
now if you don't want to load or u can't load CSS then you shouldn't be opening the website to begin with.
Also the website won't be useful to begin with as everything will be all over the place,, So I think CSS is not the ideal solution but its better than nothing
Comment #23
zmove commentedHi,
It's true that the CSS solution is better than nothing, but don't forget that blind people that use text based navigator will not load your CSS. They don't care about your website display, they just want to access content, and, without CSS, the content is altered because it display a form that shouldn't be.
In addition, I'm not sure that it will not break something in your website to have 2 taxonomy form input (the core one and the content taxonomy one..) what about the behavior of your #validate, #submit function etc.... ?
The taxonomy core form should definitely be removed when you use content taxonomy instead.
Comment #24
Oghnia commentedOK, I guess we just have to wait for a solution. I read the whole post but there seems to be no solution for it even though post #3 assumes a solution is there and the code is actually in the code but I don't think it does anything
Comment #25
zmove commentedHi,
I have to definitely implement that feature, I think I will provide a patch that implement a hook_form_alter() to remove the taxonomy field if content taxonomy is set up for the content type.
There is a temporary solution, it's to theme the form by defining a callback in hook_theme() in your template.php file.
I did it successfully, I'm not at work anymore, I will post the code I used tomorrow.
Comment #26
Oghnia commentedplease do.. thanks
Comment #27
zmove commentedHi,
thank you to remember it to me :)
in template.php add some instructions into an hook_theme function:
and add another function :
and clear your cache, it should work. Replace my_theme with the name of your theme, and story, with the content type you want to alter.
Comment #28
magnus commentedCleanup of old issues. According to maintainer: "active development is only done for the 6.x branch! 5.x is not supported any more".
Open a new issue if problem still exist.