Resolve "White screen of death on creating new project"
What does this MR do and why?
When disabling/unchecking all imported sources under Admin > General > Visibility & Access controls
, the New project
page (projects/new
) fails loading and throws a JS error as some input elements are not available on the page and thus event listeners cannot be added.
This regression was most likely introduced in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/projects/project_new.js#L279 when we migrated jQuery selectors to native JS selectors.
This MR adds a sanity check for the relevant inputs.
Screenshots or screen recordings
N/A
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #366308 (closed)