Is_visible error on search results page

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

 
Keymaster
5 years, 8 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #8448

    Inactive

    When 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.

    #8468

    Hi 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 :)


    #8481

    Inactive

    Ok, 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.

    #8491

    Hi!

    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 :)


    #8496

    Inactive
    You cannot access this content.
    #8525

    Hi!

    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 :)


    #8528

    Inactive

    Ah, 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!

    #8532

    Thanks!

    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 :)


    #8533

    Inactive
    You cannot access this content.
    #8534

    Oh 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 :)


    #8535

    Inactive

    Ok, 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)

    #8560

    Hi!

    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 :)


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

You must be logged in to reply to this topic.