I've had at least two conversations in irc with people very, very confused by the terms as both fieldable and field situation in D7, one with pwolanin, one with chx. pwolanin and chx being confused by something doesn't bode well for everyone else.
chx suggested changing 'taxonomy_term' to 'taxonomy_term_reference' to make it clear that terms are referenced by the field, rather than field values themselves (this is what differs it from a text field basically).
This kinda sorta changes some APIs - people altering stuff around the term field might need to alter the name, but I'd be surprised if anyone's doing anything that deep with term fields yet, so it'd probably be a transparent change in real terms.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | term_reference.patch | 6.85 KB | catch |
| #15 | term_reference.patch | 4.76 KB | catch |
| #13 | term_reference.patch | 4.35 KB | catch |
| #10 | taxonomy_field_name.patch | 3.89 KB | catch |
| #8 | taxonomy_field_name.patch | 3.99 KB | catch |
Comments
Comment #1
chx commentedComment #2
catchRemoved all the field_attach_*() changes since that's about term as entity, not as field. Added a bunch of changes for the formatters. See what the bot thinks.
Comment #3
Anonymous (not verified) commentedwill review today after coffee.
Comment #4
yched commentedI think I approve - although to be fair, file and image fields are also actually 'reference' fields...
- The field type 'label' is still ''Taxonomy term', though ?
- Note that formatter names don't strictly need to be '[field_type]_[formatter_name]'. We just highly recommend prefixing by the module name to avoid clashes.
Comment #5
yched commentedBTW, the entity type is 'term', so the field type name should probably just be 'term_reference' ?
Comment #6
catch'Taxonomy term reference' seemed a bit long.
If we're prepared to make an exception in the module prefix stuff and call this "Term reference" both in UI and code, I'd be really happy with that.
Comment #7
yched commentedI support #6.
Comment #8
catchOK let's see if this works. Hope test bot comes back soon...
Comment #9
yched commentedDo we want to keep 'Taxonomy term' ? (appears in the 'Field type' dropdown select in the 'Add new field' UI)
I'm on crack. Are you, too?
Comment #10
catchArgh, should review my own patches before posting :( I don't think we do, no.
Comment #11
Anonymous (not verified) commentedThis patch needs to fix function rdf_field_attach_view_alter().
Comment #12
yched commentedSide note @vangpound (& catch) about rdf_field_attach_view_alter(): #652834-35: Field formatters as render arrays
In short: remove the alter() implementation and append rdf data for the term directly in the taxo formatter(s).
If you guys think it's valid, it would be cool to open an issue and get scor comment on it ?
Comment #13
catchSee what the bot thinks of this.
Comment #15
catchComment #17
chx commentedWhy term_reference ? yched suggested this because the entity type is term but instead the entity type should be taxonomy_term. Let's be consistent with our "prefix w module" ...?
Comment #18
catchNew patch: in the code, we call it 'taxonomy_term_reference', in the UI, it's just "Term reference" - that's consistent with both module prefixes, and how we refer to terms in help text etc. and it's just abbreviated in the UI, not completely different. Hopefully that satisfies everyone here, and it makes the most sense for me (except for taxonomy_term_reference being a bit long, but that's not a big deal).
Also fixed all taxonomy test failures, didn't run whole test suite though.
Comment #19
chx commentedHm, this patch undermines my excellent business plan to operate an 1-900 phone line to explain how taxonomy works in D7. Pity :p
Comment #20
pwolanin commentedonly $0.05 for the first minute and $50 for each additional minute...
sounds good to me too - I think people already get the concept of user reference or node reference, so this will make it more apparent that we also just reference the term object via a field.
Comment #21
webchickYep. Agreed with this change. The fact that you can tag tags in D7 is already a big enough brain-screw, we don't need to make the term itself confusing, too. ;)
Committed to HEAD.