Jumoo/Jumoo.TranslationManager.Issues

Translation Manager returns 404 on some views in the backoffice when on macOS

Closed this issue ยท 6 comments

Package: Jumoo.TranslationManager V 10.1.0
Env: macOS
Umbraco version: 10.2.1

Issue: some views in the backoffice return 404 (during debug only - not on published builds)

Example 1:
image
Example 2:
image

Example 3:
image

The reason this happens on mac properly has to do with the casing mismatch between the request URL and the file name; see the first example above, the name of the page in request URL is "contentApp.html", while the nuget package ships a file "contentapp.html". (Same things goes for Example two jobOptions vs JobOptions

image

Same goes for the backoffice jobs view

image

Based on a quick investigation, it seems like there are three places in the file exposed via the package where this is the case:
image

Since lots of the references are in files that are exposed, this script (which produced the report above) might be useful:

const glob = require("glob");
const path = require("path");
const fs = require("fs");

const allFiles = glob.sync("!(node_modules)**/**.*");

const issues = [];
allFiles.forEach(filePath => {
    // read all files and check if there are any refs with mismatching caseing.
    const fileContent = fs.readFileSync(filePath, { encoding: 'utf-8' });

    allFiles.forEach(fileRefPath => {
        const fileRefExp = new RegExp(fileRefPath, "ig");
        let match;

        while ((match = fileRefExp.exec(fileContent)) != null) {
            const m = match[0]
            
            if (m !== fileRefPath) {
                issues.push({ inFile: filePath, wronRequestPath: match[0], targetFileName: fileRefPath })
            }
        }
    });
});

console.table(issues)

Thanks,

yeah, I realised the way I am testing case on windows doesn't work when the package is using the Razor class library, (and getting files from a non-case sensitive NuGet cache!)

I think I have caught them all now.

version 10.1.1 - contains these fixes

https://www.nuget.org/packages/Jumoo.TranslationManager/10.1.1

Hi @KevinJump
Most of them seem to have been correct, but a couple still seem to be incorrect

1: Node content app
image

2: Bulk translation dashboard (content section root)
image

Yeah, ๐Ÿ˜ข i knew i would miss something,

Let's try again v10.1.2 https://www.nuget.org/packages/Jumoo.TranslationManager/10.1.2

I'm working on version 10.2.0 and still I have such a problem. Files: /App_Plugins/TranslationManager/components/jobOptions.html
/App_Plugins/TranslationManager/jobs/jobListView.html
are not available in the docker image.
Could you help to change it to the correct name? @KevinJump

yeah - sure looks like we missed them two.

I've done a check of the dialogs now. and on a base install everything seems to be inplace for the next releaser

v10.3.0 - will be released this week - (waiting for Umbraco v12 release to confirm everything works there).

but the nightly build below will work now

https://dev.azure.com/jumoo/Public/_artifacts/feed/nightly/NuGet/Jumoo.TranslationManager/overview/10.3.0-build.20230626.5

Hi @KevinJump
I've just tested v10.3.0 and now everything working properly on Linux machine. Thanks for your help. :)