diff --git a/helfi_navigation.module b/helfi_navigation.module index 5a5f714..55d89a6 100644 --- a/helfi_navigation.module +++ b/helfi_navigation.module @@ -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(); + } } }