Y have this problem when upload a file into Media Browser module:

An error occurred and no file was uploaded.

Please need help!!

Comments

a6hiji7’s picture

Media browser does not work for me. I have the media_youtube module installed. When I click "Library" link, it shows a blank box; but if I try to add an Youtube URL, it says "You have entered a URL for a video that is already in your library.". Is there any possibility of media module working seamlessly in near future?

a6hiji7’s picture

As a followup, if I enter an Youtube URL that I did not enter before and save the content, I get the following error -

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 2: SELECT f.* FROM {file_managed} f WHERE (fid = :db_condition_placeholder_0) AND (type IN ()) ; Array ( [:db_condition_placeholder_0] => 28 ) in media_field_validate() (line 318 of /.../sites/all/modules/contrib/media/includes/media.fields.inc)
dave reid’s picture

So it sounds like you haven't properly configured your field to set what types of files are allowed. You should be allowing 'Video' file types and the 'Youtube' schema.

a6hiji7’s picture

Thanks Reid, I had checked the "Youtube" schema but did not check the "Video" type as my understanding was that it should not be necessary for external embeds. May be my understanding of how media works is not correct. In any case, user friendly error messages instead of PDO errors are expected. May be a simple check needs to be added before making the DB call?

Now, my next problem is that the video does not show up in the node page. Any idea regarding that? I will like to dive into the module code but currently not getting enough time to do that.

a6hiji7’s picture

Well, I could not get the video showing up in the node; but I saw that the video shows fine in views. So I added a view with the nid as the argument and embedded in the node. Now, that works till I get time to check the module code.

tsvenson’s picture

Status: Active » Closed (fixed)

Closing due to no activity for a long time. Feel free to reopen with updated info if issue still remains.