Problem/Motivation

The current site has three different languages and the Content Moderation core module is enabled and set up, Node Access module seems to work properly when there are no translations. Still, after adding translations then I started changing the states for the translations including the original node and I found out what happens next cases:

I tested this in latest version of Drupal 8 and 9 respectively, and on both versions the same bug.

Steps to reproduce

  1. Node created with original language(English) is set to Not published
  2. Translated node(Chinese) is set to Published
  3. Then you may head to the view pages for each one and both will show up, English and Chinese translations pages show up
  4. This should not be happening because Original Node(English) is not published so the shouldn't be showing up
  5. Chinese version shows up and this is fine so far

If you do the opposite stated in the steps above both translations pages won't show up, this means if you see the pages as an anonymous user you'll see You are not authorized to access this page.

Please see the attached file as an example of what I mean.

Proposed resolution

To get this fixed for the particular app, I uninstalled Node Access module and everything worked as expected after this.

Node Access module should be able to work together with Content Moderation code module.

Not sure if this issue was in the past, I found this Add language support to node access grants issue for D7

Thanks, in advance

CommentFileSizeAuthor
Screen Shot 2022-05-31 at 10.29.14.png79.54 KBalvarito75

Comments

alvarito75 created an issue. See original summary.

jungle’s picture

Version: 8.x-1.1 » 2.0.x-dev

I would move this to the latest dev branch 2.0.x which has schema added, tests added, an upgrade path provided and almost fully refactored etc.

jungle’s picture

vbory’s picture

Issue tags: -

Hi, also noticed same issue in combination with content_moderation module on Drupal 10.2.4. Are there any updates on that?

sahil.goyal’s picture

I also facing same issue in combination with content_moderation on Drupal 9.3, I have even seen this issue without any language translation content. It comes up after deployment, resulting in a 403 error. Even after removing all configurations, the issue persists. The only solution at that time is to reinstall the module and reconfigure it as it was before.

realityloop’s picture

Title: Node Access module does work with Content Moderation core module » Node Access module does work with Content Moderation core module when there are content translations