Closed (fixed)
Project:
TMGMT Translator Microsoft
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2012 at 17:48 UTC
Updated:
4 Mar 2015 at 15:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirIs it different if you try to translate something manually?
I don't think this has anything to do with the process, just an issue with the Microsoft Translator.
Comment #2
berdirComment #3
fmosca commentedThe process seem to work fine, I get the same problem if i skip the rule and simply request the translation via the usual UI.
Comment #4
berdirMoving over to the Microsoft project then.
Can you verify if this is still broken with the latest version? Are you using a bing api key or the new azure marketplace token? Can you check if the problem also occurs for another language?
Comment #5
7wonders commentedI am getting this problem also through the UI.
Microsoft translator (auto created) can not translate from English to Dutch.
Microsoft translator (auto created) can not translate from English to Swedish.
Microsoft translator (auto created) can not translate from English to German.
Or any language!
Error message:
Could not get Microsoft token. Error: ACS50001: The required field 'scope' is missing.
Comment #6
7wonders commentedTried changing line 220 in .plugin.inc to http_build_query($paramArr, '', '&') as suggested here but it didnt help :(
Comment #7
xurizaemonSuggested fix above resolved the issue for me - trick was clearing cache triggered request of a new token.
(Which suggests we might cache failed token requests? Separate issue there though.)
Comment #9
miro_dietikerThis is pretty strange, as a POST should usually be excluded from any cache...
Do you have special proxies in your setup?
Comment #10
xurizaemonNo special proxies, just a site set up to test TMGMT with the minimal modules required.
Difference was that requests for a token with
&as get parameter separator did not retrieve a token, but switching to&separator (as documented for drupal_http_request() did work.Setting
arg-separator.outputin php.ini would also prevent this issue, but I think we want to ensure the right params to drupal_http_request().The test above failed on a function which should be found in tmgmt.module, I don't think that's related to the patch here.
Comment #11
miro_dietikerThe default separator is & and not & ...
Your environment seems to have a non-standard configuration.
What version and platform/OS are you running on?
I'm not sure we really should fix this.
Comment #12
xurizaemonDebian 6.0 with Aegir, PHP 5.3.20-1~dotdeb.0.
Aegir was the origin of this setting on my site - looks like the arg_separator.output setting comes from Aegir provisioning writing an @ini_set to settings.php.
As Microsoft's service & this module appear to require the correct separator to function, would it make sense to ensure it via the patch above?
Comment #13
PatchRanger commentedEverytime I tried to request a translation, I was getting an error message at the screen, telling that Microsoft Translator can't translate from Russian to English, and in the dblog a message as follows: "Could not get Microsoft token. Error: ACS50001: The required field 'scope' is missing."
It was really weird, since at my localhost dev environment evrything was ok.
The attached patch (which is just a re-roll of an original grobot's patch) fixes it, please review.
Comment #15
xurizaemon#13: tmgmt_microsoft-http_build_query_ampersand-1649364-13.patch queued for re-testing. See #1919770: Tests failing with "Fatal error: Call to undefined function tmgmt_translator_load()" for details of why (testbot was stuck since last June).
Comment #16
PatchRanger commentedPlease note that my patch (which turned green) is a VERBATIM COPY of grobot's one. In case of commit, give credits to him, not me.
@grobot Thanks for the patch and for starting another issue for fixing test - now it is fixed.
Comment #17
berdirThanks, commited!
Comment #19
Matroschker commentedHello,
I still have this issue with the latest version. Is there any update on this, I can't believe that this is fixed.
I checked the file "tmgmt_microsoft.plugin.inc" for changes from the patch and the changes are done, but it didn't work. I got the message "Microsoft translator (auto created) can not translate from German to English."
In the module list I can see the following module versions: 7.x-1.0-alpha2+8-dev for tmgmt_microsoft
Matroschker
Comment #20
jawi commentedSame issue here with latest dev version. The microsoft translator does not work manualy or automatically. The configuration of the translator gives: Microsoft translator (auto created) unsupported.
Seems like an authentication error:
Could not get Microsoft token. Error: ACS50012: Authentication failed. Trace ID: 0008f18b-b52e-4b7a-a910-a11bf588200b Correlation ID: 91dc32c1-f5d7-4973-8fff-3db417b78c3b Timestamp: 2014-03-06 08:29:43Z
Have to try other configuration settings or solve auth error at Microsoft Translator side
Comment #21
anybodyI think the reason for the first mentioned problem (language incompatibilities) can be found here: #1649364: All languages show as "unsupported" - access token failure due to POST encoding As I stated out in #6 there, it's a problem with too long texts exceeding the limits without any error message related.
Comment #22
miro_dietikerWe have a ticket created about circumventing the limits long ago.
#1417426: Provide a way to translate texts which are too long for Microsoft Translator
Comment #23
anybody@miro_dietiker: I didn't talk about the external limits but the problem that this limit is checked, but not being output as error message (or better said it's currently output as wrong error message) in this module!
Comment #24
anybodySorry I linked the wrong issue in my comment before. The one I ment was this (Comment #6): #2009946: Microsoft translator can not translate from English to *
Could you perhaps have a true view on this in code?
Comment #25
anybodyTo sum this issue up, #13 solves the problem for different environments and another reason for problems may be misconfiguration of your authentification (wrong "Microsoft Customer ID" or "Primary Account Key" entered.
So the final solution here seems to be:
1. Better document which authentication keys to use (as described in #2009946: Microsoft translator can not translate from English to *) - so can be handled in that issue
2. To apply the patch from #13 to the .dev release.
Agreement?
Comment #26
akalam commentedPatch does not apply, patch is allready committed