Fix error when publishing static placeholders outside of a CMS page

If I try to publish a static placeholder on a non-CMS page, I get the following error:

`'NoneType' object has no attribute 'get_publisher_state'`

This pull request fixes the error.