Hi!

I found a severe bug in the new media module 2.x.

Reproduce
1. Activate a custom theme
2. Activate Admin theme, but disable admin theme when editing content in the theme settings
3. Click on the "Edit media" button in the media widget.

Result
The CSS files from the current active admin theme will be loaded over the current theme and will corrupt the current theme.

Source
The media button misses the theme_callback in hook_menu. All other media dialog fields have this implemented.

Patch to fix this:

Comments

Status: Needs review » Needs work

The last submitted patch, media_theme_callback_edit_dialog.patch, failed testing.

devin carlson’s picture

Status: Needs work » Needs review
StatusFileSize
new374 bytes

A re-roll of the patch in the original issue.

bforchhammer’s picture

Shouldn't the patch also adjust hook_admin_paths() and move the edit path into the if condition next to media-browser paths, or was that left out on purpose? As far as I understand, using that theme callback means that we'd essentially treat them the same...

On a different note: this issue seems to be a duplicate of #1456246: Remove media/*/edit/* as administrative path. The problem is the same as far as I can tell, but the proposed solution is a different one. It may be better to consolidate discussion in one of them (the other one is older but I don't mind which one).

ParisLiakos’s picture

Status: Needs review » Closed (duplicate)

i tried the patch but i have the same problem.and i cleared the cache ofc.
anyway this is duplicate of the issue mentioned above