Missing data-state attribute when a post a template is rendered