Accessing logs
If your translation doesn't go through, you can access the execution logs to find out what the problem is.
For instance, the translation could fail if:
- The translation API goes offline
- The API key for the selected translation provider is missing
- Automatic translations are not enabled, so the translation post was not created
Accessing the logs
The logs are disabled by default, so you need to enable them by checking Enable logs? under Settings > Plugin Configuration > Advanced Use.
![Enabling the logs](/assets/plugins/gatomultilingual-polylang/guides/enable-logs.webp)
The logs will be available under wp-content/gatomultilingual-polylang/logs/info.log
:
![Browsing the logs in VSCode](/assets/plugins/gatomultilingual-polylang/guides/browse-logs.png)
Understanding the logs
The logs display the variables used, and the response, from executing each GraphQL query.
[2025-02-05 00:30:29] ✅ [Persisted Query with Slug: "create-missing-translation-media"][Variables: "{"translateDefaultLanguageOnly":false,"translateFromLanguage":"en","excludeLanguagesToTranslate":[],"mediaItemId":1050}"] Execution successful: {"data":{"defaultLanguage":{"code":"en"},"enabledLanguages":[{"code":"en"},{"code":"es"},{"code":"fr"}],"originMediaItem":{"id":1050,"originMediaItemTitle":"Screenshot 2025-02-05 at 8.15.07 AM-min","originMediaItemDescription":"","originMediaItemCaption":"","originMediaItemAltText":"","originMediaItemAuthorID":{"id":1},"originMediaItemParentCustomPost":null,"hasOriginMediaItemParentCustomPost":false,"polylangLanguage":{"code":"en"},"hasPolylangLanguage":true,"mediaItemIDTranslationLanguageIDs":{"en":1050}},"hasOriginMediaItem":true,"originMediaItemHasDefaultLanguage":true,"isTranslateFromLanguageProvided":true,"originMediaItemHasSpecificLanguage":true,"canTranslateOriginMediaItemFromSpecificLanguage":true,"canTranslateOriginMediaItem":true,"currentlyExistingTranslationLanguages":["en"],"missingTranslationLanguagesWithoutFilteringByInclude":["es","fr"],"hasIncludeLanguagesToTranslate":false,"missingTranslationLanguagesWithFilteringByInclude":[],"missingTranslationLanguages":["es","fr"],"hasMissingTranslationLanguages":true,"createTranslationMediaItemInputs":[{"from":{"mediaItemBy":{"id":1050}},"title":"Screenshot 2025-02-05 at 8.15.07 AM-min (es)","description":"","caption":"","altText":"","authorID":"1","customPostID":null,"polylangLanguageBy":{"code":"es"}},{"from":{"mediaItemBy":{"id":1050}},"title":"Screenshot 2025-02-05 at 8.15.07 AM-min (fr)","description":"","caption":"","altText":"","authorID":"1","customPostID":null,"polylangLanguageBy":{"code":"fr"}}],"translationMediaItems":[{"status":"SUCCESS","errors":null,"mediaItem":{"id":1051,"title":"Screenshot 2025-02-05 at 8.15.07 AM-min (es)","slug":"screenshot-2025-02-05-at-8-15-07-am-min-2-2","src":"https:\/\/gatomultilingual.local\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-05-at-8.15.07-AM-min-1.webp","parentCustomPost":null,"polylangLanguage":{"code":"es"}}},{"status":"SUCCESS","errors":null,"mediaItem":{"id":1052,"title":"Screenshot 2025-02-05 at 8.15.07 AM-min (fr)","slug":"screenshot-2025-02-05-at-8-15-07-am-min-2-3","src":"https:\/\/gatomultilingual.local\/wp-content\/uploads\/2025\/02\/Screenshot-2025-02-05-at-8.15.07-AM-min-1.webp","parentCustomPost":null,"polylangLanguage":{"code":"fr"}}}],"currentlyExistingTranslationMediaItemIDs":[1050],"allTranslationMediaItemIDs":[1050,1051,1052],"polylangSaveMediaItemTranslationAssociation":{"status":"SUCCESS","errors":null}}}
[2025-02-05 00:30:29] ❌ [Persisted Query with Slug: "translate-media"][Variables: "{"translateDefaultLanguageOnly":false,"translateFromLanguage":"en","excludeLanguagesToTranslate":[],"updateSlug":false,"languageTranslationProviders":{},"defaultTranslationProvider":"deepl","providerLanguageMapping":{"google_translate":{"nb":"no"}},"mediaItemIds":[1050]}"] Execution successful, but with errors: {"errors":[{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaTitle][to][1051][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaTitle][to][1052][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaDescription][to][1051][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaDescription][to][1052][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaCaption][to][1051][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaCaption][to][1052][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaAltText][to][1051][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}},{"message":"Provider 'DeepL' doesn't have an API key configured","locations":[{"line":551,"column":14}],"extensions":{"path":["@strTranslate(from: $originFromLanguage, to: $toLanguageLocale, provider: $translationProvider)","@underEachArrayItem","@underEachJSONObjectProperty(passKeyOnwardsAs: \"itemMediaItemId\", affectDirectivesUnderPos: [1, 2, 3, 4, 5, 6, 7, 8])","@underJSONObjectProperty(by: {key: \"to\"})","@underEachJSONObjectProperty","transformations: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","query TransformData($languageTranslationProviders: JSONObject! = {}, $defaultTranslationProvider: TranslationProvidersEnum!, $providerLanguageMapping: JSONObject! = {}) @depends(on: \"ExportTransformationDataSource\") @include(if: $executeTranslation) { ... }"],"type":"Root","field":"****transformations[metaAltText][to][1052][0]: _echo(value: $transformationSources) @underEachJSONObjectProperty @export(as: \"transformations\")","code":"GatoInternalPrefixByGatoMultilingualforPolylang\/PoPSchema\/TranslateDirective@e6"}}],"data":{"initMediaItems":[{"id":1050}],"hasMediaItems":true,"defaultLanguage":{"code":"en"},"languages":[{"code":"en"},{"code":"es"},{"code":"fr"}],"originMediaItems":[{"__typename":"Media","id":1050,"polylangLanguageLocale":{"code":"en"},"polylangLanguage":"en","originMediaItemHasDefaultLanguage":true,"isTranslateFromLanguageProvided":true,"originMediaItemHasSpecificLanguage":true,"canTranslateOriginMediaItemFromSpecificLanguage":true,"canTranslateOriginMediaItem":true,"mediaItemIDTranslationMediaItemIDLanguageIDs":{"es":1051,"fr":1052},"hasTranslationMediaItems":true,"title":"Screenshot 2025-02-05 at 8.15.07 AM-min","description":"","caption":"","altText":""}],"mediaItemIDTranslationMediaItemIds":{"1050":[1051,1052]},"translationMediaItemIdsList":[[1051,1052]],"translationMediaItemIds":[1051,1052],"translationMediaItemIdOringMediaItemIDs":{"1051":1050,"1052":1050},"emptyTranslationMediaItemVars":[{"__typename":"Media","id":1051},{"__typename":"Media","id":1052}],"hasTranslationMediaItems":true,"mediaItems":[{"__typename":"Media","id":1051,"originMediaItemId":1050,"originTitle":"Screenshot 2025-02-05 at 8.15.07 AM-min","originDescription":"","originCaption":"","originAltText":"","polylangLanguage":{"code":"es"}},{"__typename":"Media","id":1052,"originMediaItemId":1050,"originTitle":"Screenshot 2025-02-05 at 8.15.07 AM-min","originDescription":"","originCaption":"","originAltText":"","polylangLanguage":{"code":"fr"}}],"adaptedToTitle":{"1051":["Screenshot 2025-02-05 at 8.15.07 AM-min"],"1052":["Screenshot 2025-02-05 at 8.15.07 AM-min"]},"adaptedFromTitle":{"1051":[""],"1052":[""]},"adaptedToDescription":{"1051":[""],"1052":[""]},"adaptedFromDescription":{"1051":[""],"1052":[""]},"adaptedToCaption":{"1051":[""],"1052":[""]},"adaptedFromCaption":{"1051":[""],"1052":[""]},"adaptedToAltText":{"1051":[""],"1052":[""]},"adaptedFromAltText":{"1051":[""],"1052":[""]},"transformationSources":{"metaTitle":{"from":{"1051":[""],"1052":[""]},"to":{"1051":["Screenshot 2025-02-05 at 8.15.07 AM-min"],"1052":["Screenshot 2025-02-05 at 8.15.07 AM-min"]}},"metaDescription":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[""],"1052":[""]}},"metaCaption":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[""],"1052":[""]}},"metaAltText":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[""],"1052":[""]}}},"transformations":{"metaTitle":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[null],"1052":[null]}},"metaDescription":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[null],"1052":[null]}},"metaCaption":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[null],"1052":[null]}},"metaAltText":{"from":{"1051":[""],"1052":[""]},"to":{"1051":[null],"1052":[null]}}},"transformedMetaTitle":{"1051":null,"1052":null},"transformedMetaDescription":{"1051":null,"1052":null},"transformedMetaCaption":{"1051":null,"1052":null},"transformedMetaAltText":{"1051":null,"1052":null},"updateMediaItemInputs":[{"__typename":"Media","id":1051,"transformedTitle":null,"transformedSlug":null,"transformedDescription":null,"transformedCaption":null,"transformedAltText":null,"updateMediaItemInputs":{"id":1051,"title":null,"slug":null,"description":null,"caption":null,"altText":null}},{"__typename":"Media","id":1052,"transformedTitle":null,"transformedSlug":null,"transformedDescription":null,"transformedCaption":null,"transformedAltText":null,"updateMediaItemInputs":{"id":1052,"title":null,"slug":null,"description":null,"caption":null,"altText":null}}],"updateMediaItems":[{"status":"SUCCESS","errors":null,"mediaItem":{"__typename":"Media","id":1051,"title":"Screenshot 2025-02-05 at 8.15.07 AM-min (es)","slug":"screenshot-2025-02-05-at-8-15-07-am-min-2-2","description":"","caption":"","altText":""}},{"status":"SUCCESS","errors":null,"mediaItem":{"__typename":"Media","id":1052,"title":"Screenshot 2025-02-05 at 8.15.07 AM-min (fr)","slug":"screenshot-2025-02-05-at-8-15-07-am-min-2-3","description":"","caption":"","altText":""}}]}}
Notice the icons:
Icon | Description |
---|---|
✅ | The execution was successful |
❌ | The execution had errors |
If you find a ❌, that's certainly where the problem is.
If there is no ❌, then check the ✅, as they can also indicate where the problem is.
For instance, if a translation post needs to have status draft
to be updated, and it has publish
, then that's not an error, yet the translation will not go through.
In each log entry, Persisted Query with Slug indicates which query was executed. In the log above, we have:
"create-missing-translation-media"
: Query that creates the translation entries for media items"translate-media"
: Query that translates the media properties (alt, caption, etc) against the translation API, and updates the translation entries
In this case, the creation of the translation entries was successful, but their translation was not. Checking the log, it says:
"message":"Provider 'DeepL' doesn't have an API key configured"
Then, the issue is that the API key for DeepL was missing in the plugin Settings page.
Disabling the logs
Once you are done with your troubleshooting, it's a good idea to disable the logs, as they can take plenty of space in disk.