• I’ve set up a set of wikis on the DemocracyLab site under the main menu item Collaborate>Discuss>

    The docs have twice put themselves into the trash, once all docs, and the second time only three of them. This is not my imagination, but has occurred with other installations as evidenced by this post: https://commonsinabox.org/groups/ciab-pioneers/forum/topic/docs-wandering-in-to-the-trash/

    Besides being bizarre, it’s really a deal breaker on the plugin. I can’t determine at all what would be causing it since the events are happening without any interaction with the docs which have never yet been edited or handled by myself or other users, they’re newly created. I can give a tech login to someone contributing on the git if that would help investigate. Or, since I’m a developer myself, if you have tests or code you want me to look at let me know.

    DemocracyLab is hosted at OSUOSL (Oregon State University’s Open Source Lab) and they are very helpful on the server side as well.

    https://www.ads-software.com/plugins/buddypress-docs/

Viewing 15 replies - 1 through 15 (of 18 total)
  • I have seen the same issue. No rhyme or reason as far as I can see.

    Thread Starter elemunjeli

    (@elemunjeli)

    Five docs trashed themselves again, and are saying they are being edited by me when I’m not logged in.

    Plugin Author Boone Gorges

    (@boonebgorges)

    Thanks for the report. This is the first I’ve heard of the issue.

    I’m going to comb through to attempt to locate possible problem points, but in the meantime, some questions to attempt to figure a pattern:

    – What other plugins are you using? Are you running Commons In A Box?
    – Does the problem only happen with non-admin users?
    – Does the problem only happen with docs that are/are not associated with a group?
    – Does the problem only happen with Docs of a certain privacy level?
    – Does it happen when someone tries to create the doc, when the docs are edited, or is it really happening when no one has touched the doc at all?

    – What other plugins are you using?
    Pretty vanilla commons in a box
    – Are you running Commons In A Box
    yes but despite recent grumblings I’ve heard I don’t think it has happened since the xbox 1.0.5 update. I just did a tour of all the sites in the femtechnet network and I don’t see anything in the Trash that doesn’t belong there. Maybe the answer is “Update the buddy press docs plugin to current.”
    – Does the problem only happen with non-admin users?
    Probably but at the time I was seeing it admins weren’t doing much if any doc editing/creating
    – Does the problem only happen with docs that are/are not associated with a group?
    no
    – Does the problem only happen with Docs of a certain privacy level?
    not sure, they *might* have been a mixture of public and private groups certainly no hidden ones
    – Does it happen when someone tries to create the doc, when the docs are edited, or is it really happening when no one has touched the doc at all?
    I think it was happening soon after they had created the doc but after they had saved and gone on to other tasks

    Thread Starter elemunjeli

    (@elemunjeli)

    I’m not running commons in a box.

    I’m using the most recent version of BP.

    I’m the only one who has touched the docs: they were just created and no other user has accessed the system so far, I am an admin.

    The docs are not associated with a group.

    All the docs are public, editable only by logged in users.

    It is happening when I haven’t touched the docs at all. I see it within 24 hours, and it seems to be progressive. I’ve seen the docs show an error message that they can’t be edited because I am editing them, when in fact I’m not even logged in. When I restore the docs they are marked as drafts and need to be published.

    I’m running Ninja Forms, including the Save User Progress extension, and we’ve done some troubleshooting on the php.ini for a very long form over the last couple days. I suspect that is the root of the problem.

    Other than that, there’s an events plugin, Akismet, and SI CAPTCHA.

    If you have some thought as to how to log the event I can put a script on the server, or give you Tech access if you contact me privately. https://munjelifotobox.com/contact/

    Plugin Author Boone Gorges

    (@boonebgorges)

    Thanks to both of you for your feedback. Doesn’t sound like we’re any closer to finding the actual cause, but some things have been ruled out, so thanks.

    As a next step, here’s a little script that may help us to track down the problem. Put it in a file in wp-content/mu-plugins/ (doesn’t matter what you call it – maybe wp-content/mu-plugins/bpdocsdebug.php):

    <?php
    function bbg_debug_doc_trash( $new_status, $old_status, $post ) {
        if ( 'bp_doc' == $post->post_status && 'trash' == $new_status ) {
            update_option( 'bbg_debug_doc_trash', json_encode( debug_backtrace() ) );
        }
    }
    add_action( 'transition_post_status', 'bbg_debug_doc_trash', 9999, 3 );

    Then, next time you notice the problem happen, look in your wp_options table for an item with option_name ‘bbg_debug_doc_trash’. Send the option_value to me privately, or post it here with any necessary path obfuscation. Thanks!

    Thread Starter elemunjeli

    (@elemunjeli)

    Thanks Boone. I’ll run it, but for the record, the docs haven’t trashed themselves within the last 24 hours – since the php.ini file was updated to support a larger max_input_vars and other fields. This was a requirement of a long form we were using on the site. I’ll let you know if I see any other issues. I will be messing around with the form (to write a postback script) so if it continues and is related we may spot it.

    Ele

    Thread Starter elemunjeli

    (@elemunjeli)

    Your script crashed my site. The event is happening as I post: I can see most of the docs are being edited by me although I’m not logged in. I can’t log it since if I load your script in mu-plugins the site won’t load (I’m getting a 503 server error).

    Next?

    Thread Starter elemunjeli

    (@elemunjeli)

    A clue: the admin bar disappeared, and I just had a white space at the top of the page. When I logged in the issue seemed to resolve itself: I stopped getting a message that I was editing the docs. Logged out: the docs are showing me editing. They haven’t trashed themselves yet though.

    I’m not sure the error was a 503 actually on the script, it just said the page wouldn’t load btw.

    Thread Starter elemunjeli

    (@elemunjeli)

    It’s definitely got to do with the login. Although the docs are all marked as ‘logged in users’ can edit, when I logout, it shows me editing. However the doc also lets me edit, and when I save, it shows me logged out and the admin bar reappears.

    Plugin Author Boone Gorges

    (@boonebgorges)

    Not sure why the script is crashing the site. Something must have happened with your copy and paste.

    That said, there was a typo in my original script that would cause it not to work (but certainly not to crash). The emended version:

    <?php
    function bbg_debug_doc_trash( $new_status, $old_status, $post ) {
        if ( 'bp_doc' == $post->post_type && 'trash' == $new_status ) {
            update_option( 'bbg_debug_doc_trash', json_encode( debug_backtrace() ) );
        }
    }
    add_action( 'transition_post_status', 'bbg_debug_doc_trash', 9999, 3 );

    I’ve just verified this on a number of installations and it does record. It’s possible that your PHP install doesn’t have JSON support available or something like that; your error logs (or WP_DEBUG) would probably tell you what’s causing the fatal error.

    Without more details on the backtrace, I’m afraid there’s little more that I can do. I’ve combed through the codebase of Docs pretty thoroughly and nothing is jumping out at me that might be causing this problem. So, hopefully you or another person experiencing the problem is able to get my tracer script to work. Thanks for trying.

    Plugin Author Boone Gorges

    (@boonebgorges)

    The fact that the admin bar is not appearing says to me that PHP is experiencing a fatal error at some point near the end of execution – probably somewhere in the footer, just before the admin bar is rendered. I’d recommend checking the error logs, or enabling WP_DEBUG in wp-config.php, to see if you can get the beginnings of an explanation. It’s not clear to me how this sort of problem would cause Docs to be trashed (after all, if PHP stops executing altogether, how would it send a Doc to the trash?), but it could be related.

    Thread Starter elemunjeli

    (@elemunjeli)

    I recognized the <?php typo on the original and fixed it but didn’t alter anything else. Now however, I copy-pasted your new code and the script is running. So we shall see. The docs haven’t thrown themselves away yet. Maybe in the morning. I’ll let you know.

    Plugin Author Boone Gorges

    (@boonebgorges)

    Thanks ??

    Thread Starter elemunjeli

    (@elemunjeli)

    They started throwing themselves away at midnight. I’ll send you the trace tomorrow I’m not working today. But we got it. Naughty naughty docs.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Docs Trashing Themselves’ is closed to new replies.