Linktocontent popup intermittently hangs and crashes MSIE6
ShutterFreak - July 26, 2007 - 09:48
| Project: | Link to content |
| Version: | 5.x-1.5 |
| Component: | Code: Javascript |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When clicking the linktocontent button in TinyMCE, sometimes the linktocontent popup shows empty with a hourglass cursor (forever). When this happens, I always get a MSIE crash (!) when closing the popup window. I am using MSIE6.
Hitting "Esc" (abort) or "F5" (reload) in the popup window doesn't help.
Is it possible that an AJAX call was initiated too early?

#1
For what it's worth, I have see PHP errors linked to the use of the Linktocontent module. Instead of crashing the browser, the popup window shows little or no content, and then the category browser hangs (or shows no content). Here's a typical error message:
I get errors at line 163 and 172: both contain a
foreach()inlinktocontent_get_data().Could this be related to the intermittent browser crashes I reported?
#2
Another error I found today generated a MSIE popup window with the following message:
Error on retrieving data from module.
TypeError
Object doesn't support the property or method
When clicking "OK" in this dialog, the "browse documents" pull-down menu is not populated. When looking at the PHP error log from Apache, I found the following 2 lines:
Hoping this will help in identifying the cause of those crashes.
#3
Hi.
Sorry for responding so late but I'm currently writing my final thesis.
The php-error seems to be a result of a failed call of "linktocontent_validate_args()".
Could you please try to modify linktocontent.module as follows and try again:
<?php
function linktocontent_get_data() {
$plugins = linktocontent_validate_args();
error_log(var_export($plugins, 1)); // <-- print the array to your error-log
if (!is_array($plugins)) {
print drupal_to_js(array('message' => $plugins));
return; // <-- exit function on error
}
// Sort plugins by weight.
$weights = variable_get('linktocontent_plugin_weight', array());
?>
The last warnings are in og_views.inc and not mine ;-) but they shouldn't cause any problems.
#4
Thank you for your reply, Stefan.
I applied your patch, and will monitor the PHP error log.
The MSIE crash however doesn't seem to have been fixed (I just crashed it again).
Good luck with your thesis!
#5
Apologies for the noise. Here's the output from that debug statement in the PHP error log:
array ('linktocontent_node' => 'linktocontent_node',
)
#6
Hi.
Well, the output looks good (assuming you only have linktocontent_node enabled).
Hm. Did you try the latest version (5.x-1.6)? The changes aren't really noticeable but perhaps it helps.
greetings,
Stefan
#7
Hi Stefan,
I reviewed the changes between version 5.x-1.5 and 5.x-1.6, then installed 5.x-1.6 and added again the "exit;" statement in
linktocontent_get_data().When I create a page and add links with linktocontent (linktonode), the crashes now seem to have disappeared. I now only get intermittent JavaScript errors:
The JavaScript error console refers to modules/tinymce/tinymce/jscripts/tiny_mce/plugins/linktonode/popup.php, line 272, char 1.
#8