A solictor should not be advising potential buyers on anything other than legal matters and should he/she have any concerns regarding a buildings condition, should recommend a professionally prepared structural survey rather than suggesting not to buy at all.
Not really that black'n'white. If you follow my link my earlier post, you'll find more (layman's) info on CML requirements, and the solicitor's liability re assessment of risk. To be specific; a solicitor will not recommend that you do not buy, but they will state that they are unable to recommend the property as an acceptable level of risk as security against the mortgage. Several factors including, potentially, the condition will be considered here. Of course the solicitor will not have a direct opinion on the condition, but will assess the surveyor's reports.
All in all, a solicitor is much more than a rubber-stamper in a potential house purchase, especially compared to the situation five or ten years ago.
Regards
Scott