Global site search causing error on post publish/update

Hi have just installed Global site search on WPMU 2.8.4a.
It works as far as the search page is concerned, but I get error on publishing or updating posts:
on Firefox, the page does not return to the posts list after the update.
on IE, I get the DB error copied here:
WordPress database error Incorrect datetime value: '1253823287' for column 'term_count_updated' at row 5 for query UPDATE wp_term_counts SET term_count = term_count + 1,term_count_updated = '1253823287' WHERE ( (term_id = '1' AND term_count_type = 'blog_type_Blogs Perso') OR (term_id = '1' AND term_count_type = 'blog_lang_en_en') OR (term_id = '1' AND term_count_type = 'all') ) made by edit_post, wp_update_post, wp_insert_post, do_action, call_user_func_array, post_indexer_post_insert_update, post_indexer_post_terms_insert_update
I have tried to remove the datetime format in the field term_count_updated, but I still get the same error.

  • Andrew


    The problem seems to be with the post indexer plugin and not the global site search plugin (it doesn't have any tables).

    Can you please:

    1) Remove the global site search plugin

    2) Remove the post indexer plugin and remove the db table

    3) Run the SQL provided with the post indexer plugin on your db

    4) Add the post indexer plugin back in

    5) Add the global site search plugin back in.


  • cat28

    I followed your advice. Actually, the post indexer is causing the problem, even before the global site search is installed.
    Maybe I should have specified that I am working on a development PC and so I host WPMU on VISTA/IIS , PHP5, MySQL5.
    The problem is with the time() function used in the post-indexer.php.
    I have replaced the three occurences of
    "term_count_updated = '" . time() . "
    with "term_count_updated = '" .date("Y-m-d H:i:s":wink: ."
    That fixes the issue for now.
    I'm sure there must be a more elegant way of doing this in php.ini but I didn't find it.
    Also an other way would be to use current timestamp as the default value for term_count_updated in the mysql database, and remove the
    "term_count_updated = " in the SQL update function altogether.

    Thanks for your guidance on this issue.