fix: force default language on contactDatabase write to prevent silent drop in EN context
All checks were successful
Deploy Production / Deploy to Production (push) Successful in 24s
All checks were successful
Deploy Production / Deploy to Production (push) Successful in 24s
Kirby's Form system strips translate:false fields when the current language is not the default, so update() in an EN request silently discarded the contactDatabase payload. Explicitly passing the default language code ensures the write always targets white-papers.fr.txt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
effe6ec547
commit
7ceb07f2b0
1 changed files with 6 additions and 2 deletions
|
|
@ -90,8 +90,12 @@ return [
|
|||
];
|
||||
}
|
||||
|
||||
kirby()->impersonate('kirby', function () use ($page, $entries) {
|
||||
page('livres-blancs')->update(['contactDatabase' => \Kirby\Data\Data::encode($entries, 'yaml')]);
|
||||
$defaultLang = kirby()->defaultLanguage()->code();
|
||||
kirby()->impersonate('kirby', function () use ($entries, $defaultLang) {
|
||||
page('livres-blancs')->update(
|
||||
['contactDatabase' => \Kirby\Data\Data::encode($entries, 'yaml')],
|
||||
$defaultLang
|
||||
);
|
||||
});
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue