Problem/Motivation
The website encountered an unexpected error. Try again later.
Error: Call to a member function getSupportedLanguages() on null in Drupal\tmgmt_google_v3\Plugin\tmgmt\Translator\GoogleV3Translator->getSupportedRemoteLanguages() (line 146 of modules/contrib/tmgmt_google_v3/src/Plugin/tmgmt/Translator/GoogleV3Translator.php).
Drupal\tmgmt\Entity\Translator->getSupportedRemoteLanguages() (Line: 183)
Drupal\tmgmt\Form\TranslatorForm->form() (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm()
call_user_func_array() (Line: 528)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 54)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Steps to reproduce
1. Install the Module
2. When the translations are not imported.
> [notice] The configuration was successfully updated. 788 configuration objects updated.
> [error] Message: Failed to save file due to error "/The specified file
> 'temporary://file7f5GLx' could not be copied because the destination
> directory 'translations://' is not properly configured. This may be caused by
> a problem with file or directory permissions./"
>
> [error] Message: Failed to save file due to error "/The specified file
> 'temporary://filez1OFvB' could not be copied because the destination
> directory 'translations://' is not properly configured. This may be caused by
> a problem with file or directory permissions./"
>
> [error] Message: Failed to save file due to error "/The specified file
> 'temporary://filei6gmfx' could not be copied because the destination
> directory 'translations://' is not properly configured. This may be caused by
> a problem with file or directory permissions./"
>
> [error] Message: Failed to save file due to error "/The specified file
> 'temporary://fileyp34Le' could not be copied because the destination
> directory 'translations://' is not properly configured. This may be caused by
> a problem with file or directory permissions./"
>
> [error] Message: 8 translation files could not be imported. See the log for details.
>
> [notice] Message: The configuration was successfully updated. There are /788/ configuration
> objects updated.
>
[success] Module tmgmt_google_v3 has been installed.
3. Navigate to admin/tmgmt/translators/manage/google_v3
Proposed resolution
Add a condition so that it does not fail and only call the function when the appropriate values are present
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2025-12-02 at 4.17.24 PM.png | 289.66 KB | thedrupalkid |
| #2 | getSupportedLanguages-3561005-1.patch | 1.09 KB | thedrupalkid |
Comments
Comment #2
thedrupalkid commentedComment #3
thedrupalkid commentedComment #4
thedrupalkid commentedComment #5
ritarshi_chakraborty commentedUse a latest version like 1.0.7 and check if you are still getting the error.