Html tidy and 'fail' trigger

Hi Folks,


Not sure this is possible without a feature request BUT given that I am but a single developer supporting loads of editors I cannot use a workflow to manually check their stuff (some inline code seems to be uncleanable by the WYSIWYG and other users are 'time concious' (lazy) / 'In need of further training' (…). So what I was wondering - is there a combination of triggers that can fire of an e-mail to me if HTML tidy reports accessibility errors (and the icon is orange)?



Any workaround accepted gratefully…



K

There is not currently any functionality that will signal a Trigger Event for failed HTML Tidy validation. Apart from using workflow for a manual scan, which seemingly requires more approvers in this situation, there are no workarounds or other methods to do this of which I am aware.



Edit: Added "for a manual scan"

You couldn't do a trigger event without modifying the source code, but if you have the SSV data package you could set up an SQL query to report on the assets which have failed, as it's recorded back as one of the attributes. You could then list them with an asset listing.


Alternatively the same SQL query could be run directly against the database, but you need to be very careful when accessing the database directly!



Something like this should do the trick:



SELECT v.assetid, a.name, la.majorid, u.url

FROM sq_ast_attr_val v

INNER JOIN sq_ast_attr b ON b.attrid = v.attrid

INNER JOIN sq_ast_lnk lc ON lc.minorid = v.assetid

LEFT JOIN sq_ast_lnk lb ON lb.minorid = lc.majorid

INNER JOIN sq_ast_lnk la ON la.minorid = lb.majorid

INNER JOIN sq_ast a ON a.assetid = la.majorid

LEFT JOIN sq_ast_lookup u ON u.assetid = la.majorid

WHERE v.custom_val = 'fail' AND b.name = 'htmltidy_status'

ORDER BY url