When entity_translation is enabled tagclouds displays terms of other languages in block even if tagclouds_language_separation is enabled
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | tagclouds-language-negotiation-2286023-15.patch | 11.39 KB | jantoine |
When entity_translation is enabled tagclouds displays terms of other languages in block even if tagclouds_language_separation is enabled
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | tagclouds-language-negotiation-2286023-15.patch | 11.39 KB | jantoine |
Comments
Comment #1
joseph.olstadTo test this patch:
(options: use autocomplete widget)
(more options: enable translation on taxonomy term reference field)
Now, this patch works great most of the time. There are some edge cases though. It just so happens that some words are the same accross different languages. For instance the word "corruption" is the same in English as it is in French, for these cases the condition in the query should not be using taxonomy_index table it should be using the field_data_field_xyz field_xyz_tid.language instead of td.language in the join. However this will require some UI work and some more stuff on the other end. The attached patch is far better than what the current implementation is (for entity_translation) but a more graceful solution should be attempted in a new issue, I'll create a new issue for that and reference this one.
Comment #2
joseph.olstadEnhancement for the patch: the content type in question should be checked for the translation type rather than a simplistic check exists on entity_translation . This will be more accurate especially for D8 as entity_translation is part of core in D8 but also work better for D7 as well.
Comment #4
joseph.olstadThe patch was modified to add a radios button and committed directly into dev and into 7.x-1.10
See release notes for 7.x-1.10 and also see readme.txt for how to use and also see source code if you really want to know more.
Comment #5
joseph.olstadComment #6
PascalAnimateur commentedI ran into errors when using the entity_translation + title modules to translate my vocabularies and terms, even when selecting 'entity' as the translation method.
Upon closer inspection of the code, I noticed it could be simplified a lot by using EntityFieldQuery instead of db_select, as this would get the translated name no matter what is used (i18n_taxonomy or entity_translation).
So I refactored the
tagclouds_get_tagsfunction to use that and it works great. I could even eliminate thetagclouds_language_separationvariable which is not needed anymore.Here's a patch!
Comment #7
joseph.olstadHi PascalAnimateur, your work looks great at first glance and it sounds reasonable. I'm going to take a passive stance on this and hope that someone from the community can provide some evaluation(s).
Comment #8
joseph.olstadLooking for some community evaluations.
Comment #9
joseph.olstadHi Martin, we should probably get this into 8.x before committing it to 7.x
since you're working on 8.x, I'm assigning this to you.
Comment #10
joseph.olstadComment #11
PascalAnimateur commentedIMHO the only thing missing for a 7.x commit would be an update hook to delete the 2 language separation variables (there's a second one with _radios suffix).
Comment #12
martin107 commented@PascalAnimateur
The refactoring of refactored the tagclouds_get_tags() provides a solution that I was looking for ... so I think that is going to be rolled into an upcoming issue. ( I will give you credit - on that issue. )
My current focus is working out the kinks in d8 branch, I am unassigning as this issue is not my immediate focus and I want to signal others are free to work on this.
Comment #13
joseph.olstadI haven't had time to test this patch, but if one other person reviews it and tests it and marks this RTBC then I'll commit it.
Thanks,
Comment #14
joseph.olstadComment #15
jantoine commentedThe attached patch:
Comment #17
joseph.olstadThe CI error will be fixed once we add a simpletest for tagclouds .. Start with a very basic one that just checks that the module installs correctly.
Comment #18
joseph.olstadhere's the related issue for fixing the CI error
#2645590: Ensure that simpletest job doesn't "fail" testing if no tests are present
Comment #19
joseph.olstadSorry I haven't had much time for tagclouds lately
If someone can please create a very basic simpletest that just checks that the module installs correctly then I'll commit this as it looks good.
we may also have to update the readme.
Comment #20
chris matthews commentedThe patch in #15 is 2 years old, but still applied cleanly to 7.x-1.x and after testing/reviewing seems ready for RTBC, but it would be good if one other person could review/test as well.
Comment #21
joseph.olstadComment #22
andrey.troeglazov commentedComment #23
andrey.troeglazov commentedPatch no longer applies, it needs more closer look, I moved it to next release.
Comment #24
andrey.troeglazov commentedComment #25
grask0 commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!