# Ticket #10106 (closed defect: fixed)

Opened 1 year ago

## plugin doesn't work correctly on click on ticket link

Reported by: Assigned to: falkb thomasd high GroupTicketFieldsPlugin major rjollos 0.11

### Description

Just click on a ticket link like #123 and see how the plugin doesn't work. On page reload it suddenly works well

## Change History

### (in reply to: ↑ 2 ) 06/19/12 23:08:46 changed by rjollos

Just a guess here, but I ran into some issues previously with resources not being correctly classified if they weren't in the desired directory structure.

The issue I was thinking of is #7617.

### (in reply to: ↑ 2 ) 06/19/12 23:57:52 changed by falkb

You might try placing it in a js subdirectory - changing the path to groupticketfields/js/group_ticket_fields.js

Tried it but that didn't help

### 06/20/12 03:57:58 changed by rjollos

I haven't been able to reproduce. Any chance you are seeing a conflict with another plugin?

### 06/20/12 04:38:21 changed by thomasd

Well, I can reproduce it. BUT, only when I click on a ticket via roadmap. Via "view ticket" everything works fine ?!?!

The problem seems to be a bug in another module? I get a javascript script error in search.js. And that seems to stop the javascript interpreter. There are other jQuery.ready calls (from other plugins and trac itself) that aren't called, too. E.g. the "Modify Ticket" is usually foldable. In our "not working" case, it is not.

### 06/20/12 05:45:48 changed by thomasd

• status changed from new to closed.
• resolution set to fixed.

Well, thats interesting.

I firebuged a bit and found the reason for the search.js error: Another plugin we are currently "maintaining" (SimpleMultiProjectPlugin) defines a javascript Array.prototype function "has".

search.js/getSearchTerms has a for statement for (var p in params). However, since the above defined prototype functions is assumed to be in params the following statement params[p].split fails for p == "has".

I haven't realized yet, that iterating over elements in an array includes prototype function names.

Resolved with #11664.

### 06/20/12 05:47:00 changed by thomasd

Ok, the last line should have been: Resolved with [11664].

Sorry ;-)

### Add/Change #10106 (plugin doesn't work correctly on click on ticket link)

Change Properties