After upgrading to Drupal core 8.1.10, I cannot edit nodes with user id 1 nor can nodes be translated by any user.
The log error is as follows:
Type: php
Drupal\Core\Entity\EntityStorageException: Invalid translation language (de) specified. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (Zeile 770 in /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
If I uninstall Solr Search Multilingual, Solr Search, Database Search and Database Search Defaults, the above error goes away and I can edit nodes with user id 1 and all users can edit and translate nodes.
If I re-enable Database Search and Databse Search Defaults and re-index the site, I get a message on the index status page: "Couldn't index items. Check the logs for details."
The log error is as follows:
Type: search_api
InvalidArgumentException: Invalid translation language (de) specified. in Drupal\Core\Entity\ContentEntityBase->getTranslation() (Zeile 745 in /core/lib/Drupal/Core/Entity/ContentEntityBase.php).
There is a similar unresolved issue here, which is three years old: https://www.drupal.org/node/2137815
This happened on a site which should go live soon with four languages with German as the default. I have about 60 nodes, of which 2-3 are translated into English.
Any information on how to fix this would very much appreciated.
Comments
Comment #2
criscomComment #3
drunken monkeyFirstly, did you try updating to the latest dev (or Beta 3) version of this module?
Also, Drupal 8.1 has already reached end-of-life, so maybe try updating to Drupal 8.2, too.
If none of that helps, it would help immensely if you could manage to get a backtrace for that exception. For that, go to
admin/config/development/loggingand set "Error messages to display" to "All messages, with backtrace information". (Not completely sure – if that's not enough, try enabling XDebug for your server's PHP and/or install the Drupal Devel module. One of these should do it.)If you also can't create a new index, this eliminates my primary suspect for this problem, i.e., update problems between module versions. What exactly happens if you try to create a new index with the "Content" datasource? (I expect it works fine when creating an index with other datasources?)
Comment #4
drunken monkeyComment #5
criscomHi Thomas,
thanks for you reply.
First and foremoste here is the backtrace:
I will try to update Drupal core to 8.2 tonight. The currently installed version of SearchAPI is 8.x-1.0-beta2. I will update SearchAPI to the latest dev tonight, too.
Thanks for your support! Very much appreciated!
Comment #6
drunken monkeyThanks for providing the backtrace!
This seems like the same issue that was reported (and, consequently, resolved) in #2684465-18: Taxonomy terms are not indexed as expected for multilingual sites. . Updating the Search API module should fix it.
Comment #7
criscomThanks Thomas!
Yes, updating to Drupal 8.1.2 and SearchAPI Beta 3 fixed the issue. Since composer didn't work for my update fom 8.1.10 to 8.1.2 I had to manually download the latest Drupal version and replace the core/ and vendor/ folders. Then I ran composer update and composer require.
Great support, thanks a lot, Thomas! (I feared updating to 8.1.2 would make matters worse - so wrong)
Comment #9
pyxio commentedi am having the same issue with version 8.x-1.4 using the drupal commerce composer installation base.
InvalidArgumentException: Invalid translation language (cs) specified. in Drupal\Core\Entity\ContentEntityBase->getTranslation() (line 783 of /var/www/html/ergodesk/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php).