The brightcove field added to create content page suppose to load the admin theme instead of the main theme if the admin theme is set.

Now it is loading to main theme may because of the ajax calling path is called outside admin theme.

Comments

cloudbull created an issue. See original summary.

jan.mashat’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide step-by-step instructions on how to reproduce this issue, including screenshots.

cloudbull’s picture

Here is the screenshot

https://slack-files.com/T03LJ6UCD-F0DN6U4BF-3e48cd41bd

step:

just install the module and use it. If the main theme selected is different with the admin theme, the main theme will be loaded.

But actually in the node edit page, admin theme should be loaded.

thanks
Keith

cloudbull’s picture

Actually just at brightcove.module add

143 // bc object type, entity type, field name, entity id or bundle
144 $items['brightcove_field/browse_video/%/%/%/%brightcove_client'] = [
145 'title' => 'Brightcove Videos Browser',
146 'page arguments' => [2, 3, 4, 5],
147 'page callback' => 'brightcove_field_browse',
148 'delivery callback' => 'brightcove_field_deliver_dialog',
149 'access callback' => 'brightcove_field_browse_access',

'theme callback' => variable_get('admin_theme')

150 'access arguments' => ['browse videos', 2, 3, 4, 5],
151 'file' => 'brightcove_field.browse.inc',
152 'type' => MENU_CALLBACK,
153 ];

jan.mashat’s picture

Version: 7.x-6.x-dev » 7.x-6.1
Status: Postponed (maintainer needs more info) » Needs work

  • yce committed bdd43fc on
    Issue #2607142: Use the admin or default theme based on the appearance...
yce’s picture

Status: Needs work » Closed (fixed)

Fix in the latest dev.

Actually the solution is a bit different. The admin theme should be only used in the popup when the "Use the administration theme when editing or creating content." option is set.