If you get an error "An element with a “root” ID already exists" in your Magento 2, it is, most likely, related to a third-party extension that calls methods to re-render a page.
To fix the "An element with a “root” ID already exists" error:
1. Find a PHP file and a line that throws an exception.
2. Open CLI (terminal), navigate to the Magento root directory, and run the following commands to find the proper file:
grep vendor/ -re ' ID already exists'
grep app/ -re ' ID already exists'
As a result, you will get an output similar to this:
vendor/magento/framework/Data/Form.php: 'An element with a "' . $elementId . '" ID already exists.'
vendor/magento/framework/Data/Test/Unit/FormTest.php: $this->expectExceptionMessage('An element with a "1" ID already exists.');
vendor/magento/framework/Data/Structure.php: new \Magento\Framework\Phrase('An element with a "%1" ID already exists.', [$elementId])
3. Then open each fi