I should problably add that in testing of my custom theme with vanilla template files favorite actions and comment deletions works, so does clicking comment to reveal the textarea form, it’s only when submitting the comment that the textarea never returns from its disabled state because the ajax outcome is caught on a fail()
.
I’ve tried to look closer into what event.data
is which is assigned to the parent
variable but I’m not able to debug much further than I already have.
It seems weird to me the responseText is formed differently in the return when Twenty Nineteen is active over my custom theme.
The other weird thing about this is that the comment does get added, it only becomes visible when the page is refreshed though.
I just wish there was a better error log available.
studiocrafted
@studiocrafted
5 years, 4 months ago
I’m struggling here.
When running Twenty Nineteen sending an activity comment works as expected.
The ajax request is made about line
749
inbuddypress-activity.js
/ buddypress-activity.min.js`.However in my custom theme the same script failed and doesn’t get a response. I’ve verified by adding a .fail() to the ajax call. There’s only one difference I can see in the responses and it’s stored within the parent object which is defined at line 438 and stores event.data
I’ve also removed all additional scripts and made sure that the activity area is using default view files rather than my own inherited. Still no joy.
The only thing I noticed was the
responseText
inajax_request
of theparent
object is different when comparing Twenty Nineteen as active vs custom theme.Custom theme
responseText
Twenty Nineteen:
responseText
I’m sure you’ll notice that there is no
contents
escaping the object in Twenty Nineteen.So yeah, I’m a bit stuck on debugging this and wondering if anyone has had the same problem and could point me in the right direction.
Thanks.