Copied to clipboard

Flag this post as spam?

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


  • Leon 14 posts 105 karma points
    Aug 19, 2021 @ 11:54
    Leon
    0

    Translation Manager uploading translated content error

    Hi,

    I am trying to upload a translated file and am recieving a "The relative virtual path '~supload/20210817113134en-US_es.xlf' is not allowed here."

    It seems similar to the upgrade issue found on https://github.com/Jumoo/Jumoo.TranslationManager.Issues/issues/13 however we haven't updated to 8.7.2 and are currently on 8.5.0.0 and haven't changed default translation folder.

    Any help would be appreciated :)

    Stack Track: System.ArgumentException: The relative virtual path '~supload/20210817113134en-USes.xlf' is not allowed here.
    at System.Web.VirtualPath.FailIfRelativePath()
    at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
    at System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath)
    at Umbraco.Core.IO.IOHelper.MapPath(String path, Boolean useHttpContext) in D:\a\1\s\src\Umbraco.Core\IO\IOHelper.cs:line 105
    at Jumoo.TranslationManager.Connector.Xliff.XliffFileConnector.Check(TranslationJob job)
    at Jumoo.TranslationManager.Core.Services.TranslationJobService.
    _93.MoveNext()

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Aug 19, 2021 @ 12:24
    Kevin Jump
    0

    Hi,

    What version of Umbraco do you have installed, and are you on a hosted platform (e.g Umbraco.Cloud, azure ?)

    It might be related to the things we fixed in the later versions, but i am just having a check now to confirm we didn't break something back then too.

    Kevin

  • Leon 14 posts 105 karma points
    Aug 19, 2021 @ 13:03
    Leon
    0

    Hi Kevin,

    Thanks for the swift reply!

    We're using Umbraco 8.6.1 and no, we're just using the default self hosted 'version'.

    Thanks leon

  • Leon 14 posts 105 karma points
    Aug 27, 2021 @ 08:54
    Leon
    0

    Hi,

    Sorry to ping again, just wondering if you had a chance to check had been broken previously?

    Also something I never mentioned, the translations work fine in our Dev enviroment but it's when it has been upgraded to UAT that we are seeing this error however I don't believe it's a permissions error as I can see the file being uploaded into the xliff_translationsupload folder.

    Kind Regards

    Leon

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Aug 27, 2021 @ 10:08
    Kevin Jump
    0

    Hi,

    yeah there is nothing noted as being fixed for standard media folder. and as you say it works on your dev environment,

    so guessing something media ish must be slightly diffrent between dev/live.

    if you go to the translation job you are having an issue with and node the job id (last bit of the URL) .

    eg. job 1 would have the url

    https://yoursitehere/umbraco#/translation/jobs/edit/1
    

    and then try this on the site

    https://yoursitehere/umbraco/backoffice/TranslationManager/TranslationJobApi/Get/1
    

    it will return the job object. which will look something like:

    <TranslationJob xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Jumoo.TranslationManager.Core.Models">
        <Id>1</Id>
        <Key>654faa7a-c64f-4201-a974-7bb2a0687fad</Key>
        <Created>2021-08-19T12:32:57.31Z</Created>
        <GroupId>cfda6d09-3145-431a-9792-3eceef097d6f</GroupId>
        <Name>Home +children - 19/08/2021, 13:32</Name>
        <NodeCount>0</NodeCount>
        <Nodes i:nil="true"/>
        <Options>
            <AutoApprove>false</AutoApprove>
        </Options>
        <ProviderKey>f82e8c79-36cc-4b77-bb52-dcc186168046</ProviderKey>
        <ProviderName>Xliff File Connector</ProviderName>
        <ProviderProperties>{"format":"xliff.2.0","fileLocation":"/media/xliff_translations//20210819_133259_en-US_fr.xlf","uploadedFile":"/media/xliff_translationsupload/20210819_133259_en-US_fr.xlf_en-US_fr-FR.xlf","split":true,"extension":"xlf","folder":"/media/xliff_translations","removeBlanks":false}</ProviderProperties>
        <Received>2021-08-27T09:52:46.537Z</Received>
        <SetKey>8f589ddd-de6c-4a07-bb6e-787f922b3e08</SetKey>
        <SourceCulture>
            <DisplayName>English (United States)</DisplayName>
            <Id>1033</Id>
            <Name>en-US</Name>
            <ThreeLetterISOLanguageName>eng</ThreeLetterISOLanguageName>
            <ThreeLetterWindowsLanguageName>ENU</ThreeLetterWindowsLanguageName>
            <TwoLetterISOLanguageName>en</TwoLetterISOLanguageName>
        </SourceCulture>
        <Status>Submitted</Status>
        <StatusLocalName i:nil="true"/>
        <Submitted>2021-08-19T12:32:59.283Z</Submitted>
        <TargetCulture>
            <DisplayName>French</DisplayName>
            <Id>12</Id>
            <Name>fr</Name>
            <ThreeLetterISOLanguageName>fra</ThreeLetterISOLanguageName>
            <ThreeLetterWindowsLanguageName>FRA</ThreeLetterWindowsLanguageName>
            <TwoLetterISOLanguageName>fr</TwoLetterISOLanguageName>
        </TargetCulture>
        <UserId>-1</UserId>
    </TranslationJob>
    

    what actually matters is the providerProperties setting :

    <ProviderProperties>{"format":"xliff.2.0","fileLocation":"/media/xliff_translations//20210819_133259_en-US_fr.xlf","uploadedFile":"/media/xliff_translations/upload/20210819_133259_en-US_fr.xlf_en-US_fr-FR.xlf","split":true,"extension":"xlf","folder":"/media/xliff_translations","removeBlanks":false}</ProviderProperties>
    

    and what it says for fileLocation ? - which should be the media folder ?

    also check the settings in the xliff connector ?

    enter image description here

    default is /media/xliff_translations

    the path should have no ~ in it.

  • Leon 14 posts 105 karma points
    Aug 27, 2021 @ 10:44
    Leon
    0

    Hi Kevin,

    Thanks for the information. I've also realised that the media folder is setup as a virtual directory, but everything saves correctly within the media folder.

    I've followed the steps provided and this is the Provider Properties of the translation job in question.

    <ProviderProperties>{"format":"xliff.2.0","fileLocation":"/media/xliff_translations//20210817_113134_en-US_es.xlf","uploadedFile":"supload/20210817_113134_en-US_es_test.xlf","split":true,"extension":"xlf","folder":"/media/xliff_translations","removeBlanks":false}</ProviderProperties>
    

    The File Location seems fine, but for some reason the uploadedFile looks to trim the beginning of the path off (which might be intended). But the path the uploaded file actually gets saved into is /media/xliff_translationsupload/FileName

  • Leon 14 posts 105 karma points
    Sep 01, 2021 @ 10:29
    Leon
    0

    Hi,

    So it seems issue is caused by the virtual directory. Removing the Virtual Directory and reuploading the translation file causes no errors.

    Do you know if there could be any suggested fix/workaround other than to remove the virtual directory?

    Just an additional note, we're happy to upgrade to the last version if this will resolve the issue :)

    Cheers Leon

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Sep 01, 2021 @ 11:13
    Kevin Jump
    100

    Hi Leon,

    I can confirm this is fixed in 8.7.x versions of Translation manager (which will work with Umbraco v8.6. versions)

    I just recreated it with 8.5.0 - and upgraded and it was fixed (you have to upload the file to the job again once its upgraded but it works).

    I think the fixes for cloud/azure media we did also fixed this issue.

  • Leon 14 posts 105 karma points
    Sep 17, 2021 @ 08:20
    Leon
    1

    Hi Kevin,

    Just realised I never came back and confirmed.

    Upgraded and it uploads fine now!

    Kind Regards Leon

Please Sign in or register to post replies

Write your reply to:

Draft