[ 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.