Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   init_resize sometimes not defined, posted by Richard Stamper on Wed Aug 5 01:07:04 2009 
    icon2.gif   Re: init_resize sometimes not defined, posted by Stefan Ritt on Wed Aug 5 13:36:44 2009 
Message ID: 66493     Entry time: Wed Aug 5 13:36:44 2009     In reply to: 66492
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Bug report  OS: All  ELOG Version: 2.7.7-2246 
Subject: Re: init_resize sometimes not defined 

Richard Stamper wrote:

Under some circumstances the New/Edit entry screen can invoke the init_resize() function in the onload handler for the <body> tag, but the init_resize() function is not defined.  In my case there is a log where the encoding is plain text (Default encoding = 1) and the message height is restricted (Message height = 4).  Creating or editing entries in this log generates warnings in the Firefox error console and alert boxes in IE about init_resize being undefined.

I think there is some missing logic.  In revision 2246 of elogd.c

  • at line 9924, if enc_selected = 1 then init_resize() is included in the onload handler, but
  • at line 9801, if enc_selected = 1 but at least one of the  "Message height" or "Message width" attributes is set then the code defining init_resize() is not include

I think you need to duplicate the checks on the Message height and Message width attributes at lines 9924, so that the init_resize() function is only included when defined.

Richard S

Perfect! Not only your analysis but also your suggested solution. I implemented that in revision 2249.

Stefan 

ELOG V3.1.5-fe60aaf