Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › url parameter is getting changed from ?s= to ?phrase= while implementing the plu
This topic contains 22 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years ago.
- AuthorPosts
- March 4, 2021 at 3:25 pm #31996
Hi Team,
We have implemented the AjaxSearchPro plugin in the below page of our website.
https://dev-www.motor.com/testpage/
After entering a text (e:g; seyfert) as input to the Search box when we press Enter. Then it is taking us to the page https://dev-www.motor.com/testpage/?phrase=seyfert#But actually as the WordPress default search works on Query string as “?s=” instead of “?phrase=”.
For example below Url uses default wordpress query string as “?s=” and it provides valid result.
https://dev-www.motor.com/?s=seyfertBecause of this roadblock we are not able to see the result delivered by plugin and thus we are stuck at further items such as result grouping etc.
Please let us know what can be done in order to fix the issue.
thanks
JyotiranjanMarch 4, 2021 at 3:34 pm #31997Hi,
Thank you for the details! Unfortunately the URL does not seem to work, I am getting the a timeout error: https://i.imgur.com/SSa0op9.png
The issue you described happens, when there is a fatal javascript error on the page caused by something, and the plugin can not properly initialize. I would try to look on the given URL on the javscript error console, but it does not open unfortunately.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 5, 2021 at 9:16 pm #32056Hi Ernest,
The url https://dev-www.motor.com is actually a dev environment and thus cannot be accessible by internet.
I checked the console for any javascript conflict, I could not find any fatal javascript error. However I did found a javascript error for one of the file related to another plugin called Optinmonster (see attached screenshot)
Can you suggest something to check if the plugin works fine in any given page?Thanks
JyotiranjanAttachments:
You must be logged in to view attached files.March 6, 2021 at 8:24 am #32058That is actually a fatal error right there, and very likely the cause of the issue. Try turning off that plugin temporarily, it should resolve the problem alltogether. If that plugin as some sort of a javascript minification feature, that might be the misconfigured component causing the problem.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 8, 2021 at 2:11 pm #32080Hi Ernest,
I tried both re-installing the Ajaxpro plugin and also disabling the OptinMonster plugin. Both yielded 0no result (see attached screenshot) https://imgur.com/a/sLXeQON
If I can provide screenshare then is there any way where you can guide on the same.
Thanks in advance
JyotiranjanMarch 8, 2021 at 2:45 pm #32081Well, without access this is going to be very hard. Unfortunately screenshare is not an option for us.
Try the following:
Best,
– Make sure there is no duplicate of jQuery loaded. If you are using a customized theme, we have seen custom jQuery loaded to the site footer. This causes the previously loaded scripts to unload. Removing the duplication helps.
– Make sure that the wp_footer() call is present in the footer.php file in the theme directory. Custom themes or child themes tend to miss that and the scripts can not load.
– You can also try this option. If it helps, then the wp_footer() call is probably missing from the theme.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 9, 2021 at 6:14 pm #32091Hi Ernest,
We tried with the above suggestions on a) check for duplicate jquery and b)presence of wp_footer() in footer.php.
However we found out that the below files are not being loaded on the pages, which is resulting in non-initialization of the ajax instance in the page where the Search Box is placed.
<script type=’text/javascript’ src=’http://<server name>/wp-content/plugins/ajax-search-pro/js/min/jquery.ajaxsearchpro-sb.min.js?ver=IDdZ0m’ id=’wd-asp-ajaxsearchpro-js’></script>
<script type=’text/javascript’ id=’wd-asp-ajaxsearchpro-js-extra’>
/* <![CDATA[ */
var ASP = {“ajaxurl”:”ht ……”}We tried with multiple options available in “Compatibility Settings” section, but didnt help. Çan you guide us on what circumstances the above files can be ignored to be called?
Thanks
JyotiranjanMarch 10, 2021 at 9:43 am #32100Hi,
It can either happen if you have the selective asset loading enabled. If not that, then either the wp_header() of the wp_footer() calls are completely missing from the theme header and footer files. Or there is another plugin or a custom code dequeueing the assets.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2021 at 1:00 pm #32108Hi,
In the location wp-content / themes / <themename>/, I checked 3 files i:e; functions.php, header.php and footer.php.
I could find wp_footer() in footer.php, but I could not find wp_header() in header.php. Could this be the reason and how to fix this?
Thanks
JyotiranjanMarch 10, 2021 at 1:06 pm #32109You may have to consult with the theme developer about that. wp_head() could be added there via inclusions as well, but he will definitely know if it’s there and if not, then what to do.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2021 at 1:17 pm #32110Hi,
Also my colleague found out that there are multiple Exits that could result in non initialization of the plugin funtionality. Can you clarify on this as well?
Thanks
JyotiranjanAttachments:
You must be logged in to view attached files.March 10, 2021 at 1:21 pm #32112Can you please explain what the problem is with that code? It is only the handler of the selective asset loading, it has no effect when that feature is disabled. Let me know if you find anything problematic there.
-
This reply was modified 2 years ago by
Ernest Marcinko.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2021 at 2:39 pm #32118One other thing popped into my mind, make sure that the wp-hooks script is not dequeued. It should be enqueued automatically, unless something else is forcefully dequeueing it. Use this to force the enqueue:
Best,wp_enqueue_script( 'wp-hooks' );
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 10, 2021 at 8:22 pm #32120Hi Ernest,
Can you provide some guidance on how and in which file I need to add the code to force the enqueue – wp_enqueue_script( ‘wp-hooks’ );
Thanks
JyotiranjanMarch 11, 2021 at 8:12 am #32123Sure 🙂 Try the functions.php file in your theme directory, that should work.
You can check if it is included, if you try searching in the frontend source code for this:
wp-includes/js/dist/hooks.min.js
If the code work, then this file should be present somewhere.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This reply was modified 2 years ago by
- AuthorPosts
You must be logged in to reply to this topic.