Problem/Motivation
Steps to reproduce:
- Install Drupal
- Install (Enable) comment, language and content translation modules
- Add a language and configure Article as translatable, including the comment field
- Create an article and add a translation
- Comment on the article or the translation
- View the translation as anonymous, confirm you cannot see any comments (view it in the default language and confirm you can see comments)
- Disable translation of the comment field
- Confirm you can now see comments on the translated node
With translation disabled for comments field:

With translation enabled for comments field:

Proposed resolution
Comments appear on the translated node
Remaining tasks
- Agree on how this should work
- Write a patch with tests
- Review
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #47 | 2958935-47.patch | 4.14 KB | kuldeepbarot |
Issue fork drupal-2958935
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
adriancidComment #3
adriancidComment #4
cgomezgComment #5
adriancidI made a test and the is saved on the correct language, so, it seems that is on the load of the comment where the language is not filtered.
Comment #6
cgomezgComment #7
adriancidI think that this is a duplicate of: #2751267: Comments are not filtered on language. It seems to me that our problem here is related with the page cache, try to clean the cache to check if you see the comments.
Comment #8
cgomezgComment #9
adriancidComment #10
adriancidComment #12
adriancidSorry, the working patch is in #9
Comment #13
cgomezgThis patch solved my issue temporary
Comment #14
andypostPatch removes security check which is a must, probably issue in permissions of the user
Comment #15
andrew-as commentedTotally agree with @andypost.
Please go to /admin/people/permissions and check all parameters in "relation" Comment - ANONYMOUS USER.
Please pay attention to checkbox "Post comments".
If you decided :) that anonym can left their comments you will enable "Post comments" checkbox. Also if you want skip of administer moderation you can enable "Skip comment approval". I suppose we don't have bug in this case.
If steps what was described above are did but issue is staying we have to continue investigation.
Comment #16
adriancidThe user have the permissions.
Comment #17
adriancidComment #18
adriancidComment #19
alonaoneill commentedComment #20
neslee canil pintoComment #21
alonaoneill commentedPatch applied on 8.8x!
Comment #22
yogeshmpawarComment #23
cgomezgComment #24
neslee canil pintoChanging it to 8.8.x
Comment #25
neslee canil pintoComment #26
matsbla commentedLooks good.
The patch fix the issue!
Comment #27
matsbla commentedComment #28
andypostAs a bug it should have tests to make sure it fixed
Comment #30
pameeela commentedI can confirm this issue occurs, I was able to reproduce it when triaging #2712901: Unauthorized users cannot see comments of translated nodes, which I have closed as a duplicate. It is not a permissions issue either because the comments appear for anonymous on the default node, and I noticed that if you disable translation for the comment field, the comments will show on the translated node as well.
I don't know how this is supposed to work, but certainly, the issue reported is valid. I have updated the steps to reproduce based on the other issue, to make them a bit simpler.
Comment #31
raman.b commentedAdding a quick test to demonstrate the bug and fix from #20
Comment #35
doxigo commentedI can confirm this as well, the patch provided works as expected
Comment #38
bigboy commentedHad some problems with this issue as well. Don't want to duplicate my comment, so I'll just leave a link here - https://www.drupal.org/project/drupal/issues/2751267#comment-14810709
Comment #39
gaurav-mathur commentedComment #40
gaurav-mathur commentedSuccessfully Applied patch #31 for Drupal 10.1.x version. It is working as expected. Adding screenshots to refer after and before patch.
Comment #41
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Following the steps of the issue summary. I commented on the english article and as admin could see the comment on the spanish page. But when anonymous I cannot see the comments. Even though the permissions are right and comment field is translatable.
Applying the patch did not change anything.
This will need an issue summary update as the proposed solution is a question. What was decided?
Comment #44
idebr commented#2751269: Submitting a comment in the non default language redirects you to the default language is now postponed on this issue.
Updated the issue summary from a question to a statement
Comment #47
kuldeepbarot commentedUpdated patch from #31 to make it compatible with D11.4.5