Project:Documentation
Component:Developer Guide
Category:bug report
Priority:critical
Assigned:gordon
Status:closed (fixed)

Issue Summary

if there is a on_load attribute on the body tag then the events added by the addLoadEvent() will not be run.

try adding aler_t('on_load') to the body and it will cause the failure.
darn malicious data catcher, making this post so hard to enter.

Comments

#1

Gordon, is that still an issue?

#2

Yes as far as I know, it is still an issue. This is more to do with the browsers not running the window.onload when there is a on_load in the page.

One option is that we obsolete the on_load and force all modules to use the new js function.

 

#3

Removed theme('onload_attributes') as this causes the new js stuff to die.

If you need to run some js on_load then use the new js addLoadEvent() to start a function.

AttachmentSize
remove_onload.patch 4.39 KB

#4

Assigned to:Anonymous» gordon
Status:active» needs review

#5

here is a patch to remove the on_load hook from the documentation

AttachmentSize
remove_onload_doc.patch 1003 bytes

#6

Seems that removing hook_onload is the right thing to do at this stage. There was a duplicate issue http://drupal.org/node/31755 which I just closed that discussed the same problem.

Darius

#7

Status:needs review» reviewed & tested by the community

#8

Project:Drupal core» Documentation
Component:other» Developer Guide

Committed this to HEAD. Moving this to the documentation project as the documentation patch still needs committing. I'd also add a note to the upgrade guide.

#9

I added this issue to the module upgrade handbook page

#10

Status:reviewed & tested by the community» closed (fixed)

as it's added to the docs, closing