Skip to content

Commit

Permalink
Merge pull request #47 from City-of-Helsinki/UHF-8926
Browse files Browse the repository at this point in the history
UHF-8926 User needs Administer menus and menu links -permission for this field to exist
  • Loading branch information
rpnykanen authored Oct 19, 2023
2 parents ed63e6e + 55c3eb7 commit b460507
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions helfi_navigation.module
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ function helfi_navigation_form_node_form_submit(array $form, FormStateInterface
if ($link->hasTranslation($langCode)) {
$link = $link->getTranslation($langCode);
}
$link->set('content_translation_status', $values['content_translation_status'])
->save();

// User needs Administer menus and menu links -permission for
// this field to exist.
if (isset($values['content_translation_status'])) {
$link->set('content_translation_status', $values['content_translation_status'])
->save();
}
}
}

0 comments on commit b460507

Please sign in to comment.