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
Add condition to skip language if getRevisionIds() returns an empty array
Issue fork pagetree-3339267
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
pvbergen commentedComment #5
pvbergen commentedComment #6
pvbergen commented