Ticket #2530999 (closed defect)

Reporter


Petr Skoda
Opened: 08/25/11
Last modified: 09/27/11
Status: closed
Type: defect

Owner


Thomas S. Sha
Target Release: 3.4.1
Priority: P3 (normal)
Summary: "o.c is undefined" on page that uses both io-xdr and io-upload-iframe
Description:

The problem is in io-base in method _create:
t = io._transport;
...
o.c = t ? t[u] : {};

io.xdr mixes the _transport: {} into IO prototype which breaks the _uploadComplete in io-upload-frame
o.c.responseText = p ? p.get('text') : b.get('text');

Solution:
o.c = t ? (t[u] ? t[u] : {}) : {};
in yui-base _create method

Workaround:
instead of using 'io' use more specific 'io-'

Type: defect Observed in Version: 3.4.0
Component: IO Severity: S3 (normal)
Assigned To: Thomas S. Sha Target Release: 3.4.1
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: All
URL:
Test Information:

Change History

Thomas S. Sha

YUI Contributor

Posted: 08/29/11
  • location changed to Library Code
  • milestone changed to 3.4.1
  • priority changed to P3 (normal)
  • status changed from new to accepted

Thomas S. Sha

YUI Contributor

Posted: 08/29/11
  • estimated changed from 0 to 1
  • remaining changed from 0 to 1
  • sprint changed to sprint 2

Robert Schultz

Posted: 08/31/11

So this is happening to me as well. After a successful upload the following stack trace:

Uncaught TypeError: Cannot set property 'responseText' of undefined
Y.mix._uploadCompleteio-upload-iframe.js:203
Y.mix._addData.oio-upload-iframe.js:40
Y.Subscriber._notifyevent-custom-base.js:1154
Y.Subscriber.notifyevent-custom-base.js:1183
Y.CustomEvent._notifyevent-custom-base.js:879
Y.CustomEvent._procSubsevent-custom-base.js:984
Y.CustomEvent.fireSimpleevent-custom-base.js:953
Y.CustomEvent.fireevent-custom-base.js:934
Event._createWrapper.cewrapper.fn

Note that I am not including io-xdr, so it happens even without io-xdr included.

I just have these io- modules included:
io-base
io-form
io-upload-iframe

Also note that changing:
o.c = t ? t[u] : {};

to

o.c = t ? (t[u] ? t[u] : {}) : {};

In io-base.js _create() fixes the problem.

Thomas S. Sha

YUI Contributor

Posted: 09/1/11

There is also one additional change that will go into io-upload-iframe. The call to io._destroy is passing the wrong argument.

- w.setTimeout( function() { io._destroy(o.id); }, 0);

+ w.setTimeout( function() { io._destroy(o); }, 0);

Thomas S. Sha

YUI Contributor

Posted: 09/1/11

Ticket #2531039 was marked as a duplicate of this ticket.

Thomas S. Sha

YUI Contributor

Posted: 09/2/11
  • sprint changed from sprint 2 to sprint 1

Thomas S. Sha

YUI Contributor

Posted: 09/2/11
  • status changed from accepted to checkedin

Committed to 3.4.0+ branch for review.

Thomas S. Sha

YUI Contributor

Posted: 09/2/11

Correction: Committed to master branch for review.

Thomas S. Sha

YUI Contributor

Posted: 09/12/11
  • completed changed from 0 to 1
  • remaining changed from 1 to 0

Jenny Donnelly

YUI Developer

Posted: 09/27/11
  • status changed from checkedin to closed