Further progress on the PHP in widgets, but JS is broke