They knew or should have known it was going to happen when they invited him. But it doesn't seem they made any efforts to minimize Trump's offensiveness. It probably would have been wasted effort to ask Trump to stay on message or at least keep the self-backpats to a minimum but at least it would have provided some rhetorical CYA. Nor do I give them a pass for their appeal to tradition. If there is one defining characteristic that can be said about Trump's administration is that it breaks from traditional norms.