You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Lenny Primak (Created) (JIRA)" <ji...@apache.org> on 2011/10/22 11:28:32 UTC
[jira] [Created] (TAP5-1716) Zone updates fail due to underscore.js
critical bug
Zone updates fail due to underscore.js critical bug
---------------------------------------------------
Key: TAP5-1716
URL: https://issues.apache.org/jira/browse/TAP5-1716
Project: Tapestry 5
Issue Type: Bug
Components: tapestry-core
Affects Versions: 5.3, 5.4
Reporter: Lenny Primak
Priority: Critical
Zone updates that reload scripts fail due to scripts reloading multiple times.
This is due to underscore.js _contains() bug which Tapestry just started using.
When another JS library overrides Array.prototype.indexOf, the code that
has the bug is executed. It is not executed otherwise.
Basically, _.contains() never returns true in this case, which leads
to multiple reloads of stylesheets and scripts.
I also submitted this patch to underscore.js developers.
Patch is included.
*** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
--- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
***************
*** 198,205 ****
var found = false;
if (obj == null) return found;
if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
! found = any(obj, function(value) {
! if (value === target) return true;
});
return found;
};
--- 198,205 ----
var found = false;
if (obj == null) return found;
if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
! any(obj, function(value) {
! if (found = value === target) return true;
});
return found;
};
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Lenny Primak (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134398#comment-13134398 ]
Lenny Primak commented on TAP5-1716:
------------------------------------
This patch is now incorporated in underscore.js versions > 1.2.0
Thanks!
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3
>
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134223#comment-13134223 ]
Hudson commented on TAP5-1716:
------------------------------
Integrated in tapestry-trunk-freestyle #602 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/602/])
TAP5-1716: Zone updates fail due to underscore.js critical bug
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188194
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/underscore_1_1_7.js
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3
>
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Lenny Primak (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134398#comment-13134398 ]
Lenny Primak commented on TAP5-1716:
------------------------------------
This patch is now incorporated in underscore.js versions > 1.2.0
Thanks!
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3
>
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1716) Zone updates fail due to underscore.js
critical bug
Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1716.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.3
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3
>
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Howard M. Lewis Ship (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAP5-1716:
------------------------------------------
Assignee: Howard M. Lewis Ship
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134117#comment-13134117 ]
Howard M. Lewis Ship commented on TAP5-1716:
--------------------------------------------
In the future, please provide patches as attachments, not inline. It helps with formatting, and also ensure that you have assigned the necessary rights to the ASF. Thank for the patch!
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1716) Zone updates fail due to underscore.js
critical bug
Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1716.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.3
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3
>
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134223#comment-13134223 ]
Hudson commented on TAP5-1716:
------------------------------
Integrated in tapestry-trunk-freestyle #602 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/602/])
TAP5-1716: Zone updates fail due to underscore.js critical bug
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1188194
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/underscore_1_1_7.js
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3
>
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134117#comment-13134117 ]
Howard M. Lewis Ship commented on TAP5-1716:
--------------------------------------------
In the future, please provide patches as attachments, not inline. It helps with formatting, and also ensure that you have assigned the necessary rights to the ASF. Thank for the patch!
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (TAP5-1716) Zone updates fail due to
underscore.js critical bug
Posted by "Howard M. Lewis Ship (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAP5-1716:
------------------------------------------
Assignee: Howard M. Lewis Ship
> Zone updates fail due to underscore.js critical bug
> ---------------------------------------------------
>
> Key: TAP5-1716
> URL: https://issues.apache.org/jira/browse/TAP5-1716
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3, 5.4
> Reporter: Lenny Primak
> Assignee: Howard M. Lewis Ship
> Priority: Critical
>
> Zone updates that reload scripts fail due to scripts reloading multiple times.
> This is due to underscore.js _contains() bug which Tapestry just started using.
> When another JS library overrides Array.prototype.indexOf, the code that
> has the bug is executed. It is not executed otherwise.
> Basically, _.contains() never returns true in this case, which leads
> to multiple reloads of stylesheets and scripts.
> I also submitted this patch to underscore.js developers.
> Patch is included.
> *** new/org/apache/tapestry5/underscore_1_1_7.js 2011-10-22 05:10:36.000000000 -0400
> --- old/org/apache/tapestry5/underscore_1_1_7.js 2011-08-06 12:27:18.000000000 -0400
> ***************
> *** 198,205 ****
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! found = any(obj, function(value) {
> ! if (value === target) return true;
> });
> return found;
> };
> --- 198,205 ----
> var found = false;
> if (obj == null) return found;
> if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
> ! any(obj, function(value) {
> ! if (found = value === target) return true;
> });
> return found;
> };
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira