Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | 1535940-set-browser-admin-path.patch | 630 bytes | Dave Reid |
Comments
Comment #1
HyperGlide CreditAttribution: HyperGlide commented@carsonw -- Having a bit off difficulty understanding your problem. Can you please post a few screen shots or explain more.
Thanks!
Comment #2
carsonw@HyperGlide -- Create a page and give it the path alias: media
Then, view a node of content type Gallery and click "add media"
Comment #3
HyperGlide CreditAttribution: HyperGlide commented@carsonw -- Understand the alias.
Questions:
I am trying to reproduce your error but ask if you can submit more details please.
Thank you
Comment #4
Dave ReidHrm, I'm able to reproduce this problem on both 7.x-2.x and 7.x-1.x. Very interesting.
Comment #5
Dave ReidComment #6
Dave ReidComment #7
Devin Carlson CreditAttribution: Devin Carlson commentedI've been trying to duplicate this but I'm not having any success.
Steps:
I've also tried this using an installation profile with ~60 modules installed including pathauto and it also worked as expected.
Comment #8
Dave ReidOk 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.
Comment #9
Dave ReidComment #10
Dave ReidThis fixes the conflict for me and is probably a good thing to have defined.
Comment #11
Dave ReidTested 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)
Comment #12
g10 CreditAttribution: g10 commentedsimilar 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)
Comment #13
Dave Reid@g10: Please test using Media 7.x-2.x-dev or 7.x-1.x-dev. This should be resolved now.
Comment #14
g10 CreditAttribution: g10 commentedTested 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
Comment #15
Dave ReidOh, 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.
Comment #16
g10 CreditAttribution: g10 commentedTo 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'
Comment #18
creando sensaciones CreditAttribution: creando sensaciones commentedI 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.
Comment #19
pitxels CreditAttribution: pitxels commentedThis is my second installation, finally I found that Media module fails upload files only when I enable pathauto.
Comment #21
joseph.olstad@Dave Reid fixed this in "July 7, 2012 11:32" . see commit message