Warning on Listings Page

This topic contains 9 replies, has 3 voices, and was last updated by  Giri 6 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #385793

    Nigel Stephens
    Expired Member
    Post count: 59

    Hello,

    I have set up Geodirecotry and some of the Addons on a staging copy of my site and have come across a few issues that I was hoping you could help me with:

    1) Warning on Listings Page

    The following warning appears on all listing pages:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘geodir_cpt_pt_desc’ not found or invalid function name in /home/linkedfi/staging/1/wp-includes/class-wp-hook.php on line 298

    Do you know what could be causing this? My web developer may be able to fix it if you can give detailed instructions on what is required.

    2) Unable to Upload Images
    I am unable to upload any images into my listings. When I select the files that I want to add, it just comes up with a red box saying HTTP Error. I saw someone else had a similar problem and it was related to her staging site. Is this a common problem with staging sites and will I be able to upload images when I put geodirectory on to my live site?

    3) When I am viewing the details page of a particular listing and then click on a particular category link from within the page, it correctly takes me to the listings page of that category but for exactly the same location. Is there a setting to make it so that when you click on the category, it shows all listings in that category. Or if it does need to use the location, maybe show all the listings in the country and not just the town. Hope that makes sense! Let me know if you need more details.

    Your help would be much appreciated. I will send you access to my staging site in a private message in case you would to take a closer look.

    Thank you!

    #385794

    Nigel Stephens
    Expired Member
    Post count: 59
    This reply has been marked as private.
    #385836

    Paolo
    Site Admin
    Post count: 31206

    Hi Nigel,

    I flagged your topic for a developer and I’ll try to answer to a portion of your questions

    1) That’s just a notice and will not prevent the app from working. For the moment you should turn off debug: https://wpgeodirectory.com/docs/faqs/help-i-get-a-php-warning-on-my-pages/

    The developer will fix what’s causing the notice in the next version

    2) Most of the time the problem is a server configuration and it can be fixed on both staging and live servers. It shouldn’t happen. The developers will let you know how to proceed for this one.

    3) I’m not sure this can be done. Maybe there is a hook, the developers will let you know.

    Thanks for your patience,

    #386904

    Nigel Stephens
    Expired Member
    Post count: 59

    Hi Paolo,

    I just wanted to update you on the above.

    1) I added the code to the functions.php and it removed the error message. Thanks for pointing me in the right direction.

    2) I have put Geodirecotry on my live site now and the images upload fine so looks like it was a staging problem.

    3) Haven’t heard anything about this yet but I expect the developers are busy on more pressing things!

    Thanks for your help.

    #386943

    Paolo
    Site Admin
    Post count: 31206

    Hi Nigel,

    glad to here that 2 out of 3 are solved.

    It’s my fault, I thought I had flagged it for the developers but I didn’t.

    I’ve made sure it’s done now and they’ll get back to you asap.

    Sorry about that!

    Thanks for your patience,

    #386948

    Giri
    Expired Member
    Post count: 3155

    Hi there,

    can you try this code for #3 ?

    remove_filter('term_link', 'geodir_get_term_link', 10 );
    #387834

    Nigel Stephens
    Expired Member
    Post count: 59

    Hi Giri,

    Thank you for your reply and sorry it has taken a while for me to get back to you.

    Where would I add that? I tried in the functions.php on my staging site and I got locked out of the site with this code:

    Fatal error: Can’t use function return value in write context in /home/linkedfi/staging/1/wp-content/themes/boss-child/functions.php on line 183

    I’m not an expert on this kind of thing so I might have to pass it on to my developer.

    Thanks.

    #387835

    Giri
    Expired Member
    Post count: 3155

    Create a code snippet using this plugin.

    https://wordpress.org/plugins/code-snippets/

    Make sure to activate the snippet.

    Thanks

    #390364

    Nigel Stephens
    Expired Member
    Post count: 59

    Hi Giri,

    Sorry again for the delay. I installed the code snippet plugin on my staging site but when I put the code into it and try to activate it it says:

    The snippet has been deactivated due to an error on line 1:
    syntax error, unexpected end of file

    No problem if you are having problems with this request. I will ask my developer about it to see if I’m doing something wrong.

    On the plus side, the plugin you recommended is really useful. I haven’t been able to use any modifications from the Geodirectory forums previously as I’m not confident adding code but this makes it a lot easier…thanks!

    #390369

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

    Just make sure you are using the correct quotes when copy paste from our forums.

    Let me know if your developer can’t figure it out.

    Thanks

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket