The first time I used this module, I was panicked that I was going to unintentionally convert all entities in one bundle to the other bundle, even though I knew I had only selected a handful of entities. And even now that I'm confident how the module works, I still worry every time that I might have made accidental selections.
The warning message before you convert reads,
Are you sure you want to convert all selected entities of type page to type landing_page?
If this could be modified to replace "all" with a count of selected entities, this would allow the user to feel confident they were converting exactly what they intended. So instead you'd see, for example:
Are you sure you want to convert 3 selected entities of type page to type landing_page?
Sadly this is beyond my Drupal 8 skills, so I can't provide a patch, but I thought I'd offer up the suggestion anyway.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | convert_bundles_entity-count-msg_3053275-3.patch | 1.22 KB | brightbold |
| #2 | 3053275-2.patch | 917 bytes | el1_1el |
Comments
Comment #2
el1_1el commentedI havent tested it, but give this patch a try if you can and see if it does the trick.
Comment #3
brightboldSweet! This patch works and I was going to RTBC, but then decided to make it a little fancier with FormatPlural so it will say "1 selected entity" or "X selected entities". (Okay, so maybe I was too quick to say I had no D8 module skills. But I'm usually front-end.) I also cleaned up a coding standards whitespace thing.
I've tested this and it works but you should definitely check and make sure it meets your standards in case I did something wonky.
Comment #5
el1_1el commented