Content selection is about selecting the right content to display on the page, not about access permissions. For some pages, it is blocking specific terms or nodes from loading, when using multiple loading for entities.

We should try to make it different from access control as much as possible and not rewrite queries loading specific nodes or terms. I.e:

For a typical term listing page, there are two steps: first we select which terms to display (usually a listing query) and second we load all that terms (multiple entity loading). While rewriting the first query is useful for our purpose, that should be enough for selecting the right content for the language and we should not be rewriting the second one, which is loading specific term ids. Atm this is clasing with some other usages of multiple loading.

For node menu items, which is a bit more complex, we are using it to filter out the nodes that are displayed on a menu. But we don't really need to, as we can do it later with i18n_menu_localize_tree().

So, the plan: Do not rewrite queries that load specific nids or tids.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Status: Active » Needs review
Issue tags: +Needs change record
FileSize
2.77 KB

This is the patch. Do not alter queries that have 'nid IN ()' or 'tid IN ()' conditions.

The side effect is that if any other module is trusting menu item language selection through node access it will display all nodes now. The solution: Use i18n_menu_localize_tree()

Jose Reyero’s picture

Status: Needs review » Fixed

Committed.

This should fix many related issues about proper content/terms not showing up.

Automatically closed -- issue fixed for 2 weeks with no activity.