Yeah, I don't know if I would run it that way, either, but I thought it was an interesting idea and I wouldn't be opposed to a DM who ruled it that way.See now that might hit X. I'm not sure I would run it that way, but it makes more sense than the cleric taking damage...
Because it's not a ranged attack.Why on earth is a ranged attack listed as melee? This is a badly-designed spell that needs to explain its intended function better.
Again, what if instead of a spiritual weapon, the thing attacking was a friendly goblin?Yes, because that's what the spell says it does. The attacker within 5' is caught in the flame eruption and takes damage.
Huh?Again, what if instead of a spiritual weapon, the thing attacking was a friendly goblin?
The one that attacked.Let us imagine that the person with the fireshield spell is surrounded by 4 clerics, each of wich has cast spiritual weapon. The spiritual weapons are floating in a separate square than the clerics.
(C = clerics, W = spiritual weapons, T = target with fire shield)
CCC
CTW
WWW
one cleric uses their spiritual weapon to attack the target. The spell flares and hits... which cleric?
The same way it knows to blast someone who attacks you with a melee weapon.How does the spell know which cleric to blast?
Why would it do that? That's not what the spell says it does. Why would it recognize that a melee weapon is being wielded by an attacker but not recognize that a spiritual weapon is being wielded by an attacker?To me the easiest explanation is that the spell is not smart, and lashes out at the thing that attacked the warded target. If it's a spiritual weapon well... it gets splashed with flames and nothing happens.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.