Changes between Initial Version and Version 1 of Ticket #12612, comment 5
- Timestamp:
- Dec 16, 2015, 8:48:03 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12612, comment 5
initial v1 1 1 I currently have only the patched version of the plugin installed but I did some debugging. 2 The real problem seems to be here where there are no input fields to attach the change event (like the agilo enabled main page). Here: https://trac-hacks.org/browser/dynamicfieldsplugin/trunk/dynfields/htdocs/dynfields.js?rev=15114#L782 The real problem seems to be here where there are no input fields to attach the change event (like the agilo enabled main page). Here: [browser:dynamicfieldsplugin/trunk/dynfields/htdocs/dynfields.js@15114#L78] 3 3 4 {{{ 4 {{{#!javascript 5 5 // collect all input fields that trigger rules 6 6 $.each(triggers, function (trigger, specs) { … … 16 16 }}} 17 17 18 While there are no input fields it still tries to attach apply_rules to change event and then trigger the change(). 'inputs' array contents are [ undefined ].18 While there are no input fields it still tries to attach `apply_rules` to change event and then trigger the `change()`. `inputs` array contents are `[ undefined ]`. 19 19 Stack trace at the offending line is like this: 20 20 {{{ … … 47 47 }}} 48 48 49 Console for the non-patched plugin says that cannot call slice() on 'undefined' on the non-patched offending line ( https://trac-hacks.org/browser/dynamicfieldsplugin/trunk/dynfields/htdocs/rules.js?rev=15114&marks=175#L175).49 Console for the non-patched plugin says that cannot call slice() on 'undefined' on the non-patched offending line ([browser:dynamicfieldsplugin/trunk/dynfields/htdocs/rules.js@15114:175#L175]). 50 50 51 And yes, input.attr('id') is indeed undefined. input is Object [ Window sandbox ], i.e. the main window which is the case for example when loading the main wiki page. It is not specific to agilo; happens also with vanilla trac.51 And yes, `input.attr('id')` is indeed undefined. input is `Object [ Window sandbox ]`, i.e. the main window which is the case for example when loading the main wiki page. It is not specific to agilo; happens also with vanilla trac. 52 52 53 Is it so that on vanilla trac there happens to be no more document.ready functions to be executed so the bug remains hidden? I tried the plugin with a vanilla trac installation and undefined input.attr('id') exists there also but no visible harm is done unless there is another plugin which expects its document ready()to be called.53 Is it so that on vanilla trac there happens to be no more `document.ready` functions to be executed so the bug remains hidden? I tried the plugin with a vanilla trac installation and undefined `input.attr('id')` exists there also but no visible harm is done unless there is another plugin which expects its document `ready()` to be called.