After updating from Drupal 8.7.x to Drupal 8.8.1, we see the error message
Either the path '/node/123' is invalid or you do not have access to it.
The error does not occur for administrators; only restricted users—who should, however, have the appropriate rights—are affected.
There are two bug reports in the Drupal Issue Queue, #3107695 in the Pathauto module and #3101344 in the Drupal core, for which no patches are available yet.
Fortunately, there are some workarounds, or two solutions, that provide a simple fix until the problem is resolved.
Workarounds
A workaround is to deactivate the 'Generate automatic URL alias' option before saving the translation and leave the URL alias field empty. After saving the translation, the page can be edited again and the 'Generate automatic URL alias' option reactivated. The URL alias will then be saved without an error message.
Another workaround, until the issue is resolved, is to grant the 'Link to any page' permission for the relevant roles. However, this has the "cosmetic" disadvantage that, for example, all menu items in the administration menu are visible even for restricted users. However, access to administrative pages remains denied despite the visible menu items.
Provisional solutions
A temporary solution that has so far worked without any side effects on our multilingual sites is proposed by @Mschudders in issue #3101344. This requires manually adding a small entry to the database for each language. Further solutions to this error can be found in the issue queue.
The following entry can be found in the node_access table of a Drupal 8.7.8 page:
mysql> select * from node_access where nid = 0;
+-----+----------+----------+-----+-------+------------+--------------+--------------+
| nid | langcode | fallback | gid | realm | grant_view | grant_update | grant_delete |
+-----+----------+----------+-----+-------+------------+--------------+--------------+
| 0 | | 1 | 0 | all | 1 | 0 | 0 |
+-----+----------+----------+-----+-------+------------+--------------+--------------+
1 row in set (0,00 sec)
After updating to 8.8.x the entry is missing:
mysql> select * from node_access where nid = 0;
Empty set (0,00 sec)
As a workaround, @Mschudders suggests manually creating the entry for each available language on the site. In the comments to this bug, he provides code that can be executed, for example, via the Drupal Console. The missing entries can be created manually using a MySQL client. Of course, the appropriate languages must be used. In this example, German and French.
INSERT INTO node_access (nid, langcode, fallback, gid, realm, grant_view)
VALUES (0, 'de', 1, 0, 'all', 1);
INSERT INTO node_access (nid, langcode, fallback, gid, realm, grant_view)
VALUES (0, 'fr', 0, 0, 'all', 1);
mysql> select * from node_access where nid = 0;
+-----+----------+----------+-----+-------+------------+--------------+--------------+
| nid | langcode | fallback | gid | realm | grant_view | grant_update | grant_delete |
+-----+----------+----------+-----+-------+------------+--------------+--------------+
| 0 | de | 1 | 0 | all | 1 | 0 | 0 |
| 0 | fr | 0 | 0 | all | 1 | 0 | 0 |
+-----+----------+----------+-----+-------+------------+--------------+--------------+
Another suggested solution comes from @rgpublic, which uses hook_validation_constraint_alter to grant the appropriate permissions to store the URL alias:
function mymodule_validation_constraint_alter(array &$definitions) {
$definitions['ValidPath']=$definitions['NotNull'];
}
In our case, the entry in the node_access table was the most convenient solution and, since we have not received any complaints from editors so far, it seems to work without any nasty side effects.