BuddyDev

Search

bp-editable-activity update_comment()

  • Participant
    Level: Initiated
    Posts: 1
    Max Ledoux on #43463

    Updating comment is not working on production site but is working on my dev site. So that’s frustrating because it makes it hard to trouble shoot.

    On production — after clicking save, the process gets stuck on “updating…” In Developer Tools->Network tab I can see that ajax is echoing the content prematurely and then returning content => false in the actual response.

    for example:

    [HTML content here]
    {"success":true,"data":{"id":"3793469","content":false}}

    At the same time, edit activity (aka top level buddypress post) is working as expected.

    I assume there’s some server setting that’s causing this, since update_comment() works on my dev but not production. On the other hand, since update_activity() does work as expected on production, there must be something (or a lack of something) in update_comment().

    I did observe that update_activity() has an ob_start() and update_comment() does not. I added ob_start() to update_comment after line 145, before load_template( $template, false );.

    On my first attempt to update a comment on production after this, it was successful. However, attempting to edit additional comments reverted to the same problem as before (“content”:false).

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #43466

    Hi Max,
    Welcome to BuddyDev forums.

    The problem seems to be some plugin generating extra content and corrupting the expected json output. Please allow us to test and get back to you in next 24 hours.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 1
    Max Ledoux on #43525

    Thanks, Brajesh. Any luck?

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #43527

    Hi Max,
    I did test it.
    I am not seeing anything like that and it is working fine(for activity editing, comment and reply editing). I used BuddyPress 10.0, WordPress 5.9.1 and the latest version of this plugin with BP Nouveau template pack.

    From your topic, It seems to me that you have a plugin generating extra content. Try disabling some of the plugins related to activity stream to find the culprit.

    Please let me know if you are able to find the conflict.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved