I created a page with the alias "media" and then on every node (with content type "Gallery"), when the "Add media" link is clicked, the page with the alias "media" is loaded in the dialogue box instead of the dialogue box.

So, apparently, the page alias "media" is unavailable when the Media module is enabled? Otherwise, you get this bug/error.

#10 1535940-set-browser-admin-path.patch630 bytesDave Reid
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]


Status:Active» Postponed (maintainer needs more info)

@carsonw -- Having a bit off difficulty understanding your problem. Can you please post a few screen shots or explain more.


@HyperGlide -- Create a page and give it the path alias: media

Then, view a node of content type Gallery and click "add media"

@carsonw -- Understand the alias.


  1. Gallery is your custom content type -- correct?
  2. You added a file field or within a WYSWYG editor?

I am trying to reproduce your error but ask if you can submit more details please.

Thank you

Version:7.x-1.0» 7.x-2.x-dev
Priority:Critical» Major
Status:Postponed (maintainer needs more info)» Active

Hrm, I'm able to reproduce this problem on both 7.x-2.x and 7.x-1.x. Very interesting.

Issue tags:+Needs backport to 1.x

Issue tags:+sprint

Status:Active» Postponed (maintainer needs more info)

I've been trying to duplicate this but I'm not having any success.


  • Fresh install of Media, WYSIWYG and all dependencies
  • Configure WYSIWYG to use CKEditor for all input formats
  • Add a new node of type "page", give it the title "Media" and the URL alias "media"
  • Add another new node of type "page" with the title "Test"
  • While adding the "Test" node, click on the "add media" button inside of the WYSIWYG editor
  • Media browser popup loads as expected

I've also tried this using an installation profile with ~60 modules installed including pathauto and it also worked as expected.

Ok I think the key here is that I had the Subpathauto module enabled. I think we can help avoid this a little bit by implementing hook_admin_paths() for the media browser if the theme is set to the admin theme.

Title:Conflict with page alias of "media"Conflict with page alias of "media" when using the Subpathauto module
Assigned:Unassigned» Dave Reid
Priority:Major» Normal
Issue tags:-sprint

Status:Postponed (maintainer needs more info)» Needs review
new630 bytes
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

This fixes the conflict for me and is probably a good thing to have defined.

Status:Needs review» Fixed

Tested and confirmed, so committed #10 to both branches.
http://drupalcode.org/project/media.git/commit/cc55948 (7.x-2.x)
http://drupalcode.org/project/media.git/commit/6ed5881 (7.x-1.x)

Status:Fixed» Needs work

similar issue:
site has 'media' path alias, with 'media/%' used as filter for the embedded view on 'media' page
the popup window loads the 'media' page instead of the media browser

unfortunately patch above does not solve the issue
(using subpathauto, admin theme, overlay…)

would a better option be to change all 'media/*' paths to 'admin/media/*' ?
(as it is now it kinda hijacks the root level)

Status:Needs work» Fixed

@g10: Please test using Media 7.x-2.x-dev or 7.x-1.x-dev. This should be resolved now.

Tested using Media 7.x-2.0-unstable6+1-dev and Sub-pathauto 7.x-1.2

settings at admin/config/search/path/subpaths :
the only option that works is when 'max depth' is disabled ('skip admin paths…' toggle doesn't have any effect)
but basically this also disables the Sub-pathauto functionality

Oh, so the original issue here was simply having a node with alias 'media' but you've got a View with an argument. Yeah, that's totally going to take over any request for 'media/browser' and I'm not sure how we can support that.

To be sure I disabled the view (+ Extended Path Aliases + Pathauto persistent state modules), and cleared the caches… the view is embedded in a node with view reference. So even w/o the view the issue was present.
The browser only showed up when the 'max depth' of Sub-pathauto was set to 'disabled'

Status:Fixed» Closed (fixed)

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

Version:7.x-2.x-dev» 7.x-1.3
Component:Media Browser» Media field
Status:Closed (fixed)» Active

I have the same problem using the panels module.
I can create a panels page /media, but I can't pass an argument to it in the form /media/!term. That produces an 'page not found' error.
With /media-x/!term everything works fine.