It says "between component on top layer and component on top layer".
It appears that you didn't put a photodiode on the bottom, you put a photodiode on top with (for some reason) pads on the bottom.
Altium isn't smart enough to automatically understand this bamboozle, so it's telling you it doesn't get it.
On a related subject (and probably one that will solve your problem regardless of sidedness), there's an oft-missed quirk to when 3D data is absent, the whole outline of the footprint is assumed as its 3D bounding box!
Plop in a 3D model of the photodiode, or make it a bottom side component (so the pads in the library will be on the top side), and I think you will be fine.
Tim