Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Is_visible error on search results page
- This topic has 11 replies, 2 voices, and was last updated 10 years, 1 month ago by
Ernest Marcinko.
-
AuthorPosts
-
April 24, 2016 at 4:28 pm #8448
Anonymous
InactiveWhen I turn on the option to replace the default wordpress search results page, I get a PHP error from my theme. It says Fatal Error, call to a member function is_visible on a non-object in content-product.php. I’ve tried resaving permalinks and disabling/enabling woocommerce based on what I saw other people suggesting but that didn’t seem to help. Any idea how I could resolve this? Thanks.
April 25, 2016 at 9:33 am #8468Ernest Marcinko
KeymasterHi Chris,
Unfortunately I have never seen this error message before. It might be related to your exact setup, but I’m not sure.
Does the error occur if you change your theme?Can you provide temporary log-in and FTP details to your test environment? I maybe able to locate and fix the issue directly in your theme, or at least find what’s causing it.
April 25, 2016 at 3:53 pm #8481Anonymous
InactiveOk, yeah. It looks like some kind of problem with my theme. I switched it to twenty-sixteen and the results appeared correctly. I’ve updated my ticket with login information – if you could take a look that would be awesome.
April 26, 2016 at 10:13 am #8491Ernest Marcinko
KeymasterHi!
Can you please check the FTP credentials? It appears that either the username or password is incorrect.
April 26, 2016 at 3:14 pm #8496Anonymous
InactiveYou cannot access this content.
April 28, 2016 at 11:38 am #8525Ernest Marcinko
KeymasterHi!
I’m still getting the same error. (username or pass incorrect) I’ve tried both user names to make sure I’m not mistaken. Can you please check again? Do I need to try a different port or is there something specific in configuration? (non passive mode, ftps, sftp etc..)
April 28, 2016 at 3:31 pm #8528Anonymous
InactiveAh, sorry about that too. I guess you have to login with the full domain for the user name. I’ve updated the form with the correct credentials and tested them with FireFTP.
I’m going to go buy that related posts plugin now too – I really appreciate all your help (plus I think it might be pretty nifty). Thanks again!
April 28, 2016 at 4:01 pm #8532Ernest Marcinko
KeymasterThanks!
I guess it should work now, but at the moment I get a 404 error when I try to reach your domain. Will check back a bit later, when it’s resolved 🙂
April 28, 2016 at 4:16 pm #8533Anonymous
InactiveYou cannot access this content.
April 28, 2016 at 4:26 pm #8534Ernest Marcinko
KeymasterOh the memories, I did the exact same thing a few times on my previous hosting providers. It’s so easy to mess it up.
Take your time, make sure everything is restored.
I think I have found out why the problem is happening. It’s going to be something with the fact that not only wordpress products are selected to look for, but also posts. When ajax search pro tries to pass the results to the theme, there are posts as well mixed with the product results, and I guess that post objects does not have that method, which the theme refers to, so it stops with an error.One quick solution is to turn off the Search in posts option on the General Options -> Sources panel. If you have everything back and running, can you please try that? If I’m correct and if that works, then I might not be able to give you a quick fix to make it work with both posts and products. I’ve noted this as a possible bug, and if it’s confirmed by you, I will fix it for the upcoming version properly.
April 28, 2016 at 7:25 pm #8535Anonymous
InactiveOk, I got everything up and running again finally.
I disabled the option to search in posts but that didn’t seem to change anything. (I also temporarily turned the redirect back off till you work on it again, so the customers don’t get an error message)
May 2, 2016 at 2:46 pm #8560Ernest Marcinko
KeymasterHi!
Sorry for the late response, I couldn’t wrap my head around the issue, but I found it. I was actually right, but I didn’t notice that on the General Options -> Sources 2 the product categories were selected to be returned as results.
Basically if anything besides products or variable products is passed to the results page, it will cause the error message to appear, it looks like.I’m going to have to implement some kind of filter to prevent passing other objects to the results page, if woocommerce is active and the destination is the woocommerce product results page.
I’ve left the override active and deselected the product categories. If you wish to search them, don’t forget to turn off the override options. I’m going to come up with a solution for the upcoming release, so after the next update it should work correctly.
-
AuthorPosts
- You must be logged in to reply to this topic.