You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Doug Davies (JIRA)" <ji...@apache.org> on 2012/06/07 21:43:23 UTC
[jira] [Created] (SHINDIG-1794) In init.js the loop that looks for
script tags is broken
Doug Davies created SHINDIG-1794:
------------------------------------
Summary: In init.js the loop that looks for script tags is broken
Key: SHINDIG-1794
URL: https://issues.apache.org/jira/browse/SHINDIG-1794
Project: Shindig
Issue Type: Bug
Components: Javascript
Affects Versions: 2.5.0-beta2
Reporter: Doug Davies
Fix For: 2.0.3
In beta2 the logic was changed for how it looks for the script tags to figure out the container, etc. The for loop is broken.
If I change
for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
to
for(var i = 0; i < scriptEls.length; i++) {
It fixes the issue and the right container is used.
I would like to see this fixed for beta2 if possible.
--
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] (SHINDIG-1794) In init.js the loop that looks
for script tags is broken
Posted by "Doug Davies (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291297#comment-13291297 ]
Doug Davies commented on SHINDIG-1794:
--------------------------------------
I can confirm Stanton's code works for my scenario.
> In init.js the loop that looks for script tags is broken
> --------------------------------------------------------
>
> Key: SHINDIG-1794
> URL: https://issues.apache.org/jira/browse/SHINDIG-1794
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta2
> Reporter: Doug Davies
> Fix For: 2.0.3
>
>
> In beta2 the logic was changed for how it looks for the script tags to figure out the container, etc. The for loop is broken.
> If I change
> for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
> to
> for(var i = 0; i < scriptEls.length; i++) {
> It fixes the issue and the right container is used.
> I would like to see this fixed for beta2 if possible.
--
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] (SHINDIG-1794) In init.js the loop that looks
for script tags is broken
Posted by "Stanton Sievers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291288#comment-13291288 ]
Stanton Sievers commented on SHINDIG-1794:
------------------------------------------
I think the loop should be the following. We want to ensure that scriptEls is truthy before we check the length. Also added the break in the 'if'.
var scriptEls = document.getElementsByTagName('script');
for(var i = 0; scriptEls && i < scriptEls.length; i++) {
if(/.*gadgets\/js\/.*container.*[.]js.*[?&]c=1(&|$).*/.test(scriptEls[i].src)) {
scriptEl = scriptEls[i];
break;
}
}
> In init.js the loop that looks for script tags is broken
> --------------------------------------------------------
>
> Key: SHINDIG-1794
> URL: https://issues.apache.org/jira/browse/SHINDIG-1794
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta2
> Reporter: Doug Davies
> Fix For: 2.0.3
>
>
> In beta2 the logic was changed for how it looks for the script tags to figure out the container, etc. The for loop is broken.
> If I change
> for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
> to
> for(var i = 0; i < scriptEls.length; i++) {
> It fixes the issue and the right container is used.
> I would like to see this fixed for beta2 if possible.
--
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] (SHINDIG-1794) In init.js the loop that looks
for script tags is broken
Posted by "Henry Saputra (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291372#comment-13291372 ]
Henry Saputra commented on SHINDIG-1794:
----------------------------------------
+1
> In init.js the loop that looks for script tags is broken
> --------------------------------------------------------
>
> Key: SHINDIG-1794
> URL: https://issues.apache.org/jira/browse/SHINDIG-1794
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta2
> Reporter: Doug Davies
> Assignee: Stanton Sievers
> Fix For: 2.0.3
>
>
> In beta2 the logic was changed for how it looks for the script tags to figure out the container, etc. The for loop is broken.
> If I change
> for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
> to
> for(var i = 0; i < scriptEls.length; i++) {
> It fixes the issue and the right container is used.
> I would like to see this fixed for beta2 if possible.
--
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] (SHINDIG-1794) In init.js the loop that looks for
script tags is broken
Posted by "Stanton Sievers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stanton Sievers reassigned SHINDIG-1794:
----------------------------------------
Assignee: Stanton Sievers
> In init.js the loop that looks for script tags is broken
> --------------------------------------------------------
>
> Key: SHINDIG-1794
> URL: https://issues.apache.org/jira/browse/SHINDIG-1794
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta2
> Reporter: Doug Davies
> Assignee: Stanton Sievers
> Fix For: 2.0.3
>
>
> In beta2 the logic was changed for how it looks for the script tags to figure out the container, etc. The for loop is broken.
> If I change
> for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
> to
> for(var i = 0; i < scriptEls.length; i++) {
> It fixes the issue and the right container is used.
> I would like to see this fixed for beta2 if possible.
--
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] [Updated] (SHINDIG-1794) In init.js the loop that looks for
script tags is broken
Posted by "Stanton Sievers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stanton Sievers updated SHINDIG-1794:
-------------------------------------
Attachment: SHINDIG-1794.patch
> In init.js the loop that looks for script tags is broken
> --------------------------------------------------------
>
> Key: SHINDIG-1794
> URL: https://issues.apache.org/jira/browse/SHINDIG-1794
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta2
> Reporter: Doug Davies
> Assignee: Stanton Sievers
> Fix For: 2.5.0-beta2
>
> Attachments: SHINDIG-1794.patch
>
>
> In beta2 the logic was changed for how it looks for the script tags to figure out the container, etc. The for loop is broken.
> If I change
> for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
> to
> for(var i = 0; i < scriptEls.length; i++) {
> It fixes the issue and the right container is used.
> I would like to see this fixed for beta2 if possible.
--
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