I've got a custom module that uses something like this within the hook_block_view() call:
$block['subject'] = t('A dummy block');
$block['content'] = array(
'#markup' => '<strong>Hello world!</strong>',
'#attached' => array(
'css' => array(
$map_path . '/css/servicemap.css',
),
),
);
This breaks the Panels Content editor at /admin/structure/pages/nojs/operation/[page]/handlers/[page]_panel_context/content.
The block functions file elsewhere on the site, such as when inserted into a region. The Content editor works fine when I remove the '#attached' from the render array. Therefore I think this is a bug with Panels. Unless I should be using a different technique to attach my CS/JS? Per https://api.drupal.org/comment/44413#comment-44413 I believe #attached is the way to go but I'm open to criticism here.
Comments
Comment #1
s_leu CreditAttribution: s_leu at MD Systems GmbH commentedCan confirm this bug. I used the following temporary workaround in order to be able to edit my affected panel.
But of course the bug should be fixed in panels actually.