Skip to:
Content
Pages
Categories
Search
Top
Bottom

Thousands of revisions


  • inspirationally
    Participant

    @inspirationally

    Hey there,

    I have a problem I can’t find a solution for (all latest versions, but it was the same before) at deppheads.com:

    Every few seconds, I can see a new revision coming up in the database. I just removed the revisions of the last month and there were over 50000! I mean my forums have a few hundred thousand posts, and they are some kind of reply/topic revisions to existing posts/topics as copies of existing replies (I think). Very curious.

    I have no idea how to disable them from being created. I already set auto_save to define('AUTOSAVE_INTERVAL', 86400);

    and added

    
    add_action('admin_init', 'disable_revisions');
    function disable_revisions(){
           remove_post_type_support('revision', 'revisions');
     remove_post_type_support('topic', 'revisions');
        remove_post_type_support('reply', 'revisions');
    }
    

    to my functions.php, but they still appear.

    And I disabled revisions for bbpress posts in the settings page.

    Any ideas??

    Visitors are allowed to post, and I’d like to keep it like that, because it is also my comments system and I know many would not comment if they needed to register.

    Here are the last 20 exported as sql (couln’t copy it in, so as a link:)

    http://deppheads.com/insert.txt

    Here one example of the “parent” http://deppheads.com/forums/reply/359207/

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

  • inspirationally
    Participant

    @inspirationally

    Hm, the topic is showing as 1 year 6 months old…as freshness, although i started it an hour ago. Hopefully this reply will change that.

    Ok, this is really weird, I’m out and about at the moment but will take a closer look at this in the morning.

    For now if you want to truly disable revisions you can do so wp-config.php as detailed here:

    http://codex.wordpress.org/Editing_wp-config.php#Disable_Post_Revisions


    inspirationally
    Participant

    @inspirationally

    Thanks, Edgar, I can see, if this solves the problem, but actually…well…I don’t even want to disable revisions completely. For my blog pages, they were a nice feature…to have an older version available if one of the editors did something wrong.

    //edit: deleted those revisions again, there were over 1000 since yesterday evening. if they come, they seem to come in a batch. All posts (or some posts) of one topic, i guess. As if a google bot or something calls all edit pages of the posts at the same time.

    //edit2: no new revisions so far, but if it is possible to just disable those revisions just for bbpress (even if that checkbox IS checked), it’d be great.

    I only mentioned this as a ‘temporary measure’ if you feel that you need completely disable them whilst we look into this. Once I’m back home I’ll take a closer look at the issue and the SQL you attached in your original post.


    inspirationally
    Participant

    @inspirationally

    After deactivating all bbPress related Plugins, it still occured. Now I removed the functions.php and it seems to have stopped and I’m re-adding it one snippet after the other, but I always have to wait half an hour between each snippet to see if it continues. No idea how to test it “immediately”.

    It might be something about this part:

    //Remove bbPress Head on non bbPress sites

    add_action( 'wp_head', 'conditional_bbpress_head', 9 );
    function conditional_bbpress_head(){
    global $post;
    if( !is_bbpress() && !(is_home() && $_SERVER['SERVER_NAME'] == 'deppheads.com') && !(isset( $post->post_parent ) && $post->post_parent == "17123") )
    remove_action( 'wp_head', 'bbp_head' );
    }
    add_action( 'wp_enqueue_scripts', 'conditional_bbpress_scripts', 9 );
    function conditional_bbpress_scripts(){
    global $post;
    if( !is_bbpress() && !(is_home() && $_SERVER['SERVER_NAME'] == 'deppheads.com') && !(isset( $post->post_parent ) && $post->post_parent == "17123") )

    remove_action( 'wp_enqueue_scripts', 'bbp_enqueue_scripts' );
    }

    which I added because I have two domains running and just one little part under the domain deppheads is actually the forum, and I did not want all that bbPress code in all sites, especially not on my main site.
    Is that possible??

    That’s possible but most of that is not my expertise and a little beyond my skillset. ;)

    I’d probably suggest you do some debugging, grab the following plugin as it will add a few other debug plugins, in particular ‘debug bar’ and you will be able to view the SQL queries being made to MySQL that might help track what actions are causing a post revision to be added.

    http://wordpress.org/plugins/developer/


    inspirationally
    Participant

    @inspirationally

    Will try that later in the evening. For now, it was just by coincidence with my functions.php. I tried now using the unchanged 2014 theme for longer and they still are created, those inherit revisions.
    Which page should I check with the debug? The topic pages?


    inspirationally
    Participant

    @inspirationally

    OK, now I

    1) deactivated all plugins but akismet, bbpress, members, tehnik bbpress permissions, wangguard and temporarily wp optimize and debug queries
    2) deleted revisions and transients and cache
    3) activated twenty fourteen theme

    and after some minutes those revisions still are being created.

    Here the queries that debug queries lists when watching the topic http://johnny-depp.org/forums/topic/neujahr/

    -> http://johnny-depp.org/queries.txt


    inspirationally
    Participant

    @inspirationally

    I deactivated members and tehnik permissions, too, and activated the debug objects plugin – I copied all but cache part (that one was so long that I could not copy it…but made a screencap of the first part of it):

    http://johnny-depp.org/debug.rtf

    http://johnny-depp.org/cache.png

    new revisions were created all the time.

    Any new ideas?? What i could do more to know what causes it?

    I had a look at the data in both your previous posts and I can only find SELECT SQL statements, there are no INSERT INTO or UPDATE SQL statements that cause the creation or updates into the database so these don’t help us much, not sure what/where we should be looking for more help here.

    There is the following plugin by one of the WordPress core devs @dd32 http://wordpress.org/plugins/revision-control/

    I have sent him an email asking for some tips on what else we should be looking for.


    papas_fritas
    Participant

    @papas_fritas

    I’ve got this same problem! In the database, seeing TONS of revisions from post_author = 0. Also getting server errors and timeouts when people try to edit.

    Plugins running:
    Google Analytics for WordPress
    Jetpack by WordPress.com
    W3 Total Cache
    WangGuard

    I just tried unchecking “Allow topic and reply revision logging” under Forum settings. We will see what happens.


    papas_fritas
    Participant

    @papas_fritas

    This is out of control! There are dozens of new dummy revisions just since I posted this. Will try disabling all plugins except bbPress now.


    papas_fritas
    Participant

    @papas_fritas

    Ack! Disabled all plugins and still getting lots of dummy revisions.

    There are also huge spikes in server load, in addition to the 500 errors. I’m trying to rule this out as a cause.

    post_author = 0

    In a bbPress context is an ‘Anonymous User’, check that you don’t have this enabled.

    Also check what WordPress settings are in /wp-admin/options-discussion.php

    Ack! Disabled all plugins and still getting lots of dummy revisions.

    Is this with bbPress disabled?


    papas_fritas
    Participant

    @papas_fritas

    @netweb Thank you!

    In a bbPress context is an ‘Anonymous User’, check that you don’t have this enabled.

    OK, not enabled. Anonymous posting is NOT checked (Allow guest users without accounts to create topics and replies = NO). Still seeing the dummy revisions.

    Also check what WordPress settings are in /wp-admin/options-discussion.php

    I checked the box “Users must be registered and logged in to comment,” but that didn’t change anything.

    Is this with bbPress disabled?

    NO, bbpress was enabled. I disabled bbpress for a few minutes and did not see any post revisions generated during that time period.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    What posts are these revisions for? Does some user actually have access to edit some post, and is able to click them? Have you tried logging in to your site as a non-admin, and looking around for how someone could access an ‘edit’ link to anything; maybe in the top toolbar area?


    papas_fritas
    Participant

    @papas_fritas

    @johnjamesjacoby thanks for the suggestion. I wonder if you are on to something. I am using a (minimally tweaked) child theme based on the Twenty Twelve theme. There is a visible Edit link at the bottom of the page to logged in users.

    I just edited the content-page.php (deleted) edit link to see if that changes anything. Will report back.


    inspirationally
    Participant

    @inspirationally

    I realize, we share(d) the plugin Wangguard.
    I deactivated it before, but the revisions kept going. A week ago I replaced it with “GoodQuestion” cause that seemed more lightweight for me and does the job, too. I just cleaned my database from old tables, including the wangguard ones, re-activated revisions and for an hour now no new revision. Although guests are even allowed to post.
    Might you try it, too? (deactivate, backup the five or six wangguard tables and test, and reload from the backup afterwards, maybe?)


    inspirationally
    Participant

    @inspirationally

    Fugettaboutit – some more hours passed by and they still are there. So that wasn’t the reason.

    CUrious is, that, at least for me, the URLs (guid) of the revisions are like
    http://deppheads.com/general/2014/01/24/303815-revision-v1/

    with post parent being this
    http://deppheads.com/forums/reply/303815/

    while even those spam replies have an url like this
    http://deppheads.com/forums/reply/711501/

    so they are getting normal posts in the general category (my default one)

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

You must be logged in to reply to this topic.