Ajax Search Errors!!

This topic contains 11 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years, 10 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #29360
    bravejanette58
    bravejanette58
    Participant

    1. The search is causing an error to appear across the site. It appears every time a product or the edit product page is opened on the backend.
    2. When I click <enter> or return button, without any items entered in search field, it returns 50 random products and says more results over 200, however, it does not display all results. I expected that clicking enter would display ALL results. Please advise.
    3. When I login as a customer (non-wholesale), they are able to view wholesale products via the search and these items are returned in the search. However, when they select the item, they do receive the error, “…do not have permission to view this product.” I would have thought that the products would not show at all based on user permissions.
    4. Search results page only shows 10 products per page. In my theme settings, I have it set to 50 products per page. When using the search, it does not show 50 products per page. I have tried changing limits in search settings, but this does not fix the problem. Please advise. This is very important because there are over 210 products on site and there will be 400 soon.
    5. The page results are not counting correctly. Although it says there are 35 products, there are more when you keep paging through. Search for “Gummies” to see this issue.
    6. There were no magnifier graphic loaded for the search. Each photo simply has a ? on it. When I tried to add magnifier, it does not show up. I should not have to find and load an image for a magnifier.

    • This topic was modified 3 years, 10 months ago by bravejanette58 bravejanette58. Reason: Updated username and password
    Attachments:
    You must be logged in to view attached files.
    #29365
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps us a lot.

    1. That means, that either the file is missing from the server, or there is a malfunctioning mod_rewrite rule in the .htaccess file, or a different misconfiguration in the permalink structure. If the file indeed exists, but is not reachable, then the most likely cause is a misconfiguration with the permalinks – the server probably tries to fetch a product/post or other page instead of the file, which is not correct.
    I recommend checking if the file exists first, if so, then checking the permalink configuration. If the does not exist, then reinstalling the plugin will help. If not, then you will have to check the permalink/mod_rewrite rules, unfortunately those are out of the scope of this plugin.

    2. Make sure to increase the results page limit to a higher number: https://i.imgur.com/kLdTfpJ.png

    3. This is a tough one, as WooCommerce does not have this restriction by default, I assume you have an additional plugin installed to restrict the access? If so, is there an API available for it? I’m asking, because the only way to resolve this for sure it by making a custom code – but for that I will have to know if the plugin has an API – namely a function that can check if the current user has access to a specific product by ID. Any other alternatives could help – like perhaps a meta based filter or taxonomy term based filter etc..

    4. Try changing this option to 50 as well: https://i.imgur.com/pY5pF4K.png
    The plugin tries to get the results count per page automatically, but if the theme uses a different value or there is a plugin affecting it, it is better to set it manually as well.

    5. This is probably because of the mismatching results per page count, related to issue 4. It is very likely going to be resolved with that.

    6. Do you mean on the results page, or somewhere else? The results page is controlled by the theme, the plugin cannot affect that. Let me know.

    7. It currently looks okay on my end: https://i.imgur.com/w84qM2u.png

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29401
    bravejanette58
    bravejanette58
    Participant

    Thanks for your help and this information.

    1) I’m not clear on what file you’re referring to. Do you meant the ,htaccess file? If that is the case, yes there is an .htaccess file on the server. Sorry but I have no idea what you mean when you say to check the permalink/mod… rules. Where do I do this and what should the rules be? Your plug in is the only one that has ever caused these issues upon installation. Please advise.

    2) OK updated the limit to 500.

    3. This is a tough one, as WooCommerce does not have this restriction by default, I assume you have an additional plugin installed to restrict the access? If so, is there an API available for it? I’m asking, because the only way to resolve this for sure it by making a custom code – but for that I will have to know if the plugin has an API – namely a function that can check if the current user has access to a specific product by ID. Any other alternatives could help – like perhaps a meta based filter or taxonomy term based filter etc..

    Regarding the above, wholesale customers are the only ones with permission to view specific products because they pay wholesale prices and are licensed to purchased the products. All other customers can view everything else. This could part of the Wholesale Suite package that allows various user roles.

    Please see attached screenshot regarding API option and let me know if that is what you’re seeking.

    4. I’ve updated the limit to 500. It is not pulling all results. However, please see attached screenshot where the results say “Showing 1-50 of 61 results” but it actually shows all products on the screen. Do you know why this would happen? No pagination option is even displayed.

    5. This is still not working as indicated in #4. The count seems to be off.

    6. I am not showing a magnifier because there are no magnifier icons listed within the plugin. I’m surprised these were not available. See attachment.

    Attachments:
    You must be logged in to view attached files.
    #29409
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1-6. I just checked via the wp-file-manager plugin, that the search was not correctly installed, the plugin directory is incorrect, it reads ajax-search-pro.zip instead of ajax-search-pro. Please completely delete the plugin and install it via the plugin manager, instead of FTP or other measures.
    Once that is done, let me know which issues persist. Some of them should be resolved with the correct installation.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29423
    bravejanette58
    bravejanette58
    Participant

    Hi Ernest – I reinstalled and the error message is gone! Thank you so much.

    What about the API issue causing customers to see wholesale products? Can you help with it?

    #29434
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Sounds great! Sure, but I still need some sort of a developer documentation to begin with.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29440
    bravejanette58
    bravejanette58
    Participant

    Please let me know what you need and I’m happy to provide it. This would be optimal if we could figure this out!

    Thanks,

    ~Janette

    #29441
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    In addition, are the magnifiing glasses visible now? It should be resolved as well, if the cause was the same as issue number 1.

    Well, do you know which plugins are those exactly (I mean their website or URL to the wordpress.org database)? Maybe I can find a documentation to them.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29449
    bravejanette58
    bravejanette58
    Participant

    Yes, actually the magnifying glasses are now visible and I’ve added one to the search bar. If you cannot check the search results functionality then I’ll hold off for now.

    Also, the numbering at the top is still inconsistent when search results return. I believe this may also have something to do with the permissions of what guests can view vs. wholesale customers. Sometimes it still counts all of the products that were displayed in your search list, however, those products are not shown on the screen.

    However, I wanted you to know that when I enabled the search statistics in order to “view previous search”, it does not capture previous search term when I press return. It only captures the term when I click on an item/product in the search results list. You may want to look into this functionality.

    I do appreciate all of your help. I think you have a pretty great plug in. It would be great if it recognized guests vs. wholesale customer roles.

    Thanks,

    ~Janette

    #29457
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    The search statistics is facing a major rework soon, the current state was designed to capture only live result requests. Using google analytics to track search queries is a great alternative – if you are using google analytics, then you can search for “google site search tracking”, there should be a tutorial available for WordPress as well.

    Well, do you know which plugins are those exactly (I mean their website or URL to the wordpress.org database)? Maybe I can find a documentation to them.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #29464
    bravejanette58
    bravejanette58
    Participant

    OK thanks. Don’t worry about the API issue. I’ve used another solution now. However, the numbering at the top is still inconsistent when search results return. I’m thinking that this is your search plugin causing this issue. Can you please check this? I believe this is the final issue I’m having with your plugin. Not sure if anything would cause this numbering issue. This is the link returned when I search for this item using your search bar. It says 50 of 61 however there are 57 products total on the page. See attached screenshot.

    https://highmaintenanceok.org/?post_type=product&s=slow+burn&asp_active=1&p_asid=3&p_asp_data=1&current_page_id=1479&woo_currency=USD&qtranslate_lang=0&filters_changed=0&filters_initial=1&asp_gen%5B%5D=title&asp_gen%5B%5D=content&asp_gen%5B%5D=excerpt&customset%5B%5D=post&customset%5B%5D=product&customset%5B%5D=product_variation&termset%5Bproduct_cat%5D%5B%5D=57&termset%5Bproduct_cat%5D%5B%5D=27&termset%5Bproduct_cat%5D%5B%5D=73&termset%5Bproduct_cat%5D%5B%5D=74&termset%5Bproduct_cat%5D%5B%5D=75&termset%5Bproduct_cat%5D%5B%5D=76&termset%5Bproduct_cat%5D%5B%5D=77&termset%5Bproduct_cat%5D%5B%5D=50&termset%5Bproduct_cat%5D%5B%5D=59&termset%5Bproduct_cat%5D%5B%5D=26&termset%5Bproduct_cat%5D%5B%5D=28&termset%5Bproduct_cat%5D%5B%5D=66&termset%5Bproduct_cat%5D%5B%5D=68&termset%5Bproduct_cat%5D%5B%5D=170&termset%5Bproduct_cat%5D%5B%5D=171&termset%5Bproduct_cat%5D%5B%5D=67&termset%5Bproduct_cat%5D%5B%5D=32&termset%5Bproduct_cat%5D%5B%5D=92&termset%5Bproduct_cat%5D%5B%5D=25&termset%5Bproduct_cat%5D%5B%5D=61&termset%5Bproduct_cat%5D%5B%5D=65&termset%5Bproduct_cat%5D%5B%5D=175&termset%5Bproduct_cat%5D%5B%5D=62&termset%5Bproduct_cat%5D%5B%5D=63&termset%5Bproduct_cat%5D%5B%5D=64&termset%5Bproduct_cat%5D%5B%5D=54&termset%5Bproduct_cat%5D%5B%5D=69&termset%5Bproduct_cat%5D%5B%5D=70&termset%5Bproduct_cat%5D%5B%5D=71&termset%5Bproduct_cat%5D%5B%5D=72&termset%5Bproduct_cat%5D%5B%5D=56&termset%5Bproduct_cat%5D%5B%5D=141&termset%5Bproduct_cat%5D%5B%5D=140&termset%5Bproduct_cat%5D%5B%5D=81&termset%5Bproduct_cat%5D%5B%5D=79&termset%5Bproduct_cat%5D%5B%5D=88&termset%5Bproduct_cat%5D%5B%5D=29&termset%5Bproduct_cat%5D%5B%5D=84&termset%5Bproduct_cat%5D%5B%5D=80&termset%5Bproduct_cat%5D%5B%5D=139&termset%5Bproduct_cat%5D%5B%5D=60&termset%5Bproduct_cat%5D%5B%5D=53&termset%5Bproduct_cat%5D%5B%5D=31&termset%5Bproduct_cat%5D%5B%5D=78&termset%5Bproduct_cat%5D%5B%5D=55&termset%5Bproduct_cat%5D%5B%5D=20

    Attachments:
    You must be logged in to view attached files.
    #29469
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    All right! The issue was caused by a misconfiguration, this option was set to 500 instead of 50: https://i.imgur.com/gMcubpD.png
    I corrected that, it should be okay now.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.