Admin approve listing and share location question.

This topic contains 18 replies, has 5 voices, and was last updated by  Paolo 8 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #12929

    neilrobb
    Free User
    Post count: 7

    Is it possible to configure GeoDirectory so that all new listings created need to be approved by the administrator? Also for share location, when I activate it I continuously get 404 errors, why is this? Ideally I would like the map to show listings that are nearby to the users current location, so it would not be stored as a session and also on mobile show the places as list view, how plausible is this?

    #12936

    Guust
    Moderator
    Post count: 29970

    To configure GeoDirectory so that all new listings created need to be approved by the administrator:
    GD > design > listings > New listing default status > set to draft

    For your other problem, I would like to have a look at your WP admin, can you post your login details in a private message please.

    #13861

    neilrobb
    Free User
    Post count: 7
    This reply has been marked as private.
    #13935

    Guust
    Moderator
    Post count: 29970

    Hi Neil(?)
    You must be using some plugin that modifies the WP media settings.
    For GeoDirectory to work correctly, you should organise your uploads into month- and year-based folders, see more at
    http://docs.wpgeodirectory.com/basic-installation/#media

    Also, GD is not 100% MultiSite compatible yet, that is being worked on for the moment.

    #14858

    neilrobb
    Free User
    Post count: 7

    Hi, it’s a dev account as I had it on hand.

    I think the issue with images may be either GeoDirectory or the file path, with inspect element I get this error after attempting to upload an image:

    Uncaught ReferenceError: loc is not defined

    Attempting to fix this at the moment but no luck yet.

    #14981

    neilrobb
    Free User
    Post count: 7

    I think this is an issue with plupload, it says loc is not defined so I’m assuming that loc is where the images are to be stored? How do I go about fixing this without correcting the code myself as an update will rewrite it.

    #14984

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I can’t visit your back end. I get this error:

    
    
    
    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method sidebar_generator::init() should not be called statically in /home/caferoo1/public_html/hub/wp-includes/plugin.php on line 505 Strict Standards: Non-static method sidebar_generator::get_sidebars() should not be called statically in /home/caferoo1/public_html/hub/wp-content/themes/creativo/functions/plugin/multiple_sidebars.php on line 52 Warning: Cannot modify header information - headers already sent by (output started at /home/caferoo1/public_html/hub/wp-includes/plugin.php:505) in /home/caferoo1/public_html/hub/wp-includes/pluggable.php on line 1173 

    The geodirectory warning is easy to fix, just add

    error_reporting(E_ERROR);

    to your functions.php file.

    BTW Is that a multisite install?

    #14996

    neilrobb
    Free User
    Post count: 7

    That should be fixed now, I had debug enabled in wp-config. It was a multisite until I removed it. I’ll try adding that code shortly.

    #15008

    neilrobb
    Free User
    Post count: 7

    If you can have a look it would be greatly appreciated. I can upload images fine through the media page and it’s simply through GeoDirectory that the error occurs.

    #15086

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    unfortunately I’m not able to find the solution, but I suspect the problem comes from the server setup.

    Particularly the dashboard being under https and the front end under http.

    When uploading a new image, the script should save the image in a temp location with ajax before saving it in the upload folder once the listing is saved after the preview page.

    The ajax call should return the temp URL for the image as answer.

    In your front end it returns -1, that’s why the script return the error no loc.

    What is strange, is that it works in the back end (Place attachements) as expected.

    That’s why I think the http/https configuration could be the issue.

    I have to ask to Stiofan to have a deeper look at it.

    We will let you know asap.

    Thx

    #15329

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This is a strange one, i would need FTP to debug this properly step by step.
    I originally thought it was the https thing but other ajax on the page is working fine over https so i will need to dig further. Please provide FTP access.

    Thanks,

    Stiofan

    #15372

    neilrobb
    Free User
    Post count: 7
    This reply has been marked as private.
    #15485

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Thanks for the details,

    This was because your admin is using https and front end is not, so we do a check on the file upload to check it comes from your own site, if they are over different https then the check fails ( it’s a wordpress function)

    I have added the following code to make sure the ajax url for the upload uses the same http/s structure as the backend

    // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls

    
    
    		if(str_replace("https","http",admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])){
    		$ajax_url =	 admin_url('admin-ajax.php');
    		}elseif(!str_replace("https","http",admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])){
    		$ajax_url =	 admin_url('admin-ajax.php');	
    		}elseif(str_replace("https","http",admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])){
    		$ajax_url =	 str_replace("https","http",admin_url('admin-ajax.php'));	
    		}elseif(!str_replace("https","http",admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])){
    		$ajax_url =	 str_replace("http","https",admin_url('admin-ajax.php'));	
    		}

    I have added this fix to your site and file upload now works.

    Thanks,

    Stiofan

    #15999

    neilrobb
    Free User
    Post count: 7

    Hi, thanks for the fix however now when I click my listings/places I get an author 404 error, so users can’t edit their listings.

    #16020

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Neil,

    Please try now, the problem was you had the permalinks prefixed with “/local-business/%postname%/” and then you also had the category prefixed with local-business with wordpress this will always lead to strange problems, i have changed your permalink to just postname, you can set it how u like as long as you don’t prefix anything the same.

    Thanks,

    Stiofan

Viewing 15 posts - 1 through 15 (of 19 total)

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

Open Support Ticket