• Resolved mistercode

    (@mistercode)


    Hello!

    Thank you for this wonderful search plugin. I recently switched to your plugin from another plugin and it works great. The only problem I have is that searching by SKU doesn’t work if the SKU contains a dot. Let’s say my SKU is “245.563” and I want to search for it. In this case, the product is not found. If I remove the dot from the SKU, the search is successful.

    Am I doing something wrong, do I need to adjust something, or is this a bug that you can fix?

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • gwertul

    (@gwertul)

    I can replicate this bug.

    Kris

    (@c0nst)

    Hi @mistercode!

    I checked if this error occurs on a clean installation of WooCommerce + FiboSearch. However, I was unable to reproduce it. The product, to which I assigned SKU 245.563, appeared in the search results for the search phrase 245.563.

    Since FiboSearch free uses the native WordPress mechanism to search the database, some plugins or functions from the theme may be affecting its operation. To find out exactly what is causing this problem, I would suggest you disable each plugin one by one and check if the problem still happens after each deactivation. To make things easier, you can see what is attached to the pre_get_posts action. It is best to install the Query Monitor plugin and go to the search results page. In the wp-admin bar, open the plugin dashboard and go to the Hooks & Actions tab. Then, using the CTRL + F keys, search for “pre_get_posts”. You will then see what functions are attached to this action. You should then try deactivating these plugins or the function first and check if FiboSearch searches for the product correctly.

    Another cause of such an error may be an incorrect configuration of the DB_COLLATE constant in wp-config.php. By default, this value should be empty ('') or set to utf8_general_ci or utf8mb4_general_ci. If an unusual DB_COLLATE is set, e.g. something more restrictive, then the dots may be treated as different from each other or ignored.

    Best regards,
    Kris

    Thread Starter mistercode

    (@mistercode)

    Hello @c0nst . Thank you for taking the time to check and answer.

    Apparently I “accidentally” fixed the problem as it now works. But I don’t know why.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.