Drupal 8 -- patch, drupalpatch
The core of druapl may have vulnerabilities, so we need to patch them. Many patches have been written. Here I will talk about how to install these patches.
For this problem: the drupal8 core bug causes two identical error prompts.
1. Open the composer. json file in the outermost layer of the project.
2. Make sure "enable-patching": true
3. Add a patch in "patches "{...}
4. Add a patch in the following format:
"Drupal/core": {"Fix: Duplicate AJAX wrapper around und a file field https://www.drupal.org/node/2346893": "https://www.drupal.org/files/issues/duplicate_ajax_wrapper-2346893-176.patch "}
Where "Fix: Duplicate AJAX wrapper around und a file field https://www.drupal.org/node/2346893" is the description field, problem name + solution link;
The "https://www.drupal.org/files/issues/duplicate_ajax_wrapper-2346893-176.patch" field opens the address for the patch file;
Patches are classified. In this example, we use vulnerabilities in core. Therefore, we need to write them in "drupal/core" {}. Each patch in it uses ',' as the interval.
5. Run composer install in the project directory
6. OK. The patch is complete.