Posted by bcgreen on February 6, 2014 at 3:25pm
I wrote a custom drush command that takes files in a directory and copies them to the public:// filesytem of a Drupal installation (OpenScholar, to be specific). While the files are copied over and entries are made in the file_managed DB table, these files aren't appearing in the 'My Library' tab of the media browser. So the question is: what cause files to appear in 'My Library'?
Thank you!
Bryan
Comments
What is the 'status' column
What is the 'status' column value for your files in the file_managed table? 0 or 1?
Senior Drupal Developer for Lullabot | www.davereid.net | @davereid
They're all set to '1'.
They're all set to '1'.
So, no other suggestions?
So, no other suggestions?
So, no other suggestions?
So, no other suggestions?
This is really impossible to
This is really impossible to troubleshoot without all of the information. You haven't even told us what version of Media or OpenScholar you are running. That and a single row of the imported files from the file_managed table would be the absolute minimum amount of information you'd need to share. @Dave Reid took a stab at what the problem might be (data in that table), but instead of offering more information you only responded to that.
I don't know if "My Library" become "My Files" between Media 1.x and Media 2.x or if that's something that's OpenScholar specific.
If you are running Media 2.x, has the media_browser_my_files view been modified by you or as part of the OpenScholar distribution?
Have you tried you drush script on a clean D7 site w/ just Media enabled to remove OpenScholar from the mix? Does that work?
If you enable the SQL output in the Views configuration, preview the media_browser_my_files View, does that query return results in with just sql?
If not, what do you have to alter in the query to get the results?