Like i reported here first http://drupal.org/node/1022266 i believe the current way this module deals with errors isn't sufficient for most sites. Here i go into this first issue a lil bit deeper.

Example of an error:

Error Embeding SoundCloud Media code(-110) :
Please check sharing permissions

Errors are printed to the site visitors, while they don't really care about errors, they want to see / be able to listen to songs. If something is not available, they indeed want to see a notice, but a big error on top of the page is for simple visitors a lil too much i believe.

For the site administrators a log message (watchdog), or a drupal_set_message() only for the role that administers the media module would fit the purpose i believe.

Another issue that's very close related to this is the following user case: (also why this isnt a separate issue Yet)

Create a Views page display
Make it list a body field for a node containing Soundcloud embeds (lets call it 'song') (or any other field containing a soundcloud embed code)
Display let's say 5 (or more) 'song' content types per page
Now Soundcloud goes down

The result:
5 or more drupal_set_message()s on top of eachother, all printing the same error.
(came across this couple days back when soundcloud was down for a couple of hours)

My proposal: inline error messages or notice where the player should render. (alert icon/indicator maybe)
Maybe we can even add some config options to set up behaviour for this.

(Another note / question to think about in lenght of this: how to deal with RSS feeds and Soundcloud embeds (and errors). A feed of error messages also doesn't really work i guess. :) )

I'm also willing to help coding, but first some responses, to see if this approach makes sense to more people.
Thanks!

Comments

victoriachan’s picture

Status: Active » Needs review
StatusFileSize
new1.16 KB

Hi ClusterFCK,

Thanks for raising this issue. I agree that this is currently less than ideal. I have included a patch where have made the following changes:

  1. Only print error messages for users who have 'Edit Media' permission
  2. Only print the error messages once. This is done by specifying repeat=FALSE in the drupal_set_message() function call.
  3. Write the error to watchdog log as WATCHDOG_WARNING severity.

What do you think?

Victoria

victoriachan’s picture

Status: Needs review » Closed (fixed)

Committed patch to dev 7.x-1.x-dev

rob c’s picture

This looks good. I'll test it ones i have some time, but it looks like this fixes most of the ideas i had. Will provide more feedback later on.

victoriachan’s picture

Great! Thanks!

rabellamy’s picture

Component: User interface » Code
Priority: Normal » Major
Status: Closed (fixed) » Needs review
StatusFileSize
new934 bytes

I've edited the spelling on the $error_msg.

victoriachan’s picture

Status: Needs review » Fixed

Committed now.

rabellamy’s picture

I am still getting this error when I try to embed a track from sound cloud on a project that I am working on:

Error Embeding SoundCloud Media code(-110) :
Please check sharing permissions

Has any one been able to successfully embed? If so what necessary configuration could I be skipping?

thanks!

victoriachan’s picture

Hi rabellamy,

Can you open a new issue for this problem please? It's got nothing to do with this issue. Also it would very helpful if you could include the versions of Media, File Entity, Media Soundcloud, and other related modules you are using and include a detailed step by step guide on how to replicate the error.

Thanks!

Victoria

Status: Fixed » Closed (fixed)

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