Generalisation error in learning with random features and the hidden manifold model*This article is an updated version of: Gerace F, Loureiro B, Krzakala F, Mezard M and Zdeborova L 2020 Generalisation error in learning with random features and the hidden manifold model Proc. 37th Int. Conf. Machine Learning vol 119 ed H D III and A Singh pp 3452–62. (29th December 2021)