Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Digital Signage giving page not found #65

Open
robotjoosen opened this issue Mar 11, 2020 · 0 comments
Open

Issue with Digital Signage giving page not found #65

robotjoosen opened this issue Mar 11, 2020 · 0 comments

Comments

@robotjoosen
Copy link

robotjoosen commented Mar 11, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant