Migrations not being detected for source plugins with Url data parser
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3076725. -->
Reported by: [dinarcon](https://www.drupal.org/user/909522)
Related to !1
>>>
<p>Hi, thanks for the work on this module!</p>
<p>It works great for CSV migrations, but it seems not to be working with JSON or XML migrations. In buildForm() it uses the $migrationInstance->getSourcePlugin() method and check against classes that are instances of `Drupal\migrate_plus\Plugin\migrate_plus\data_parser\Json` and `Drupal\migrate_plus\Plugin\migrate_plus\data_parser\XML`. Those are the data parser classes, but getSourcePlugin() actually returns the source plugin which is `Drupal\migrate_plus\Plugin\migrate\source\Url`. Therefore the validation fails for JSON and XML files.</p>
<p>Am I overseeing something? If this is truly a bug, an alternative would be to use $migrationInstance->getSourceConfiguration() and check the `data_parser_plugin` key. I can provide a patch if this approach is desired.</p>
issue