Index Problem, error details failed to parse field

  • ukatr
    Participant
    3 years, 4 months ago #22883

    Hi, When I try to update the index I get this error failed to parse field [categories] of type [text]
    error log: PHP Notice: Array to string conversion in /public_html/wp-content/plugins/wpsolr-pro/wpsolr/core/classes/models/post/class-wpsolr-model-post.php on line 402
    WPSOLR PRO 22.0
    WordPress 5.5.3
    WooCommerce 4.7.1
    PHP 7.4.11

    wpsolr
    Keymaster
    3 years, 4 months ago #22885

    When indexing, activate the debug checkbox and set the batch size to 1. When it fails, click on index once more, to only get the debug infos of the failing ID. Check the debug details, especially the content of the ‘categories’ field.

    ukatr
    Participant
    3 years, 4 months ago #22886

    I did what you said, here’s the log ; https://pastebin.com/byStQEee

    wpsolr
    Keymaster
    3 years, 4 months ago #22887

    Thanks.

    This post contains a category with an object, rather than a string. Which causes the error.

    "categories": [ ..., { "name": "pa_yazar", ... }]

    ukatr
    Participant
    3 years, 4 months ago #22888

    This product only belongs to one main category and one subcategory.
    I don’t understand what to do, can you review the product? https://pastebin.com/nkyPkKU6

    wpsolr
    Keymaster
    3 years, 4 months ago #22889

    Do you know what is:
    { “name”: “Cilt Durumu”, “value”: “Ciltli”, “position”: “5”, “is_visible”: “1”, “is_variation”: “0”, “is_taxonomy”: “0” }
    It could be a custom field that contains object values instead of a string.

    ukatr
    Participant
    3 years, 4 months ago #22890

    Yes, this is just a product attribute name and value. All products have this product attribute.

    wpsolr
    Keymaster
    3 years, 4 months ago #22892

    This kind of content is not supported. You can just deselect it in screen 2.2 and reindex.

    ukatr
    Participant
    3 years, 4 months ago #22893

    This 2.2 screen : https://prntscr.com/vxgx47
    please tell me what to do

    wpsolr
    Keymaster
    3 years, 4 months ago #22894

    Uncheck the pa_yazar taxonomy on screen 2.2 (I can see it twice).

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.