Does CiviCRM work with Ninja Forms?
Fixing this will require a change to the Civi-WP plugin. In the meantime, put the following code on a new line below the one that reads $screen = get_current_screen(); which should be at line 164 of 'civicrm.shortcodes.modal.php'.

if ( ! isset( $screen-&gt;post_type ) ) return;


That should mean your fields are saved again.