Ticket #9605 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Uncaught TypeError: Cannot call method 'slice' of undefined

Reported by: jbeilicke Assigned to: robguttman
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.11

Description

I just updated my trac installation to jQuery 1.7.1 and DynamicFieldsPlugin r11034 (0.11 branch). When loading a ticket, I am getting the mentioned error in layout.js:175. In the page there are some empty table headers without ids that seem to trigger the error.

This patch seems to work:

  • 0.11/dynfields/htdocs/layout.js

    old new  
    172172 
    173173// get_field 
    174174header_layout.get_field = function(th){ 
    175     return th.attr('id').slice(2); 
     175    return (th.attr('id') ? th.attr('id').slice(2) : ''); 
    176176}; 
    177177 
    178178// move_field 

Attachments

Change History

12/14/11 08:40:45 changed by rjollos

  • cc set to rjollos.

12/14/11 16:37:57 changed by robguttman

  • status changed from new to assigned.

04/30/12 04:11:09 changed by robguttman

(In [11520]) refs #9605: thanks to jbeilicke for patch for JS undefined issue.

04/30/12 04:11:28 changed by robguttman

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

Thanks for this patch - and sorry it took so long to get to it.

04/30/12 04:11:39 changed by robguttman

  • release changed from 0.12 to 0.11.

Note, only patched on 0.11 branch.


Add/Change #9605 (Uncaught TypeError: Cannot call method 'slice' of undefined)




Change Properties
Action