When adding i18n to the mix of our DA sites, I noticed that the Affiliated content list uses db_rewrite_sql, which makes the lists not show all content. I'm not sure this is wanted. I would like (and thought it did) this page to behave the same as admin/content/node, which shows all nodes. Thoughts?

Comments

agentrickard’s picture

Category: task » feature
Status: Active » Postponed (maintainer needs more info)

The problem with admin/content/node is that, well, it shows all nodes.

We don't want that. We want a domain-specific view of nodes, and we want to respect node access rules for editing, and db_rewrite_sql() gives us that.

What part of i18n is breaking down here?

blackdog’s picture

Well, I would argue that our content list should behave just like the core one, except just showing the domain related nodes, which will happen since that's taken care of before db_rewrite_sql.

The problem is that an an editor should be given the choice, like core dies it, of which language to show, not be forced to switch the sites language to show nodes of that language.

agentrickard’s picture

I don't understand this statement:

The problem is that an an editor should be given the choice, like core dies it, of which language to show, not be forced to switch the sites language to show nodes of that language.

Note that I don't run multilanguage sites and may not be aware of something you find obvious. Please explain.

Screenshots are often helpful.

blackdog’s picture

When using i18n, depending on your settings, content might or might not be available for all languages, i.e. when coming to example.com/en you get english content, and swedish when coming to example.com/sv. For administrators though, this might not be the best way to find content, so the core content list shows all content, and adds a column for the nodes language, and a filter. With the domain content list, an administrator is forced to change the sites language to find content of all languages, which feels unintuitive. There's no way of getting ALL nodes for one domain in the same list.

Code:

Query before db_rewrite_sql:
SELECT n.nid, n.changed FROM {node} n  INNER JOIN {domain_access} dac ON dac.nid = n.nid  WHERE dac.realm = 'domain_id' AND dac.gid = 2  ORDER BY n.changed DESC

Query after db_rewrite_sql:
SELECT DISTINCT n.nid, n.changed FROM {node} n  INNER JOIN {domain_access} dac ON dac.nid = n.nid WHERE (n.language ='sv') AND (  dac.realm = 'domain_id' AND dac.gid = 2  )ORDER BY n.changed DESC

Note the n.language='sv' in after.

That said, I now see that core (node_admin_nodes()) also uses db_rewrite_sql, but that the language arguments never gets in to the query, which puzzles me a little.

agentrickard’s picture

Category: feature » support
Status: Postponed (maintainer needs more info) » Active

Do you have per-domain language settings in Domain Conf, or are you just using core language negotiation?

blackdog’s picture

We're using core and i18n settings, not per domain.

agentrickard’s picture

I suspect we might just want to alter this in the domain_i18n package?

agentrickard’s picture

To do that, however, we have to expose the query to alteration in some manner, I suspect.

agentrickard’s picture

Status: Active » Closed (works as designed)