• oscb

    (@oscb)


    Hi there,

    I’m looking for help about this issue I’ve been having on one of my client’s sites (https://revistero.mx it’s in spanish)
    The problem is that somehow, every once in a while the last published posts (let’s say, from 2 days ago til now) get deleted from the site. First I believed that it was someone from my client’s office who was deleting the posts, so i created two functions in functions.php to create a mini-log of actions:

    function wp_log_publish($post_ID){
    	global $wpdb;
    	$post = get_post($post_ID);
    	if ($post->post_date != $post->post_modified) return;
    	if(!wp_is_post_revision($post_ID)) {
    			$actionP = "New ";
    		$user = get_userdata($post->post_author);
    		$date = new DateTime();
    		$wpdb->insert('wplog', array('author'=>$user->user_login, 'description'=>$actionP.$post->post_title .' ID = '.$post->ID, 'date'=>$date->format("Y-m-d H:i:s")));
    	}
    }
    add_action('publish_rvs_revista', 'wp_log_publish');
    
    function wp_log_delete($post_ID){
    	global $wpdb;
    	$post = get_post($post_ID);
    	$user = get_userdata($post->post_author);
    	$date = new DateTime();
    	$wpdb->insert('wplog', array('author'=>$user->user_login, 'description'=>'Delete '.$post->post_title .' ID = '.$post->ID, 'date'=>$date->format("Y-m-d H:i:s")));
    }
    
    add_action('delete_post', 'wp_log_delete');

    What the log stated is that it was the “webmaster” (a.k.a. the user of my client) who was deleting the posts. Strangely all posts stated that they were deleted exactly at the same time. After a meeting with my client we decided I was going to manage the site for 15 days to check everything. Everything went just OK in those 15 days. Not a single post went missing.
    But today, after our last meeting after the 15 days a bunch of posts got deleted. What’s more strange is that this time not only they appeared to be deleted at the same time, also it stated that my user, another user from my office and even the user from my client (whom, by the way, I revoked all privileges to) were the ones who deleted them!
    I don’t know what could be happening, I’m thinking about a security issue but I don’t even know where to start so I come here for ideas.

    More Specs about the site:
    Plug Ins Installed:

    • AdRotate
    • Contact Form 7
    • Register Plus Redux (I’m aware this plugin has had some security issues so I’m deactivating it immediately)
    • WP-PostRatings
    • WP-PostViews

    Custom Posts: Magazines (they are the ones that are dissapearing, no other posts dissapear

  • The topic ‘Posts Disappearing’ is closed to new replies.