When you are talking about the Principle of mechanical Energy Conservation, it is really only including the kinetic and potential energy in a total system. When frictional forces are present, although the conservation of energy law is still present, it does not work when it comes to the conservation of mechanical energy as there is another type of energy that is factored in. As friction acts on the object, that transition from potential to kinetic as it slide/falls will be completely different as some of that energy is being transformed into thermal energy. Which breaks the conservation of mechanical energy.