WordPress.org

Ready to get started?Download WordPress

Forums

Simple History
Database error when activating and can't delete. (2 posts)

  1. liarandathief
    Member
    Posted 11 months ago #

    When I activate, I get the error below. It appears that the UI is installed, but doesn't function. Every time there's a loggable event I get the same message, including deactivating. Can't delete the plugin "Plugin could not be deleted due to an error: Could not fully remove the plugin(s) simple-history/index.php."

    thoughts?

    WordPress database error Incorrect integer value: '' for column 'object_id' at row 1 for query
    		INSERT INTO wp_simple_history
    		SET
    			date = '2014-03-13 00:36:08',
    			action = 'activated',
    			object_type = 'plugin',
    			object_subtype = '',
    			user_id = '2',
    			object_id = '',
    			object_name = 'Simple History',
    			action_description = ''
    		 made by activate_plugin, do_action('activate_simple-history/index.php')

    https://wordpress.org/plugins/simple-history/

  2. liarandathief
    Member
    Posted 11 months ago #

    Ok, I "fixed" it by making a single change to the index.php

    function simple_history_add($args) {
    
    	$defaults = array(
    		"action" => null,
    		"object_type" => null,
    		"object_subtype" => null,
    		"object_id" => null,
    		"object_name" => null,
    		"user_id" => null,
    		"description" => null
    	);

    changed to:

    function simple_history_add($args) {
    
    	$defaults = array(
    		"action" => null,
    		"object_type" => null,
    		"object_subtype" => null,
    		"object_id" => 0,
    		"object_name" => null,
    		"user_id" => null,
    		"description" => null
    	);

    That seemed to do the trick and I haven't seen any adverse affects.

Reply

You must log in to post.

About this Plugin

About this Topic