[buddypress-trac] [BuddyPress Trac] #5450: Problem with groups in buddypress when a comment has more than five direct answers

buddypress-trac noreply at wordpress.org
Fri Mar 7 23:59:58 UTC 2014


#5450: Problem with groups in buddypress when a comment has more than five direct
answers
-------------------------+-------------------------------------------------
 Reporter:  dmuneras     |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Awaiting Review
 Priority:  high         |    Version:  1.9.1
Component:  Groups       |   Keywords:  2nd-opinion needs-patch ui-feedback
 Severity:  normal       |
-------------------------+-------------------------------------------------
 Hi,

 I think there is a Javascript error in the following JS source code (line
 1707):

  http://phpxref.ftwr.co.uk/buddypress/nav.html?bp-templates/bp-
 legacy/js/buddypress.js.source.html

 If a comment has more than five direct answers, we will get the following
 error:

 Uncaught TypeError: Cannot call method 'replace' of undefined, it happens
 with the following instruction:

 BP_DTheme.show_x_comments.replace( '%d', comment_count )

 It seems like BP_DTheme.show_x_comments is not defined.

 I wrote an script to check if we will get the error (run it using google
 chrome element inspector).


 ----
 ----------------------------------------------------------------------------------------

 jq('div.activity-comments').each(function(i){
         comment_lis = jq(this).children('ul').children('li');
         comment_lis.each(function(i){
                 if ( i < comment_lis.length - 5 ) {
                         if ( !i ){
                                 if(window.console)
                                         console.log("WARNING: Comment with
 ID: " + comment_lis.attr('id')
                                                 + " has more than 5
 comments and this is going to exploit! ");
                                 if(window.console)
                                         console.log("Identificador
 comentario comentado más de 5 veces: " +
                                                 jq('div.activity-
 comments').parents('ul#activity-stream > li').attr('id'));
                         }
                 }
         });
 });

 ----
 ----------------------------------------------------------------------------------------

 Could you check if I am right or it is something wrong with my Wordpress
 or Buddypress installation? because when I get the error. I can't comment
 the comments.

 Best regards,
 Daniel.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5450>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list