Any command in a function that is using relative cords, will not run the command but will say it executed in the chat, even though it didn't actually happen.
Ignore this example, strike through won't work-Example:
This command works
/execute @a 0 100 0 detect 0 99 0 stone * say words
however, this command does not.
/execute @a ~ ~ ~ detect ~ ~ ~ stone * say words-
I have found some more information. execute [selector] ~ ~ ~ does in fact work, but relative coords inside other commands don't work.
Example:
"execute @a ~ ~ ~ /particle angryVillager 100 100 100 0 0 0 0.1 50" will work
"/particle angryVillager 100 100 100 0 0 0 0.1 50" also works
However "execute @a ~ ~ ~ /particle angryVillager ~ ~ ~ 0 0 0 0.1 50" will not work
see also MC-117319