Perhaps, as you say, Erdogan supports the groups that are fighting Assad and his Russian ally, but it is muted support, in return for which Erdogan has a free hand along his border with Syria. Plus, they have a common enemy that they seek to subdue -- the Kurds.
Russia will seek to blame the West for stirring things up and Erdogan will willingly accede so as to solidify his position as virtual dictator. He knows that Europe is turning its back on him and feels he has nothing to lose cozying up with Russia. Yes, he is an Islamist, but a pragmatic one.