Opened 10 years ago
Closed 10 years ago
#5811 closed defect (bug) (fixed)
Ajax crashes on new reply to comment
Reported by: | SGr33n | Owned by: | r-a-y |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Appearance - Template Pack | Keywords: | has-patch commit |
Cc: |
Description
Hi,
It's since a few svn versions that if you reply to a comment the ajax sender crashes. When you click on the send button, the class loading is added to the submit button, but the comment is never added, and the loading class remains there until you reload the page.
Attachments (1)
Change History (11)
#2
@
10 years ago
Hi r-a-y!
I disabled WP_DEBUG but still don't works. I don't have that file, and the firefox debug console doesn't show me any error. The strange thing is that the error occurs just replying to a comment... commenting an activity works pretty good.
#3
@
10 years ago
Can you outline the steps that you're doing to get the AJAX crash? Explain every step, what page you're on, what textbox you're typing in, etc. so I can try to duplicate this.
#4
@
10 years ago
Sure!
I click on reply button:
<a id="acomment-reply-148227-from-148260" class="acomment-reply bp-primary-action" href="#acomment-148260">Reply</a>
Then buddypress.js adds the form:
<form id="ac-form-148227" class="ac-form" method="post" action="http://ww4.ircaserta.com/attivita/reply/" style="display: block;"> <div class="ac-reply-avatar"> <img class="avatar user-1-avatar avatar-80 photo" width="80" height="80" alt="Foto del profilo di SGr33n" src="http://ww4.ircaserta.com/wp-content/uploads/avatars/1/3047da0262dfccd6795722f43a636a6e-bpthumb.jpg"> </div> <div class="ac-reply-content"> <div class="ac-textarea"> <textarea id="ac-input-148227" class="ac-input bp-suggestions" name="ac_input_148227"></textarea> </div> <input type="submit" value="Send" name="ac_form_submit"> <a class="ac-reply-cancel" href="#">Cancella</a> <input type="hidden" value="148227" name="comment_form_id"> </div> <input id="_wpnonce_new_activity_comment" type="hidden" value="23ace042f5" name="_wpnonce_new_activity_comment"> <input type="hidden" value="/" name="_wp_http_referer"> </form>
I write the comment then I push on the submit button and then it stops working.
#5
@
10 years ago
- Milestone changed from Awaiting Review to 2.1
Confirmed.
For anyone else reading, this occurs when you attempt to reply to an activity comment in the sitewide activity stream.
It appears to be hanging here with a Maximum Execution Time
error:
https://buddypress.trac.wordpress.org/browser/tags/2.0.2/bp-templates/bp-legacy/buddypress-functions.php#L783
Will take a closer look.
#6
@
10 years ago
r-a-y - Check out https://buddypress.trac.wordpress.org/changeset/8226 - it could be that this needs to be ported into this AJAX callback as well.
#7
@
10 years ago
- Component changed from Core to Template Pack
- Keywords has-patch added
The explicit check here was causing the problem.
01.patch
casts the $parent_id
as an integer, which fixes the problem.
This problem did not occur in BP 2.0.2 though. Will try to use git bisect
to see where this bug started happening.
Do you have
WP_DEBUG
set to true? If so, what error messages are inwp-content/debug.log
?If you have
WP_DEBUG
set to true, set it to false and see if AJAX works again.