Jump to:
| Project: | Drupal For Firebug |
| Version: | 7.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
This repros with Firebug 1.7.3 and Firefox 5.0 (and possibly earlier Firefox versions), and also with Chrome 12.0.742.100 with the Drupal for Chrome extension enabled.
Note that this only happens when using the CKEditor module (as opposed to the WYSIWYG module pointed to the CKEditor library) - see http://drupal.org/node/968282 for the issue there. Seems to be an incompatibility between the two modules. They've punted it over here for now.
This happens when creating or editing a node with CKEditor active. When previewing or switching back and forth between text-formats, the following is inserted into the body text:
<div id="drupalforfirebug_general" style="display: none">
<fieldset>
<legend>Drupal for Firebug General Messages</legend>There were no messages sent to the general log. Please use "firep($item, $optional_title)" to output messages to this console.</fieldset>
</div>
<div id="drupalforfirebug_sql" style="display: none">
<fieldset>
<legend>Query Logging is Not Enabled</legend>Please enable "Display query info" in the Devel Module Settings (devel/settings) to use this feature.</fieldset>
</div>
<div id="drupalforfirebug_hook_form_alter" style="display: none">
There was no form altering.</div>
<div id="drupalforfirebug_hook_user" style="display: none">
There was no user processing.</div>
<div id="drupalforfirebug_hook_nodeapi" style="display: none">
There was no node processing.</div>
<div id="drupalforfirebug_hook_views" style="display: none">
There was no views processing.</div>
<div id="drupalforfirebug_hook_page_alter" style="display: none">
There was no page processing.</div>
<div id="drupalforfirebug_php" style="display: none">
<object data="http://cms.bastyr.edu/admin/firebug/exec" style="width:100%;frameborder=0;height=100%;margin-bottom:-3px;" type="text/html"></object></div>As far as I can tell, this code is being appended to all html page output (including the body of the editor's IFrame) by the drupalforfirebug_shutdown function. It's also (correctly) being appended to the parent page.
What I can't figure out is why this isn't breaking the WYSIWYG module as well. The drupalforfirebug_exit function checks the content-type before registering drupalforfirebug_shutdown, but neither version of the CKEditor window is setting a content type.
Comments
#1
An update - this is now reproducing with the WYSIWYG module (must have been a cache issue hiding it last week).
As a workaround, I've modified the drupalforfirebug_exit function as follows. This appears to have fixed the problem:
16 // Try not to break non html pages. [from new devel.module]17 if (function_exists('drupal_get_http_header')) {
18 $header = drupal_get_http_header('content-type');
19 if ($header) {
20 $formats = array('xml', 'javascript', 'json', 'plain', 'image', 'application', 'csv', 'x-comma-separated-values');
21 foreach ($formats as $format) {
22 if (strstr($header, $format)) {
23 $dff = FALSE;
24 }
25 }
26 }
// For CKEditor, check the title to see if this is inside the editor window
if (strstr(drupal_get_title(), 'Rich text editor')) {
$dff = FALSE;
}
}
This works with CKEditor/WYSIWYG - I haven't checked to see whether other configurations and editors set the title in the same way, so this may not be a valid across-the-board solution.
#2
This issue is happening to me too, with Drupal for Firebug 7.x-1.2 and CKEditor 7.x-1.3, in Firefox 6.0.2 + DrupalForFirebug 0.0.7 + Firebug 1.7.3 or Chrome 14 + Drupal for Chrome 0.4.