Lingua icon indicating copy to clipboard operation
Lingua copied to clipboard

Issue with Digital Signage giving page not found

Open robotjoosen opened this issue 4 years ago • 0 comments

I'm not sure what the exact cause of the issue is. But when using Digital Signage of Sterc combined with Lingua it breaks DS by redirecting to the page not found resource.

The fix is to add the context key check to the OnInitCulture, i've put it before the mgr context key check. Though this works, i'm not sure if this is the correct fix for it.

$contexts = $modx->getOption('lingua.contexts', $scriptProperties, 'web');
if (!empty($contexts)) {
    $contexts = array_map('trim', @explode(',', $contexts));
    if ($resource) {
        $currentContext = $resource->get('context_key');
    } else {
        $currentContext = $modx->context->key;
    }
    if (!in_array($currentContext, $contexts)) {
        return;
    }
}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

robotjoosen avatar Mar 11 '20 13:03 robotjoosen