document.getElementById("edit-path") fails in IE (and firefox) on /node/add

Michael Curry - September 7, 2006 - 22:10
Project:URLify
Version:HEAD
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

it appears that the javascript insertion (in urlify_footer()) is being triggered prematurely, on the /node/add page which gives a list of content types. The inserted script generates a script error because document.getElementById("edit-path") has no properties (it returns null, so dereferencing it to access the .onchange property triggers a script error.)

This is a major problem in IE, as some people get a script error popup on every visit to that page:

---------------------------
Error
---------------------------
A Runtime Error has occurred.
Do you wish to Debug?

Line: 169
Error: 'document.getElementById(...)' is null or not an object
---------------------------
Yes   No  
---------------------------

Less of an issue in firefox, since ff doesn't pop up an error message.

So, it appears that the function _urlify_insert_js() is returning true when it shouldn't.

#1

canen - September 10, 2006 - 03:02
Status:active» closed

inactivist,

Thanks for the report. It should now be fixed in all versions.

#2

eurekaloop - October 14, 2006 - 03:44

Hey, I'm using the latest and greatest Drupal mod you have listed for 4.7, and I am still getting a document.getElementById error in IE when I go to any node/add page:

Error: 'document.getElementById(...)' is null or not an object

It goes away when I turn off URLify.

Any ideas?

Thanks in advance,

Jeff

 
 

Drupal is a registered trademark of Dries Buytaert.