Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help Debugging AC Form Submiit


  • studiocrafted
    Participant

    @studiocrafted

    I’m struggling here.

    When running Twenty Nineteen sending an activity comment works as expected.

    The ajax request is made about line 749 in buddypress-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 in ajax_request of the parent object is different when comparing Twenty Nineteen as active vs custom theme.

    Custom theme responseText

    "Custom theme is active, here is my test comment.
    {
        "success":true,
        "data":{
            "contents":"<li>Removed for this topic.</li>"
        }
    }"

    Twenty Nineteen: responseText

    "
    {
        "success":true,
        "data":{
            "contents":"<li>Removed for this topic.</li>"
        }
    }"

    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.

Viewing 2 replies - 1 through 2 (of 2 total)

  • studiocrafted
    Participant

    @studiocrafted

    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.


    studiocrafted
    Participant

    @studiocrafted

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar