When looking at the source in CKEditor there is a '"attributes":{"class":"media-image","typeof":"foaf:Image"}' part, but when looking at the source code when viewing the page, no such class is in the img tag. The RDFa attribute is there though.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aaron’s picture

Project: D7 Media » Styles
Version: 7.x-1.x-dev » 7.x-2.x-dev

moving to proper queue.

Jackinloadup’s picture

i have run into this issue as well. My biggest issue is it dropping style. Might take a look into it if i can get a change. Any one know anything about the source of the problem? any leads?

Jackinloadup’s picture

FileSize
1.13 KB

Ok so i had found a fix for 7.x-2.0-alpha4 but things seems to have changed pretty dramatically in the areas I was dealing with between alpha4->5.

the information about the the wysiwyg style and class settings are in the override array which shows up in the $variables array for the theme functions. Namely theme_file_styles_image.

I was able to get a working patch but it seems kinda janky. Please review!!!!!!!!

Things I noticed
styles/contrib/file_styles/file_styles.theme.inc
seems to be replaced with
styles/contrib/file_styles/includes/themes/file_styles.theme.inc

yet styles/contrib/file_styles/file_styles.theme.inc still exists.

tsvenson’s picture

Status: Active » Needs work

Seems to partially fix the problem. The classes are now there, but I also get these errors:

# Notice: Undefined property: stdClass::$override in theme_file_styles_image() (line 15 of [path]\sites\all\modules\styles\contrib\file_styles\includes\themes\file_styles.theme.inc).
# Notice: Undefined property: stdClass::$override in theme_file_styles_image() (line 16 of [path]\sites\all\modules\styles\contrib\file_styles\includes\themes\file_styles.theme.inc).

At first view of the page I get them once, then they seems to be cached somehow and are shoring up twice.

This is with latest dev releases of Media/Styles.

mrfree’s picture

Nothing changes in file_style between alpha5 and dev (Last updated: January 19, 2011 - 01:39)

--- styles-alpha5/contrib/file_styles//file_styles.info	2011-02-22 10:31:37.164246164 +0100
+++ styles-dev/contrib/file_styles//file_styles.info	2011-01-19 01:39:50.000000000 +0100
@@ -11,8 +11,8 @@
 dependencies[] = image
 
 ; Information added by drupal.org packaging script on January 1, 1970 - 00:00
-version = "7.x-2.0-alpha5"
+version = "7.x-2.x-dev"
 core = "7.x"
 project = "styles"
-datestamp = "1295391391"
+datestamp = "1295397590"
aaron’s picture

Status: Needs work » Needs review
FileSize
1.16 KB

here, try this patch. don't have time to test right now. thanks!

tsvenson’s picture

Will give it a spin tomorrow. So you got the code spint at DrupalCon going then? :)

aaron’s picture

yes, there was some awesome work accomplished -- some patches towards views integration, moving media entities to file entities and more!

tsvenson’s picture

Status: Needs review » Reviewed & tested by the community

Oki, Aaron. As promised I have now tested your patch and it does the trick. Classes are now again available in the output code. Great work.

This is tested with today's Styles dev release. The commit burst for the Media module has not yet propagated to the dev tarball so it's not tested with that. Doubt it should affect this though.

AlanAtLarge’s picture

Subscribing

aaron’s picture

Status: Reviewed & tested by the community » Fixed

awesome, thanks! committed.

tsvenson’s picture

Glad I can be of some little assistance.

Status: Fixed » Closed (fixed)

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