WPSOLR: error on term

  • 5 years ago #10933

    I configured the server and now when I tried to index I got an error “WPSOLR: error on term 534 for taxonomy ‘manufacturer’: Invalid taxonomy.”

    I have few custom taxonomies including manufacturer but the index is stopped. Please tell me how to get this done

    Also, when i enable the plugin the list of woocommerce orders are not visible

    wpsolr
    Keymaster
    5 years ago #10934

    Can you edit the term 534 of taxonomy “manufacturer” in WP admin?

    5 years ago #10935

    Can you guide me to edit that ? I have visited the manufacturer taxonomy page change the ID from url to 534 it says

    You attempted to edit an item that doesn’t exist. Perhaps it was deleted?

    Any guess how to fix this.

    And can you further explain why the orders are not showing up ?

    wpsolr
    Keymaster
    5 years ago #10936

    You attempted to edit an item that doesn’t exist. Perhaps it was deleted?

    Perhaps. But apparently, it is still used in your products.

    To detect which one, you can index with “batch number” equals to 1, and with the debug option checked. You should be able to see the product id displayed when the indexing stops on error.

    And can you further explain why the orders are not showing up ?

    Please create a new topic for this issue.

    • This reply was modified 5 years ago by wpsolr.
    5 years ago #10942

    I ran the index with batch 1 and debug enabled

    It still shows the same error.

    An error occured:

    WPSOLR: error on term 534 for taxonomy ‘manufacturer’: Invalid taxonomy.

    Posts excluded from the index:
    124038

    ******** DEBUG ACTIVATED – Beginning of new loop (batch size) *******

    ******** DEBUG ACTIVATED – Query documents from last post date *******

    Query:
    SELECT ID, post_modified, post_parent, post_type FROM wp_posts AS posts WHERE ((post_modified = ‘2018-04-20 11:59:55’ AND ID > 12289) OR (post_modified > ‘2018-04-20 11:59:55’)) AND ( post_status IN (‘publish’) AND ( post_type = ‘product’ ) ) AND ID NOT IN (124038) ORDER BY post_modified ASC, ID ASC LIMIT 1

    Last post date:
    2018-04-20 11:59:55

    I opened the post 12289 but the custom taxonomy manufacturer was empty there.

    wpsolr
    Keymaster
    5 years ago #10943

    Execute the SQL query to get the “ID” column, and edit the post.

    5 years ago #10945

    I tried running the following command but it says the syntax is not correct.

    SELECT ID, post_modified, post_parent, post_type FROM wp_posts AS posts WHERE ((post_modified = ‘2018-04-20 11:59:55’ AND ID > 12289) OR (post_modified > ‘2018-04-20 11:59:55’)) AND ( post_status IN (‘publish’) AND ( post_type = ‘product’ ) ) AND ID NOT IN (124038) ORDER BY post_modified ASC, ID ASC LIMIT 1

    Can you share the right syntax

    wpsolr
    Keymaster
    5 years ago #10946

    It is the right syntax, but the ‘ are to be replaced with simple quotes ‘ . Probably a copy/paste issue.

    I tested the query.

    5 years ago #10985

    I executed the query successfully, used the id to edit the product. There were no manufacturer attached to that post, I just updated the post and tried to run the index again but got the same error.

    Then I added a manufacturer to the same post and then resumed the indexing but got the same error again.

    wpsolr
    Keymaster
    5 years ago #10986

    Manufacturer is not a product attribute?

    5 years ago #10987

    No, It’s a custom Taxonomy registered using the following function

    /* WooCommerce custom taxanomy Manufacturer */
    add_action( ‘init’, ‘custom_taxonomy_Manufacturer’ );
    function custom_taxonomy_Manufacturer() {
    $labels = array(
    ‘name’ => ‘Manufacturer’,
    ‘singular_name’ => ‘Manufacturer’,
    ‘menu_name’ => ‘Manufacturers’,
    ‘all_items’ => ‘All Manufacturer’,
    ‘parent_item’ => ‘Parent Manufacturer’,
    ‘parent_item_colon’ => ‘Parent Manufacturer:’,
    ‘new_item_name’ => ‘New Manufacturer Name’,
    ‘add_new_item’ => ‘Add New Manufacturer’,
    ‘edit_item’ => ‘Edit Manufacturer’,
    ‘update_item’ => ‘Update Manufacturer’,
    ‘separate_items_with_commas’ => ‘Separate Manufacturer with commas’,
    ‘search_items’ => ‘Search Manufacturer’,
    ‘add_or_remove_items’ => ‘Add or remove Manufacturer’,
    ‘choose_from_most_used’ => ‘Choose from the most used Manufacturer’,
    );
    $args = array(
    ‘labels’ => $labels,
    ‘hierarchical’ => false,
    ‘public’ => true,
    ‘show_ui’ => true,
    ‘show_admin_column’ => true,
    ‘show_in_nav_menus’ => true,
    ‘show_tagcloud’ => true,
    );
    register_taxonomy( ‘Manufacturer’, ‘product’, $args );
    register_taxonomy_for_object_type( ‘Manufacturer’, ‘product’ );
    }

    wpsolr
    Keymaster
    5 years ago #10988

    Please open the product, and publish it.

    What is the notice message displayed by WPSOLR?

    5 years ago #10990

    ERROR by WPSOLR

    WPSOLR: error on term 534 for taxonomy ‘manufacturer’: Invalid taxonomy.

    The product is published already

    wpsolr
    Keymaster
    5 years ago #10991

    Now, in screen 2.2, uncheck the taxonomy ‘manufacturer’ in “Products” post types.

    Then publish your product again. What happens?

    5 years ago #10992

    Gives the same error for another custom taxonomy called drug_form

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

You must be logged in to reply to this topic.