I am receiving the following notices when after upgrading Media: YouTube and Styles to version 7.x-1.0-alpha5 and 7.x-2.0-alpha7 respectively. I imagine this has to do with the move of styles into a media_youtube.styles.inc. Because of these errors, embedded videos (via file select, not WYSIWYG) do not display anymore after the upgrade. I have cleared the cache as well:

    Notice: Trying to get property of non-object in file_styles_styles_filter() (line 37 of C:\wamp\www\CSDev\sites\all\modules\styles\contrib\file_styles\file_styles.module).
    Notice: Trying to get property of non-object in media_youtube_file_styles_filter() (line 65 of C:\wamp\www\CSDev\sites\all\modules\media_youtube\includes\media_youtube.styles.inc).
    Notice: Trying to get property of non-object in file_styles_styles_filter() (line 53 of C:\wamp\www\CSDev\sites\all\modules\styles\contrib\file_styles\file_styles.module).

Thanks in advance for the help.

Comments

rootwork’s picture

Priority: Normal » Major
Issue tags: +media_youtube, +file styles

I'm getting this too. I get it even though I have no videos currently embedded, and I get it on all pages (even admin pop-up dialogues, like views settings).

The first and last errors (lines 37 and 53) seem to be styles-specific, as only the second error is eliminated when turning off the media_youtube module.

I've filed a companion bug report for styles here: #1175008: Notice: Trying to get property of non-object in file_styles_styles_filter()

jgsantos’s picture

I am having the same problem. I just updated Drupal 7 modules.

pazap47’s picture

Same here. Really strange is this http://drupal.org/node/1175008 somehow related? I imagine so as mentioned by rootwork.

BarisW’s picture

Subscribing

rootwork’s picture

From http://drupal.org/node/1175008#comment-4543466

Notices appear in media_youtube module because it relies on the same assumptions (that the $object has $object->uri and similar fields), errors appear in media_youtube.styles.inc (line 65) and in MediaYouTubeStyles.inc (line 30), maybe somewhere else. All that code relies on file_styles module, so I think that the problem is in file_styles, not in media_youtube.

So I'm tempted to mark this issue as a duplicate, and focus all the bugfixing on that other issue, which should fix this issue as well. But I guess since I don't know the inner workings of the module myself, I'll wait for someone who does to make the call.

rootwork’s picture

Status: Active » Closed (duplicate)

The patch here fixes this issue, along with the issue in Styles:

http://drupal.org/node/1175008#comment-4545254

It's a temporary fix, but as this clearly stems from the issue in Styles, I'm now marking this as a duplicate of #1175008: Notice: Trying to get property of non-object in file_styles_styles_filter()

CrashNet’s picture

Many thanks for the quick fix @rootwork and @aaron.

Regards.