Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Is_visible error on search results page
This topic contains 11 replies, has 2 voices, and was last updated by Ernest Marcinko 8 years, 4 months ago.
- AuthorPosts
- April 24, 2016 at 4:28 pm #8448
AnonymousWhen 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 #8468Hi 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.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 25, 2016 at 3:53 pm #8481
AnonymousOk, 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 #8491Hi!
Can you please check the FTP credentials? It appears that either the username or password is incorrect.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 26, 2016 at 3:14 pm #8496
AnonymousYou cannot access this content.April 28, 2016 at 11:38 am #8525Hi!
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..)
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 28, 2016 at 3:31 pm #8528
AnonymousAh, 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 #8532Thanks!
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 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 28, 2016 at 4:16 pm #8533
AnonymousYou cannot access this content.April 28, 2016 at 4:26 pm #8534Oh 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.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 28, 2016 at 7:25 pm #8535
AnonymousOk, 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 #8560Hi!
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.
Best,
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.