WordPress database error on step 2.2

  • wpsolr
    Keymaster
    4 years ago #18854

    I don’t understand how, if the table does not exist yet, the delta sql tries to alter the table?

    wpsolr
    Keymaster
    4 years ago #18855

    Can you delete the WP option ‘wdm_db’? It controls the table creation vs alter.

    maxwatson
    Participant
    4 years ago #18877

    I’ve deleted the wdm_db, but it doesn’t do much. I see that it gets recreated again and the errors in admin still persist.

    wpsolr
    Keymaster
    4 years ago #18884

    What is your WPSOLR version?

    maxwatson
    Participant
    4 years ago #18888

    WPSOLR PRO 21.8
    In wdm_db i see the value a:1:{s:15:”current_version”;s:4:”21.5″;}

    wpsolr
    Keymaster
    4 years ago #18889

    This is correct.

    Please give me your current table structure in MySQL:
    DESCRIBE wp_wpsolr_index_history;

    wpsolr
    Keymaster
    4 years ago #18890

    Can you also copy here the full content of the SQL monitor errors?

    maxwatson
    Participant
    4 years ago #18891

    Sure, have a look at this image:

    https://ibb.co/646DD52

    wpsolr
    Keymaster
    4 years ago #18899

    I get only errors on the second call to dbDelta which tries to alter the table.

    Can you:
    a) drop the table
    b) reload the 2.2 page to make the first call to dbDelta
    c) DESCRIBE the table, and also capture the Query Monitor errors

    maxwatson
    Participant
    4 years ago #18900

    Ok, here are the results:

    https://ibb.co/JtX7QNh

    wpsolr
    Keymaster
    4 years ago #19018

    Why is there a “DESCRIBE” query in Query monitor debug logs?

    maxwatson
    Participant
    4 years ago #19019

    I have no idea 🙂
    This is what I see after I DROP the table and refresh the page 2.2

    wpsolr
    Keymaster
    4 years ago #19020

    I made the full same steps, but it worked:

    1) delete from wp_options where option_name = ‘wdm_db’;
    2) drop table wp_wpsolr_index_history;
    3) Refresh screen 2.2 with a taxonomy selected
    I can see a DESCRIBE error in Query monitor. Due to the dbDelta probably.
    4) describe wp_wpsolr_index_history;
    Table is here and correct.
    5) Refresh screen 2.2 with a taxonomy selected
    No error in Query monitor

    maxwatson
    Participant
    4 years ago #19021

    I’ve repeated steps 1-5 also, and I can confirm this behavior on my side also.

    But what happens when you refresh page 2.2 the second time?
    The second time I refresh (or access directly) the 2.2 page, the errors reappear.

    I don’t understand why the first time I access the page – no errors, the second time – errors.

    https://ibb.co/KDw3QQb

    wpsolr
    Keymaster
    4 years ago #19022

    It looks like in your case the line
    “if ( WPSOLR_Service_Container::getOption()->get_db_current_version() !== $db_version )”
    returns true, while it returns false for me.

    If I force it to return true, then I get the same Query monitor as yours when refreshing.

Viewing 15 posts - 16 through 30 (of 35 total)

You must be logged in to reply to this topic.