Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tito 314 posts 623 karma points
    Mar 26, 2020 @ 18:41
    Tito
    0

    Error when creating translation Umbraco 7

    Im using Umbraco 7 with latest versión (2.4.6.) I get this error: Se necesita un número positivo. (its needed a positive number) Nombre del parámetro: culture (parameter name: culture) en System.Globalization.CultureInfo.GetCultureInfo(Int32 culture) en Jumoo.TranslationManager.Core.Services.TranslationJobService.CreateJob(String name, IEnumerable`1 nodes, ITranslationProvider provider, Object options, Int32 userId) en Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController.

    I am using 1:1 translation using vorto Also i am using gridview editors, and nested content.

  • Tito 314 posts 623 karma points
    Mar 26, 2020 @ 19:06
    Tito
    0

    That error is on my local dev machine On staging i get this other error:

    No se puede insertar una fila de clave duplicada en el objeto (cant insert a row with duplicate key on the object) 'dbo.TranslateJobNodes' con índice único 'IXTranslateJobNodesPairs'. El valor de la clave duplicada es (2, 166). Se terminó la instrucción. en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) en System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) en System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) en System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() en System.Data.SqlClient.SqlDataReader.get_MetaData() en System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

    I am using Microsoft Translator Api v3 Only filled the api key because i dont know what to fill in other fields like Throttle.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Mar 26, 2020 @ 22:28
    Kevin Jump
    0

    Hi Tito,

    Can you confirm the version of the Jumoo.TranslationManager.Core.dll and the cultures you are using in the translation ?

    Only because since v2.4.x we no longer create cultures by Id, so the GetCultureInfo call we actually do now is passing the culture name (string) in. ☹

    Although maybe there are oddities dependent on the cultures being used - so its worth checking.

  • Tito 314 posts 623 karma points
    Mar 27, 2020 @ 10:37
    Tito
    0

    Thanks Kevin, that dll is version is 2.2.0 wich is weird because i installed version 2.4.6. I think may be when i installed the Microsoft connector using nuget it changed the dlls?

  • Tito 314 posts 623 karma points
    Mar 27, 2020 @ 11:13
    Tito
    0

    I have updated the dlls to latest version and now it works like on staging! Well, now I need to solve the second error, the duplicate key on dbo.TranslateJobNodes. The error happens when using the Microsoft connector. When i translate a single node it works but not when multiple nodes with children. Also i dont have set the throttle, its blank, do i have to set some value there for it to work? We are trying out the plugin translating to english but the idea is, when working, buying a license to translate to portuguese too.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Mar 27, 2020 @ 13:00
    Kevin Jump
    0

    Hi

    It looks a lot like the db has some how become out of sync/corrupted in the translation jobs tables.

    can you run the translation manager health checks (in the health checks dashboard, in developer section). these might identify any rouge entries in these tables and hopefully clear them up.

  • Tito 314 posts 623 karma points
    Mar 27, 2020 @ 14:00
    Tito
    0

    Yeah, there was an orphan node. I removed it and now i have another error. I forgot to say that the items are created, but i think the error shows when translating... Then i dont have to fill the connector options? throttle, etc The error now is this:

    Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details. en Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController.

    In the log i see these errors just before that one:

    2020-03-27 14:27:57,839 [P7000/D4/T35] WARN Jumoo.TranslationManager.Core.Services.TranslationValueService - Failed Property: [Entorno] entradillaCabecera - Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: S. Path '', line 0, position 0. en Newtonsoft.Json.JsonTextReader.ParseValue() en Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) en Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) en Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) en Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) en Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) en Jumoo.TranslationManager.Core.ValueMappers.VortoValueMapper.GetSourceValue(String displayName, String propertyEditorAlias, Object value, CultureInfoView culture) en Jumoo.TranslationManager.Core.Services.TranslationValueService.GetPropertyValue(IContent item, String alias, CultureInfoView culture) 2020-03-27 14:30:22,306 [P7000/D4/T31] WARN Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - API Error: [/translate?api-version=3.0&from=es-ES&to=en-US] BadRequest {"error":{"code":400005,"message":"The input text is not valid."}}

    I guess that error is because that vorto text property was from a original text property and as it is not saved it stores the original property not in json format...

  • Tito 314 posts 623 karma points
    Mar 30, 2020 @ 17:39
    Tito
    0

    The site i am translating at first was only in spanish. Now i have to translate to english and more languages in future. So i created Vorto text fields and edited the document types and change each property to the vorto text field. Now i have vorto fields but in data base they have plain text, no json. When i edit them in Umbraco, vorto is smart and when it gets plain text it shows the plain text as the primery language (spanish) and english language is empty. Thats ok. The problem is when using Jumoo, it trys to convert to json and sys "the input text is not valid". I have checked that if i edit a content item in Umbraco backoffice and resave the item it stores json in the database and Jumoo can translate it. But i have lots of content items and i cant resave each one... i have tried using content service but does not change the database content. I think more users could have this problem, could it be solved on the next release of Jumoo?

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Mar 31, 2020 @ 07:46
    Kevin Jump
    0

    HI

    Just looking at this, and its a bit more of an issue than taking the text :(

    when a vorto value is saved it also stores other config like the GUID of the property type (so textbox, rich text editor, etc) which we need to know before we can put the translated values back.

    I suspect you needs something to go through and manually fix the values, and then save them :( ,

    I have written a quick and dirty health check which will attempt to do this: https://gist.github.com/KevinJump/db94e963842c36aa85edca42844e793a

    it's not the fastest thing (it goes through all the content looking for vorto properties). and I would seriously test this against a backup first. but this should fix the properties when you change from text/richtext to vorto.

  • Tito 314 posts 623 karma points
    Mar 31, 2020 @ 08:59
    Tito
    0

    Wow! thank you i will try this out and comment here!

  • Tito 314 posts 623 karma points
    Mar 31, 2020 @ 14:27
    Tito
    0

    Kevin, your code worked! i changed some lines like: Description = $"Found {count} vorto properties that are not stored as JSON", To Description = string.Format("Found {0} vorto properties that are not stored as JSON", count), (i didnt know about $ (do i have to install something)

    And when saving: if (content.Published) contentService.SaveAndPublishWithStatus(content); else contentService.Save(content); So the changes are public as soon as they are saved. Now there are no vorto issues.

  • Tito 314 posts 623 karma points
    Mar 31, 2020 @ 14:31
    Tito
    0

    But the database problem keeps happening:

    No se puede insertar una fila de clave duplicada en el objeto 'dbo.TranslateJobNodes' con índice único 'IXTranslateJobNodesPairs'. El valor de la clave duplicada es (34, 5925). Se terminó la instrucción. en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

    This error happens independent of the provider selected. I have tried the following:

    • Translation health check and fix, but error persists.
    • Delete data from this tables: TranslateNodes,TranslateJobs, TranslateJobNodes

    What more can i do?

  • Tito 314 posts 623 karma points
    Apr 02, 2020 @ 20:18
    Tito
    0

    I've been trying with a content that has inside children. If i try to translate the parent including children i get the db error from above. If i go to translate each child, some get translated but on some i get this error:

    2020-04-02 21:53:45,093 [P5856/D5/T52] WARN Jumoo.TranslationManager.Core.Services.TranslationValueService - Failed Property: [Apartamentos 123] metaDescripcion - System.Collections.Generic.KeyNotFoundException: La clave proporcionada no se encontró en el diccionario. en System.ThrowHelper.ThrowKeyNotFoundException() en System.Collections.Generic.Dictionary2.get_Item(TKey key) en Jumoo.TranslationManager.Core.ValueMappers.VortoValueMapper.GetEditorAlias(String dtdGuidString) en Jumoo.TranslationManager.Core.ValueMappers.VortoValueMapper.GetSourceValue(String displayName, String propertyEditorAlias, Object value, CultureInfoView culture) en Jumoo.TranslationManager.Core.Services.TranslationValueService.GetPropertyValue(IContent item, String alias, CultureInfoView culture) 2020-04-02 21:53:45,093 [P5856/D5/T52] WARN Jumoo.TranslationManager.Core.Services.TranslationValueService - Failed Property: [Apartamentos Inside] metaTitulo - System.Collections.Generic.KeyNotFoundException: La clave proporcionada no se encontró en el diccionario. en System.ThrowHelper.ThrowKeyNotFoundException() en System.Collections.Generic.Dictionary2.get_Item(TKey key) en Jumoo.TranslationManager.Core.ValueMappers.VortoValueMapper.GetEditorAlias(String dtdGuidString) en Jumoo.TranslationManager.Core.ValueMappers.VortoValueMapper.GetSourceValue(String displayName, String propertyEditorAlias, Object value, CultureInfoView culture) en Jumoo.TranslationManager.Core.Services.TranslationValueService.GetPropertyValue(IContent item, String alias, CultureInfoView culture)

    It seems that property "metaDescripcion" is not stored correctly. I get the same errors for this other properties for the same content: "metaPalabrasClave", "nombre", etc

    But if i edit the content using backoffice and save and publish the content then can translate without problems.

    Here are the values before saving: metaDescripcion : {"values": {},"dtdGuid": "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"} metaTitulo : {"values": {},"dtdGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae"} metaPalabrasClave : {"values": {},"dtdGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae"} ubicacion : {"values": {},"dtdGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae"} descripcion : {"values": {"es-ES": "Disponen de una cama nido en el salón que comparte espacio con la mesa del comedor y la cocina completamente equipada. La capacidad es de 2 personas. 25 m2"},"dtdGuid": "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"} nombre : {"values": {"es-ES": "Apartamentos 123"},"dtdGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae"} especialidades : {"values": {},"dtdGuid": "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"} subtitulo : {"values": {},"dtdGuid": "0cc0eba1-9960-42c9-bf9b-60e150b429ae"} servicios : {"values": {},"dtdGuid": "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"} horario : {"values": {},"dtdGuid": "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"}

    And after saving on backoffice: metaDescripcion : {"values":{},"dtdGuid":"9150f9f6-8263-48b3-b790-370321691435"} metaTitulo : {"values":{},"dtdGuid":"b83ce838-f053-4920-ae93-3822416d0d1a"} metaPalabrasClave : {"values":{},"dtdGuid":"b83ce838-f053-4920-ae93-3822416d0d1a"} ubicacion : {"values":{},"dtdGuid":"b83ce838-f053-4920-ae93-3822416d0d1a"} descripcion : {"values":{"es-ES":"Disponen de una cama nido en el salón que comparte espacio con la mesa del comedor y la cocina completamente equipada. La capacidad es de 2 personas. 25 m2"},"dtdGuid":"9150f9f6-8263-48b3-b790-370321691435"} nombre : {"values":{"es-ES":"Apartamentos 123"},"dtdGuid":"b83ce838-f053-4920-ae93-3822416d0d1a"} especialidades : {"values":{},"dtdGuid":"9150f9f6-8263-48b3-b790-370321691435"} subtitulo : {"values":{},"dtdGuid":"b83ce838-f053-4920-ae93-3822416d0d1a"} servicios : {"values":{},"dtdGuid":"9150f9f6-8263-48b3-b790-370321691435"} horario : {"values":{},"dtdGuid":"9150f9f6-8263-48b3-b790-370321691435"}

    I dont know what is wrong, i can see the dtdGuid is different....

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 03, 2020 @ 08:38
    Kevin Jump
    0

    Hi Tito,

    I suspect this is a variation on the changing vorto types issue from before :(

    the dtdGuid is the value that finds the underling datatype that your vorto control is using. so this being different means that when Translation Manager is looking for the vorto control it is finding a different underling type than what is currently set.

    my guess - the underling type changed - when this happens all the existing content isn't changed until its opened up and saved, but when translation manager comes along, it reads the stored values and these point to the old property types - in its process Translation Manager also reads the vorto data type and this points to the new property type, then you get the error above. Which is we can't find the property type based on the GUID (because its old).

    I am not sure if there is a root fix we can apply in TM because we don't actually have a dependency on vorto (because its a third party package, so not always installed) we just read the JSON. but it might be another health check fix you can do to read them all and fix any out of date guid values.

  • Tito 314 posts 623 karma points
    Apr 03, 2020 @ 11:54
    Tito
    0

    Thanks Kevin, i think you are right and there is a problem with the dtdGuid. I have changed your code to this:

    var dtdId = property.PropertyType.DataTypeDefinitionId;
            var dtd = ApplicationContext.Current.Services.DataTypeService.GetDataTypeDefinitionById(dtdId);
            var vortoValue = new VortoValue();
            vortoValue.DtdGuid = dtd.Key;
            vortoValue.Values = new Dictionary<string, object>();
            vortoValue.Values.Add(defaultLanguage, value);
            property.Value = JsonConvert.SerializeObject(vortoValue);
    

    And resaved all the vorto properties on the web (5341 properties on 1127 content nodes). Now i can go child by child and translate with no problem. So i guess there are no more vorto problems. But if i go to translate de parent node and select translate all the children i get the database 'IXTranslateJobNodesPairs' error. I have tried with diferent providers and the error is the same. No errors found on translation manager health checks.

    What more can i try? i cant go content by content... :(

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 03, 2020 @ 14:43
    Kevin Jump
    0

    Hi Tito,

    I am not sure what to suggest with the index issue is almost like the incrementing values in the tables are some what out of sync :(

    If you have not translation jobs you want to keep (and it sound like they always break so probably not).

    I would suggest you drop all the Translate Tables. and delete any TranslatePlus or TranslationManager rows from the UmbracoMigration Table.

    if you then restart your site, the Translation Manager setup should kick in and recreate all the of the required tables from scratch. this then should fix it all back to fresh install.

    FYI: the throttle value in the Microsoft Translation Provider is to stop you hitting the API threshold limits within the Translator API a value of 100 equates to 100ms, it is usually enough to make sure that even on large translations you don't get any issues.

  • Tito 314 posts 623 karma points
    Apr 03, 2020 @ 16:49
    Tito
    0

    Sorry Kevin, i have done that, but the error persists....

    I have deleted all the tables, migrations, restart the site, then they have been created again. Created the translation set and set the same node with children to translate again.

    This is the full error stack trace:

    2020-04-03 18:43:47,070 [P5484/D6/T26] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Exception (3e96ced2). System.Data.SqlClient.SqlException (0x80131904): No se puede insertar una fila de clave duplicada en el objeto 'dbo.TranslateJobNodes' con índice único 'IXTranslateJobNodesPairs'. El valor de la clave duplicada es (1, 2). Se terminó la instrucción. en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) en System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) en System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) en System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() en System.Data.SqlClient.SqlDataReader.get_MetaData() en System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) en System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) en System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) en System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) en System.Data.SqlClient.SqlCommand.ExecuteScalar() en Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>cDisplayClass110.0() en Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) en Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) ClientConnectionId:21b1f415-44bf-4dac-b713-d6d4063b204d Error Number:2601,State:1,Class:14 2020-04-03 18:43:47,085 [P5484/D6/T26] ERROR Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController - Unhandled controller exception occurred System.Data.SqlClient.SqlException (0x80131904): No se puede insertar una fila de clave duplicada en el objeto 'dbo.Translate_Job_Nodes' con índice único 'IX_TranslateJobNodes_Pairs'. El valor de la clave duplicada es (1, 2). Se terminó la instrucción. en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) en System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) en System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) en System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() en System.Data.SqlClient.SqlDataReader.getMetaData() en System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) en System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) en System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) en System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) en System.Data.SqlClient.SqlCommand.ExecuteScalar() en Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass11_0.<ExecuteScalarWithRetry>b__0() en Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) en Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) en Umbraco.Core.Persistence.Database.Save(String tableName, String primaryKeyName, Object poco) en Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository.SaveJobNodePair(TranslationJobNodeDto JobNodePair) en Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository.SaveNodes(Int32 jobId, IEnumerable1 nodes) en Jumoo.TranslationManager.Core.Services.TranslationJobService.Save(TranslationJob item, Boolean updateNodes) en Jumoo.TranslationManager.Core.Services.TranslationJobService.CreateJob(String name, IEnumerable1 nodes, ITranslationProvider provider, Object options, Int32 userId, String groupId) en Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController.

    May be if you can send me some special Health check to check for some errors.. or a newer development version with logs that i can send you.

    We would love to use this package but with this problem we cant translate node by node :(

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 03, 2020 @ 17:59
    Kevin Jump
    0

    Hi Tito,

    this is really confusing, i can't recreate this in any way :( - and looking at the code i am not sure how it is happening, as the point of insertion of a new record is preceded by an existance check.

    However I have built a new version of the core dll, that does two things.

    1. it logs if there are any duplicates in the list of nodes to be added to a job.
    2. it removes any possible duplicates before going to the save process.
    3. it logs all the saves, and removals into the log before they are attempted

    now this shouldn't actually make any diffrence, but it would be great if you could try this and report any log messages you see.

    you can grab this dll from here: https://clients.jumoo.co.uk/tm/debug/

    if there are issues you should see log messages including:

    • There are duplicate nodes in this job {0}

      followed by a list of the duplicates

    • Found {0} Existing nodes for job {1}

    • Saving New JobNodePair : {0} {1}
    • Removing JobNodePair: {0} {1}

    it would be a great help if you can test this dll (and to confirm it should report itself as version 2.4.7.1 of translation manager).

  • Tito 314 posts 623 karma points
    Apr 03, 2020 @ 18:37
    Tito
    0

    Thanks Kevin, i have just tried this new dll, and the error continues. This is what its reported on the logs:

    2020-04-03 20:35:21,388 [P5484/D8/T54] WARN Jumoo.TranslationManager.Core.Services.TranslationJobService - There are duplicate nodes in this job 1 2020-04-03 20:35:21,388 [P5484/D8/T54] INFO Jumoo.TranslationManager.Core.Services.TranslationJobService - 40 36444 Inglés (Estados Unidos) Open 2020-04-03 20:35:21,388 [P5484/D8/T54] INFO Jumoo.TranslationManager.Core.Services.TranslationJobService - 40 36444 Inglés (Estados Unidos) Open 2020-04-03 20:35:21,451 [P5484/D8/T54] ERROR Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController - Unhandled controller exception occurred System.ArgumentOutOfRangeException: El índice estaba fuera del intervalo. Debe ser un valor no negativo e inferior al tamaño de la colección. Nombre del parámetro: index en System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) en Jumoo.TranslationManager.Core.Services.TranslationJobService.CreateJob(String name, IEnumerable`1 nodes, ITranslationProvider provider, Object options, Int32 userId, String groupId) en Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 03, 2020 @ 19:10
    Kevin Jump
    0

    I think that helps a little.

    So two things.

    1. can you try another updated version of that dll https://clients.jumoo.co.uk/tm/debug/

    2. Can you increment the version number in the ClientDependency.config file?

    It looks like for some reason the job does have the same nodes in it twice, now i cannot recreate this, but the node creation happens via the API but is handled with Javascript calls as it does so, so lets just make sure all the JavaScript that might have been cached has been cleared out.

    I am begging to suspect this is a javascript thing 😕

    Kevin

  • Tito 314 posts 623 karma points
    Apr 04, 2020 @ 13:10
    Tito
    0

    Congratulations! It has worked! can i use this on production or do i have to wait for a proper release?

    This is the log (it seems to be a duplicate node):

    2020-04-04 15:07:06,448 [P6944/D3/T50] WARN Jumoo.TranslationManager.Core.Services.TranslationJobService - There are duplicate nodes in this job 1 2020-04-04 15:07:06,448 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Services.TranslationJobService - 40 36444 Inglés (Estados Unidos) Open 2020-04-04 15:07:06,448 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Services.TranslationJobService - 40 36444 Inglés (Estados Unidos) Open 2020-04-04 15:07:06,542 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Found 0 Existing nodes for job 2 2020-04-04 15:07:06,558 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 39 2020-04-04 15:07:06,558 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 40 2020-04-04 15:07:06,558 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 41 2020-04-04 15:07:06,558 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 42 2020-04-04 15:07:06,573 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 43 2020-04-04 15:07:06,573 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 44 2020-04-04 15:07:06,573 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 45 2020-04-04 15:07:06,573 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 46 2020-04-04 15:07:06,573 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 47 2020-04-04 15:07:06,573 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 48 2020-04-04 15:07:06,589 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 49 2020-04-04 15:07:06,589 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 50 2020-04-04 15:07:06,589 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 51 2020-04-04 15:07:06,589 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 52 2020-04-04 15:07:06,589 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 53 2020-04-04 15:07:06,589 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 54 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 55 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 56 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 57 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 58 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 59 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 60 2020-04-04 15:07:06,604 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 61 2020-04-04 15:07:06,620 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 62 2020-04-04 15:07:06,620 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 63 2020-04-04 15:07:06,620 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 64 2020-04-04 15:07:06,620 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 65 2020-04-04 15:07:06,620 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 66 2020-04-04 15:07:06,620 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 67 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 68 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 69 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 70 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 71 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 72 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 73 2020-04-04 15:07:06,636 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 74 2020-04-04 15:07:06,651 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 75 2020-04-04 15:07:06,651 [P6944/D3/T50] INFO Jumoo.TranslationManager.Core.Persistance.Repositories.TranslationJobRepository - Saving New JobNodePair : 2 76

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 04, 2020 @ 13:15
    Kevin Jump
    0

    Hi Tito,

    technically there is nothing different than this from the current release, so would work in production - although it doesn't actually get to the main issue which is why there is a duplicate being passed to the translation every-time :(

    I would check the flow, especially that the node 36444 / Inglés (Estados Unidos) Open gets translated because that appears to be the duplicate.

    Kevin

  • Tito 314 posts 623 karma points
    Apr 06, 2020 @ 09:51
    Tito
    0

    OK Kevin, if you want me to try out other test dlls you tell me here, please Meanwhile i will use this last dll

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 06, 2020 @ 15:33
    Kevin Jump
    100

    Hi Tito,

    We've actually pushed out a new version v2.4.8 - Today if you want to be in sync with the latest version - it contains the same code but with a lot less info logging so your log files won't fill as quick as they will with the patch dll.

  • Tito 314 posts 623 karma points
    Apr 06, 2020 @ 15:54
    Tito
    0

    Great, im going to update. Thanks for your help.

  • Tito 314 posts 623 karma points
    Apr 06, 2020 @ 18:31
    Tito
    0

    Hi Kevin,

    I get this error from some items: WARN Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - API Error: [/translate?api-version=3.0&from=es-ES&to=en-US&textType=html] BadRequest {"error":{"code":400005,"message":"The input text is not valid."}} 2020-04-06 20:14:09,824 [P8208/D11/T17] ERROR Jumoo.TranslationManager.Core.Controllers.TranslationJobApiController - Unhandled controller exception occurred System.Exception: Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details.

    This is an error from the provider itself, if i choose the translator dashboard it works. I think is when it has a vorto rich text with html. It happens only in some contents with this property, others get translated.

    The problem is if you send multiple items it stops when error. The log does not offer much info, it could show the content and the property like other errors.

    In this case, it is a long text. I have tried changing the text of the vorto rich text to other smaller and it works. Also i have tried checking the split html and the send as html and doesnt work neither. When do i need to check them, what scenarios?

    Could i use a test dll version of the provider?

  • Tito 314 posts 623 karma points
    Apr 08, 2020 @ 17:56
    Tito
    0

    It seems to happen when the html text has ul, ol and li tags. I have tried on a content replacing these tags by "p" tag and it can translate it.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 09, 2020 @ 04:45
    Kevin Jump
    0

    Hi,

    If you turn debugging on for the Microsoft provider you should get a lot more detail of what is happening (including the html being sent for translation with each api call.

    add :

    <logger name="Jumoo.TranslationManager.Providers">
        <level value="DEBUG" />
    </logger>
    

    to log4net.config file.

  • Tito 314 posts 623 karma points
    Apr 10, 2020 @ 11:14
    Tito
    0

    Thanks Kevin,

    Its on the html splitting. The error happens on this part of the debug log:

    2020-04-10 13:09:37,597 [P3460/D2/T8] DEBUG Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - Blocks : 0, 1 2020-04-10 13:09:37,597 [P3460/D2/T8] DEBUG Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - Translating: 0 as one chunk 2020-04-10 13:09:37,597 [P3460/D2/T8] DEBUG Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - Chunks: 2020-04-10 13:09:37,784 [P3460/D2/T11] WARN Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - API Error: [/translate?api-version=3.0&from=es-ES&to=en-US&textType=html] BadRequest {"error":{"code":400005,"message":"The input text is not valid."}}

    It happens when it finds the first "ol" tag. Its weird because other content with ul or ol tag its translated but other content errors happen to have ul or ol tags too... I have tried minimizing the html but it doesnt work, its splitting it anyways. I have tried to edit translation.config, setting splitting to false and reboot the app pool but it keeps splitting...

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 10, 2020 @ 11:50
    Kevin Jump
    0

    Hi

    I can't get that to trigger in my html, but it looks like its happening when it encounters an empty html node (well it certainly looks like it trying to send an empty thing to translation.

    I have pushed an update out that will check for empty blocks before sending them. so now it's v2.2.2

    Install-Package Jumoo.TranslationManager.Providers.Microsoft -Version 2.2.2
    

    https://www.nuget.org/packages/Jumoo.TranslationManager.Providers.Microsoft/2.2.2

    If you can try this version, and if it still has problems, can your send me the actual html from the control that is failing (via [email protected] would be fine).

  • Tito 314 posts 623 karma points
    Apr 10, 2020 @ 18:25
    Tito
    0

    Thanks Kevin, but there must be an error with your new dll. It enters an infinite loop. In the logs i can see this line thousand times: 2020-04-10 20:19:30,343 [P3460/D5/T41] DEBUG Jumoo.TranslationManager.Providers.Microsoft.MicrosoftProvider - Empty Block

    I have downgraded to the 2.2.1 BTW the 2.2.2 dll is marked as 2.2.1 I have just sent you an email with the html so you can test it

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 14, 2020 @ 09:21
    Kevin Jump
    0

    Hi,

    Yeah I've had a look and gotten to the bottom of this now (i think)

    Install-Package Jumoo.TranslationManager.Providers.Microsoft -Version 2.2.3
    

    So - you where actually hitting the internal 5000 characters limit on the Microsoft API.

    We have workarounds for this but they didn't always work.

    In this case when a chunk of html is over 5000 characters we split it on the top level html tags - usually this is enough .. but in this case the list you had was actually 5002 characters on its own! - our process here was to split this and send it to the api, but this resulted in a broken tag (because we actually split in the middle of the html tag :(

    We did it this way because - what we do in the background is split everything first the values and then bulk send them to the API because this was :

    • A. Faster and
    • B. reduced the risk of you hitting the rate limit on the API

    However it also meant we couldn't split lower than top level, because we wouldn't know how to reconstruct the parent html around any individual chunk of translated text.

    What we have done now is split all the way down the tree, but if we hit a point where a child html tag (and child-tags) is over 5000 characters, we translate everything we have up until that point, and then translate that big chunk and then carry on bulking things up to translate.

    This does mean a few more API calls to the API - but i suspect we are only talking a few more over the whole translation process.

    Anyway, hopefully this updated provider works for you.

  • Tito 314 posts 623 karma points
    Apr 14, 2020 @ 11:28
    Tito
    0

    Great! It seems to work now, thanks!

  • Tito 314 posts 623 karma points
    Apr 13, 2020 @ 18:19
    Tito
    0

    Another thing i have seen is when i try to translate a content that has an umbraco relation (ie. it has been copied) it translates as a source the original content from the relation. I guess this is useful for sites where each language is a different site but on this case, it should figure out that in this translation set the source site and the target site is the same and should ignore relations.

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Apr 14, 2020 @ 09:28
    Kevin Jump
    0

    Hi

    Yeah, thats the code that works out where a target is based on the translation setup getting confused. It is fixed for the next release of Translation Manager.

  • Tito 314 posts 623 karma points
    Apr 14, 2020 @ 11:29
    Tito
    0

    OK, could you write on this post when next release is published so i can update? do you have a release date?

Please Sign in or register to post replies

Write your reply to:

Draft