UPDATE: According to what Raymundo said, I just removed all the "set path" folders that pointed to fieldtrip (\192.168.0.101\raid_02\Saeed\fieldtrip-master) and "detect custom events" is working fine again.
I guess when I installed the fieldtrip plugin on Brainstorm, it did the "set path" which caused this error. Is it probably a bug?
Your FieldTrip path (\192.168.0.101\raid_02\Saeed\fieldtrip-master), suggests that FieldTrip was manually added to the Matlab path, rather than by a Brainstorm plugin, as the path of plugins is $HOME/.brainstorm/plugins/ . More details in the Plugins tutorial
Not really. It has to be with how the path is handled by the user. If FieldTrip is added as a Brainstorm plugin, FieldTrip's path is added at the end, thus which fir1 returns the function from the Signal Processing Toolbox (MATLABROOT/toolbox/signal/signal/fir1.m) which is the required by bst_bandpass_hfilter.m at L183