I have post indexer v3.0.4 on wpms 3.5.1. My error log

Hi, I have post indexer v3.0.4 on wpms 3.5.1.
My error log is getting full from errors like the following, due to high traffic site.

Duplicate entry '%ce%b4-%cf%84%ce%ac%ce%be%ce%b7' for key 'slug' \xce\xb2\xce\xac\xcf\x83\xce\xb7\xcf\x82 \xce\xb4\xce\xb5\xce\xb4\xce\xbf\xce\xbc\xce\xad\xce\xbd\xcf\x89\xce\xbd WordPress \xce\xb3\xce\xb9\xce\xb1 \xce\xb1\xce\xaf\xcf\x84\xce\xb7\xcf\x83\xce\xb7 INSERT INTOwp_network_terms(name,slug,term_group) VALUES ('\xce\x94\\' \xcf\x84\xce\xac\xce\xbe\xce\xb7','%ce%b4-%cf%84%ce%ac%ce%be%ce%b7',0) \xce\xb1\xcf\x80\xcf\x8c post_preview, wp_create_post_autosave, wp_update_post, wp_insert_post, do_action('save_post'), call_user_func_array, postindexeradmin->index_post, postindexermodel->index_tax, postindexermodel->insert_or_get_term, m_wpdb->query, referer: http://blogs.sch.gr/myblog/wp-admin/post.php?post=236&action=edit

I guess its a bug of post indexer, but can't locate it in order to fix it.
Can you please "ping" the developer about it?

Thanks in advance.
Lena

  • Barry
    • DEV MAN’s Mascot

    Can you cut and paste a few of the errors / messages into a text file, zip them up and attach them here?

    Also, if you could - can you do an sql dump / export of your wp_network_terms table (using something like phpmyadmin) and do the same (zip it up and attach here), then I can check a couple of things out.

  • stergatu
    • Site Builder, Child of Zeus

    @Barry, hi.
    I need your advice on this.
    It order to get rid of the reported error I made the following change in class.model.php. I replaced UNIQUE KEY slug (slug) with KEY slug (slug) on table creation
    So in the code, instead of

    `$sql = "CREATE TABLE IF NOT EXISTS'" . $this->network_terms . "' (
    'term_id' bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    'name' varchar(200) NOT NULL DEFAULT '',
    'slug' varchar(200) NOT NULL DEFAULT '',
    'term_group' bigint(10) NOT NULL DEFAULT '0',
    PRIMARY KEY ('term_id'),
    UNIQUE KEY 'slug' ('slug'),
    KEY 'name' ('name')
    ) DEFAULT CHARSET=utf8;";`

    I wrote:

    $sql = "CREATE TABLE IF NOT EXISTS'" . $this->network_terms . "' (
    							  'term_id' bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    							  'name' varchar(200) NOT NULL DEFAULT '',
    							  'slug' varchar(200) NOT NULL DEFAULT '',
    							  'term_group' bigint(10) NOT NULL DEFAULT '0',
    							  PRIMARY KEY ('term_id'),
    							  KEY 'slug' ('slug'),
    							  KEY 'name' ('name')
    							) DEFAULT CHARSET=utf8;";

    Is it OK, or I "broke" something?

    I plan to do the same (replace unique key with key) for the field term_id_taxonomy in wp_network_term_taxonomy tabloe where I also get a "duplicate entry" error.

    Please advice :slight_smile:

    Thanks in advance
    Lena

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.