You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Geir Ove Grønmo (JIRA)" <ji...@apache.org> on 2009/09/02 13:10:32 UTC
[jira] Created: (SOLR-1403) solrjs broken when used with Prototype
library
solrjs broken when used with Prototype library
----------------------------------------------
Key: SOLR-1403
URL: https://issues.apache.org/jira/browse/SOLR-1403
Project: Solr
Issue Type: Bug
Affects Versions: 1.4
Reporter: Geir Ove Grønmo
Using the Prototype javascript library in the same page as the SolrJS javascript library does not work. It triggers the following error:
stacktrace: Line 303 of linked script http://localhost:8080/ontopoly/solr/solrjs-1.4-dev.js
this.widgets[id].doRequest(query, start, resultsOnly);
...
The problem is that Prototype redefines the each function in the Array class. And that does not work with the for-in loop syntax in javascript.
The fix is to change the widgets and selectionViews arrays defined in jQuery.solrjs.Manager from arrays to proper associative arrays:
widgets : {},
...
selectionViews : {},
>From what I can see these two properties are supposed to be proper associative arrays anyway, and not arrays with string keys.
More background on this problem can be found here: http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1403) solrjs broken when used with
Prototype library
Posted by "Geir Ove Grønmo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750398#action_12750398 ]
Geir Ove Grønmo commented on SOLR-1403:
---------------------------------------
Forgot the javascript error message. Here it is: Statement on line 303: Type mismatch (usually non-object value supplied where object required)
> solrjs broken when used with Prototype library
> ----------------------------------------------
>
> Key: SOLR-1403
> URL: https://issues.apache.org/jira/browse/SOLR-1403
> Project: Solr
> Issue Type: Bug
> Affects Versions: 1.4
> Reporter: Geir Ove Grønmo
>
> Using the Prototype javascript library in the same page as the SolrJS javascript library does not work. It triggers the following error:
> stacktrace: Line 303 of linked script http://localhost:8080/ontopoly/solr/solrjs-1.4-dev.js
> this.widgets[id].doRequest(query, start, resultsOnly);
> ...
> The problem is that Prototype redefines the each function in the Array class. And that does not work with the for-in loop syntax in javascript.
> The fix is to change the widgets and selectionViews arrays defined in jQuery.solrjs.Manager from arrays to proper associative arrays:
> widgets : {},
> ...
> selectionViews : {},
> From what I can see these two properties are supposed to be proper associative arrays anyway, and not arrays with string keys.
> More background on this problem can be found here: http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-1403) solrjs broken when used with Prototype
library
Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grant Ingersoll resolved SOLR-1403.
-----------------------------------
Resolution: Won't Fix
SolrJS has been moved to a third party repository
> solrjs broken when used with Prototype library
> ----------------------------------------------
>
> Key: SOLR-1403
> URL: https://issues.apache.org/jira/browse/SOLR-1403
> Project: Solr
> Issue Type: Bug
> Affects Versions: 1.4
> Reporter: Geir Ove Grønmo
>
> Using the Prototype javascript library in the same page as the SolrJS javascript library does not work. It triggers the following error:
> stacktrace: Line 303 of linked script http://localhost:8080/ontopoly/solr/solrjs-1.4-dev.js
> this.widgets[id].doRequest(query, start, resultsOnly);
> ...
> The problem is that Prototype redefines the each function in the Array class. And that does not work with the for-in loop syntax in javascript.
> The fix is to change the widgets and selectionViews arrays defined in jQuery.solrjs.Manager from arrays to proper associative arrays:
> widgets : {},
> ...
> selectionViews : {},
> From what I can see these two properties are supposed to be proper associative arrays anyway, and not arrays with string keys.
> More background on this problem can be found here: http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.