Issue 2244 publishing categories

#2244 pull request.