Relatively clean install of Panopoly with the demo module installed, and I turned on the Dark Blue Background style for a pane. The class is applied cleanly and the styles apply correctly, but I'm getting the following error:
Notice: Undefined property: stdClass::$css_class in theme_panopoly_demo_dark_blue_background_render_pane() (line 25 of /srv/bindings/350db61e7eaf4a11b0c9b16d7cba242b/code/sites/all/modules/panopoly_demo/plugins/styles/dark_blue_background/dark_blue_background.inc).
It appears that $content->css_class does not exists prior to appending the new class. Adding $content->css_class = ''; to the line preceding the error appears to get rid of it. Should I submit a patch or something? Haven't done that before.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2729621-fix-undefined-property-style-error.patch | 2.41 KB | mrweiner |
Comments
Comment #2
mrweiner commentedAlso, I haven't tried the other two styles, but I'm assuming that the error would be present with those as well, since the code is structured the same.
Comment #3
dsnopekA patch would be nice! But I don't think clearing it is the right solution, because it could also contain something initially.
In mvpcreator_theme, we just solved a similar problemt:
http://cgit.drupalcode.org/mvpcreator_theme/commit/?id=fdd75f0975c2b839d...
I think a solution like that would be best.
Thanks!
Comment #4
mrweiner commentedYes, that's a good point that it could contain something already. Prior to you mentioning that, I ended up implementing something similar to your suggestion. I modified it and turned it into a patch. Hopefully it works! Looks like it should apply cleanly.
Comment #5
dsnopekI haven't tested this yet, but the code looks right! Thanks!
Comment #6
candelas commentedI just test it and works :)
Thanks @mrweiner!
Sorry @dsnopek for the 2duplicates/1day O.O
I will be more careful and now I go to make my features and test in my real site.
Comment #7
dsnopekCommitted, thanks!
Comment #8
mrweiner commentedSure thing!