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

Language argument doesn't passed to hooks from dialogs/areas #6117

Closed
afbora opened this issue Jan 4, 2024 · 0 comments
Closed

Language argument doesn't passed to hooks from dialogs/areas #6117

afbora opened this issue Jan 4, 2024 · 0 comments
Assignees
Milestone

Comments

@afbora
Copy link
Member

afbora commented Jan 4, 2024

Description

When you try to update the model title from dialogs in multi language setup, $languageCode returns null always. I don't remember when it's broken but I think this is a regression.

return [    
    'hooks' => [
        'site.changeTitle:before' => function (Kirby\Cms\Site $site, string $title, ?string $languageCode = null) {
             // language code returns null
        },
        'page.changeTitle:before' => function (Kirby\Cms\Page $page, string $title, ?string $languageCode = null) {
            // language code returns null
        }
    ]
];

Your setup

Kirby Version
3.9.10 & 4.0.2

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

No branches or pull requests

2 participants