Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ajax Search Errors!!
This topic contains 11 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 11 months ago.
- AuthorPosts
- September 14, 2020 at 11:19 pm #29360
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, 11 months ago by bravejanette58. Reason: Updated username and password
Attachments:
You must be logged in to view attached files.September 15, 2020 at 8:54 am #29365Hi,
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 :)
September 16, 2020 at 10:40 pm #29401Thanks 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.September 17, 2020 at 9:43 am #29409Hi,
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.
Best,
Once that is done, let me know which issues persist. Some of them should be resolved with the correct installation.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
September 17, 2020 at 5:12 pm #29423Hi 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?
September 18, 2020 at 11:50 am #29434Sounds 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 :)
September 18, 2020 at 2:51 pm #29440Please 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
September 18, 2020 at 3:03 pm #29441In 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 :)
September 18, 2020 at 7:01 pm #29449Yes, 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
September 19, 2020 at 9:53 am #29457The 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 :)
September 19, 2020 at 10:35 pm #29464OK 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.
Attachments:
You must be logged in to view attached files.September 21, 2020 at 9:41 am #29469All right! The issue was caused by a misconfiguration, this option was set to 500 instead of 50: https://i.imgur.com/gMcubpD.png
Best,
I corrected that, it should be okay now.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.