YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2528205 (closed defect)

Reporter


Isaac Z. Schlueter
Opened: 08/25/09
Last modified: 09/29/09
Status: closed
Type: defect
Resolution: fixed

Owner


Luke Smith
Target Release: 3.0.0 GA
Priority: P3 (normal)
Summary: console-filters Throws Error when box is unchecked
Description:

When using the console-filters plugin, and then unchecking a box on the console after several messages have been added, an error is thrown.

ret is null
Y.DOM._cloneCache[html] = ret.cloneNode(true);
dom.js Line 253

Stack trace:

anonymous(Object name=html, Document sketch-2.html)dom.js (line 253)
anonymous()node.js (line 236)
anonymous(Object name=limit value=0)console.js (line 783)
anonymous()console-...ilters.js (line 512)
anonymous(Object details=[1] type=consoleFilters:categoryChange)console-...ilters.js (line 402)
anonymous(consoleFilters[filter] _ATTR_E_FACADE=Object _yuievt=Object _state=Object, [Object details=[1] type=consoleFilters:categoryChange 0=Object], Object
_yuid=yui_test-2-1251230181734102)event-custom.js (line 937)
anonymous([Object details=[1] type=consoleFilters:categoryChange 0=Object], Object _yuid=yui_test-2-1251230181734102)event-custom.js (line 962)
anonymous(Object _yuid=yui_test-2-1251230181734103, [Object details=[1] type=consoleFilters:categoryChange 0=Object], Object details=[1] type=consoleFilters:categoryChange)event-custom.js (line 723)
anonymous(Object yui_test-2-1251230181734103=Object, [Object details=[1] type=consoleFilters:categoryChange 0=Object], Object details=[1] type=consoleFilters:categoryChange)event-custom.js (line 798)
anonymous([Object details=[1] type=consoleFilters:categoryChange 0=Object])event-custom.js (line 1813)
anonymous()event-custom.js (line 771)
anonymous(Object fromUI=true type=categoryChange attrName=category)event-custom.js (line 1526)
anonymous("category", "category.keypress", Object keypress=true, Object keypress=false, Object fromUI=true)attribute.js (line 704)
anonymous("category", Object keypress=false, Object fromUI=true, Object name=force)attribute.js (line 659)
anonymous("category.keypress", Object name=val value=false, Object fromUI=true)attribute.js (line 495)
anonymous(Object altKey=false ctrlKey=false metaKey=false)console-...ilters.js (line 562)
anonymous()oop.js (line 271)
anonymous(DIV#yui_test-2-1251230181734121.yui-console-filters-categories yui_test-2-125123018173474 _yuid=yui_test-2-125123018173474, [Object altKey=false ctrlKey=false metaKey=false 0=Object], Object
_yuid=yui_test-2-125123018173497)event-custom.js (line 937)
anonymous([Object altKey=false ctrlKey=false metaKey=false 0=Object], Object _yuid=yui_test-2-125123018173497)event-custom.js (line 962)
anonymous(Object _yuid=yui_test-2-125123018173498, [Object altKey=false ctrlKey=false metaKey=false 0=Object], Object name=ef)event-custom.js (line 723)
anonymous(Object yui_test-2-125123018173498=Object, [Object altKey=false ctrlKey=false metaKey=false 0=Object], Object name=ef)event-custom.js (line 798)
anonymous([Object altKey=false ctrlKey=false metaKey=false 0=Object]) event-custom.js (line 780)
anonymous() event-custom.js (line 773)
anonymous(click clientX=958, clientY=270) event-base.js (line 727)
Y.DOM._cloneCache[html] = ret.cloneNode(true); dom.js (line 253)

Type: defect Observed in Version: development master
Component: Console Severity: S3 (normal)
Assigned To: Luke Smith Target Release: 3.0.0 GA
Location: Library Code Priority: P3 (normal)
Tags: Relates To: #2528207
Browsers: N/A
URL: http://github.com/isaacs/yui3/blob/0e35f6e6cdb9129956c2e4e38998da58b91a95aa/sandbox/autocomplete/sketch-2.html
Test Information:

1. Render a console with the console-filter plugin.
2. On keypress, log messages with the "keypress" tag.
3. After some messages have been logged, uncheck "keypress" on the console.
4. Error is thrown.

Change History

Luke Smith

YUI Developer

Posted: 08/25/09
  • milestone changed to 3.0.0 GA
  • relatesto changed to 2528207
  • status changed from new to accepted

This is only triggered when there are no messages left after filtering. Also, this exposes a bug in Node.create and Dom.create: passing the empty string will trigger an error from ret.cloneNode(true)

I've created bug #2528207 for DOM.

Luke Smith

YUI Developer

Posted: 08/25/09

printBuffer is a public method on Console, so ConsoleFilters is not required to trigger this error. Simply call yconsole.printBuffer() when the Console's buffer is empty.

Luke Smith

YUI Developer

Posted: 08/25/09

printBuffer no longer throws an error when the buffer is empty [fixes bug #2528205]
View Commit: 6ce51fc8f2d68d524fbfe531204c4b808e0d7180

Luke Smith

YUI Developer

Posted: 08/25/09
  • status changed from accepted to checkedin

Luke Smith

YUI Developer

Posted: 08/25/09

printBuffer no longer throws an error when the buffer is empty [fixes bug #2528205]
View Commit: 6ce51fc8f2d68d524fbfe531204c4b808e0d7180

George

YUI Developer

Posted: 09/29/09
  • resolution changed to fixed

George

YUI Developer

Posted: 09/29/09
  • status changed from checkedin to closed