I could be wrong, but I believe that the $vars['classes_array'] that is created in template_preprocess_snippet is not properly placed on page for all themes. The tpl file does not reference $classes_array and instead only relies on $attributes_array. I know that Omega sub-themes will have the classes_array moved into attributes_array in the alpha_preprocess function, but I think this is unique to Omega.

I'm using Snippets with the Zen theme and I noticed that they did not have contextual-links-region or the snippet class. Not having contextual-links-region assigned causes problems with more than one Snippet on the page. Not having the 'snippet' class means no yellow background.

Path to follow.

Comments

jonmcl’s picture

Silly simply patch. I just put the contents of 'classes_array' into ['attributes_array']['class'] which is also what alpha_preprocess does. So this should have no negative impacts anywhere.

pwaterz’s picture

StatusFileSize
new3.48 KB

JonMcL

You are correct, here is an updated patch that will work with non omega themes. I am going to apply this patch and create a new release of the module.

pwaterz’s picture

Status: Active » Patch (to be ported)
pwaterz’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.