You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to add an additional entry but when saving the order I got this error:
acclaro\translations\services\ElementTranslator::getWordCount(): Argument #1 ($element) must be of type craft\base\Element, null given, called in /app/vendor/acclaro/translations/src/services/repository/FileRepository.php on line 354
The getElementById method should also be passed a source site. When not passed, it uses the primary site, and unfortunately my entry doesn't exist there.
Here's my suggested fix (adding $order->sourceSite):
I wanted to add an additional entry but when saving the order I got this error:
acclaro\translations\services\ElementTranslator::getWordCount(): Argument #1 ($element) must be of type craft\base\Element, null given, called in /app/vendor/acclaro/translations/src/services/repository/FileRepository.php on line 354
The problem is here: https://github.com/AcclaroInc/craft-translations/blob/master/src/services/repository/FileRepository.php#L354-L355
The
getElementById
method should also be passed a source site. When not passed, it uses the primary site, and unfortunately my entry doesn't exist there.Here's my suggested fix (adding
$order->sourceSite
):I believe the same error would also be thrown on line 387: https://github.com/AcclaroInc/craft-translations/blob/master/src/services/repository/FileRepository.php#L387
The text was updated successfully, but these errors were encountered: