Problem/Motivation

If a language with no existing translation in any menu is activated in the pagetree, an InvalidQueryException is thrown:

Drupal\Core\Database\InvalidQueryException: Query condition 'nfr.vid IN ()' cannot be empty. in Drupal\Core\Database\Query\Condition->condition() (Zeile 117 in /var/www/public/core/lib/Drupal/Core/Database/Query/Condition.php).

This is due to line 261 in Service/Tree.php:
$query->condition('nfr.vid', $vids, 'IN');
where $vid is empty if there are no translations of any nodes in the language in the menus selected for the pagetree.

Proposed resolution

Skip language if getRevisionIds() returns an empty array.

Remaining tasks

  1. Add condition to skip language if getRevisionIds() returns an empty array

Issue fork pagetree-3339267

Command icon 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

pvbergen created an issue. See original summary.

pvbergen’s picture

Issue summary: View changes

  • pvbergen committed 571bda75 on 2.x
    Issue #3339267: Query exception if no translations in active language
    
pvbergen’s picture

Issue summary: View changes
pvbergen’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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