Using fill command to empty a small area (using minecraft:air) is typically successful, but certain items get dropped as an item instead of being replaced.
I have done several tests, affected items include:
Ladders, detector rails, activatior rails, powered rails, repeaters, and comparators.
Results seemed inconsistent at first, with said blocks being properly replaced sometimes. I was able to reproduce the effect though.
These items when placed on the bottom of the fill area would be properly removed, but if the were on a level surface 2 blocks up, they were not removed properly. See screenshots.
Linked issues
relates to 1
Attachments
Comments 7
Just tried that, still does the same thing. I've also noted that the rails direction sometimes makes a difference.
OK was finally able to confirm. It seems it doesn't happen if the repeater is on top of the bottom block being cleared.
This also drops redstone dust, carpets and seemingly any block that requires another block to support it.
You guys know fill does it 1 block at a time right? It may be really really quick but it is 1 at a time. For example each block causes a block update around it. Try using fill to replace lava with water. Individual obsidian reactions will happen instead of the 2nd one safely replacing the 1st one. I imagine replacing tnt with fire blocks would be just as unstable. If a lower level is supporting redstone components they're going to fall before the fill reaches the level they're on.
If that's the case, it's an easy fix. Just have it so it removes blocks one at a time starting from the top instead of the bottom. Either that or have the fill set a priority for specific blocks.
Anyways, if the problem is because it goes one at a time, then I can implement a work around for my project. Instead of filling the space with air, first fill with barrier blocks, then fill with air.

Seems this issue is fixed in 14w34c
Steps I tested with gamerule doTileDrops true
1. Fill bottom layer
/fill ~ ~ ~ ~10 ~ ~10 stone
2. Fill top layer with specific block
/fill ~ ~1 ~ ~10 ~1 ~10 unpowered_repeater
3. Fill entire selection with air
/fill ~ ~ ~ ~10 ~1 ~10 air
Result:
No drops
You don't seem to be specifying how you want it to fill. Try this: