WordPress database error on step 2.2

  • ukdesignservices
    Participant
    3 years, 5 months ago #12770

    Good afternoon.

    I’m currently evaluating v21.5 on localhost to determine if it’s right for my clients. I’m really impressed with the functionality, but I’m finding the documentation very confusing, and the underlying code very hard to debug. I’m encountering a several issues:

    Firstly, I’m seeing the following database errors on step 2.2:

    WordPress database error: [Multiple primary key defined]
    ALTER TABLE wp_wpsolr_index_history CHANGE COLUMN id id bigint unsigned auto_increment primary key
    WordPress database error: [Duplicate column name 'action']
    ALTER TABLE wp_wpsolr_index_history ADD COLUMN action	varchar(1) not null

    I’ve checked the database tables, in the first instance there is a single primary key on id, in the second instance there is already a varchar(1) not null column named action.

    Secondly, is it possible to return search result posts that match taxonomies in the search page? All taxonomies are selected in ‘Select data to search in’ beside my post-types, however searching for a taxonomy term returns no results. For example, searching for ‘Attractions’ yields zero results, despite there being hundreds of matching posts.

    Thirdly, I’m getting an “Unknown error:60” code trying to delete the “Test index from Elastic Cloud”, and a deletion failure.

    Thank you in advance.

    Ben

    wpsolr
    Keymaster
    3 years, 5 months ago #12771

    I’ll answer here to the first question. Can you create 2 other topics for the other questions?

    I’ve checked the database tables, in the first instance there is a single primary key on id, in the second instance there is already a varchar(1) not null column named action.

    Try to drop the table, and deactivate/reactivate the plugin.

    ukdesignservices
    Participant
    3 years, 5 months ago #12772

    Thank you, that has solved the first issue. I’ll create individual topics for the others.

    Thanks also for the quick reply.

    Ben

    maxwatson
    Participant
    2 years, 8 months ago #18731

    I have the same problem, and it doesn’t fix the problem for me, any other ideas?
    Thanks!

    wpsolr
    Keymaster
    2 years, 8 months ago #18732

    “DROP TABLE wp_wpsolr_index_history;” should fix the problem.

    maxwatson
    Participant
    2 years, 8 months ago #18733

    Yes, this is how I’m doing it.
    But after the table is dropped, another one is being created, and the error re-appears, only when accessing tab 2.2 Data

    wpsolr
    Keymaster
    2 years, 8 months ago #18739

    Strange.

    Try in screen 2.2 to select only post types to index.

    maxwatson
    Participant
    2 years, 8 months ago #18769

    Ok, I’ve dropped the table again and checked only post types to index, and no more errors (the table wasn’t created in the database).
    So I’ve checked Products to index – no errors.
    But when I’ve checked products category to index, that’s when the errors reappeared.
    What can be wrong with product categories? Currently there are 1624 categories in the store.

    wpsolr
    Keymaster
    2 years, 8 months ago #18770

    The table “wp_wpsolr_index_history” is used for indexing product taxonomies only that will be shown in WPSOLR suggestions. It’s normal then that WPSOLR tries to create it when you select some in 2.2

    What is not normal is the SQL error.

    maxwatson
    Participant
    2 years, 8 months ago #18774

    Yes, right…should I try to manually insert some data in the table, maybe that changes something?

    wpsolr
    Keymaster
    2 years, 8 months ago #18779

    If you index some categories, this table should be filled automatically.

    maxwatson
    Participant
    2 years, 8 months ago #18786

    Ok, I’ve checked Products category in tab 2.2, the table wp_wpsolr_index_history was created, wen to tab 3 ‘send your data’, tried with option ‘Re-index all the data in place.’ after the reindex the table was still empty.
    Then I’ve deleted selected post types from index, then index selected post types. The table was still empty.
    It doesn’t look like it’s working.

    maxwatson
    Participant
    2 years, 8 months ago #18849

    Any thoughts on how can this be fixed?

    wpsolr
    Keymaster
    2 years, 8 months ago #18850

    This table is filled only when you index taxonomies on their own (to be displayed in suggestions). In 2.2, you should select the taxonomies at the same level as the pos types.

    Image wpsolr-admin-select-taxonomies-to-index.png of

    maxwatson
    Participant
    2 years, 8 months ago #18853

    Yes, this is what I’m doing, and still the errors persist.
    Please have a look at my image.

    https://ibb.co/Mg2Dwsx

Viewing 15 posts - 1 through 15 (of 34 total)

You must be logged in to reply to this topic.