At least in a setup with an Omega subtheme as the primary theme and seven as the administrative theme, user must have permission to view the administration theme for file uploads to work, not sure if this is the case with other themes as well but I would guess so.

If user does not have that permission, system will display just a link "select media" in the node edit page instead of displaying it as a button which opens the file upload field (by default) along with the library etc. If user does not have the privilege to view the administration theme, it will display only the library etc if they are enabled for the field and if not, just a blank box titled "media file selector".

Not sure if this is intended behavior or a bug in the Media module or in some other module (core?). If it is, I think the requirement should at least be documented :)

Comments

Devin Carlson’s picture

Status: Active » Fixed

All file/* paths are administrative paths (which is why the admin theme is loaded) and will require permission to view the administration theme.

You can remove the requirement by using a non-admin theme and implementing hook_admin_paths_alter(). See #1456246: Remove media/*/edit/* as administrative path for an example of how to do so.

Status: Fixed » Closed (fixed)

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

AaronBauman’s picture

Status: Closed (fixed) » Active

This fix doesn't solve the issue for me.
The media popup/modal is still just a bunch of empty divs.
What am i missing?

AaronBauman’s picture

Status: Active » Fixed

ok, found it.
Apparently the permission "Edit file" (with the description "Edit all files") is necessary for anonymous or auth users to be able to use the file upload dialog.
I'm loathe to allow anonymous and auth users to "edit all files" on my site, when actually i just want them to be able to upload and edit their own files, but apparently that's where the module is at right now.

There is some issue in one of the byzantine queues I searched through to find this solution that explains why this is so and offers a patch to solve this confusion, but I closed the tab and can't find it and I've spent too much time on this already so i'll just leave this here since this is a top google hit to hopefully save someone else the same frustration.

Status: Fixed » Closed (fixed)

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