megachriz β credited tobby β .
Here is an updated version of that hook that follows some Drupal best practices (not using $_GET, etc):
function HOOK_form_FORM_ID_alter(array &$form, FormStateInterface $form_state): void {
// Use the request stack service to access the query parameters.
$current_request = \Drupal::request();
$media_library_opener_id = $current_request->query->get('media_library_opener_id');
if ($media_library_opener_id === 'media_library.opener.bulk_upload') {
if (isset($form['actions']['save_insert'])) {
// Remove the 'save_insert' action button from the form.
unset($form['actions']['save_insert']);
}
}
}
In this case, FORM_ID is `media_library_add_form_upload` but my need was `media_library_add_form_dropzonejs` (but this is the post that gave me the solution I needed), so your FORM_ID may vary.
FWIW, I'm having the same issue. I've got a module with only my_module.info.yml
and my_module.libraries.yml
files, so I get the "No files found to analyse" warning. I created a temporary my_module.module
file, and I was able to validate that the module is indeed D10-ready.
I agree with GΓ‘bor -- maybe this "no file" issue can be a warning or even an info level. And place it in a "Compatible with next major Drupal core version (with caveats)" category instead of "Fix manually". My thinking is that a module with no executable code is technically compatible with Drupal 10...