Rebuilding wp_geodir_gd_places_detail

This topic contains 25 replies, has 4 voices, and was last updated by  Kiran 4 years, 5 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #516498

    Peter David Pedrick
    Full Member
    Post count: 23

    Hi,
    I stupidly DROPPED wp_geodir_gd_places_detail rather than TRUNCATE (was chatting away on the phone).

    I have a backup of the data but not a backup of the SQL table.

    I tried recreating the table by hand and also but reinstalling geodirectory. As I have other geodirectory plugins installed I was hoping there was a way to translate geodir_custom_fields etc to rebuild geodir_gd_places_detail.

    Is there anyone who can help?

    Thanks loads,

    #516500

    Alex Rollin
    Moderator
    Post count: 27815

    As far as I know you will need to restore from a backup.
    If the developers know another workaround they will post here.

    #516509

    Peter David Pedrick
    Full Member
    Post count: 23

    Thanks for responding Alex,

    As mentioned, there is no backup of the database tables, just the data that goes in the tables.

    Therefore, I need to rebuild the table or start again by recreating the table. The table doesn’t recreate (even with default settings) when I uninstall and install the geodirectory plugin.

    There also seems to be dependencies with wp_pages as well as the custom tables where these pages still work independently even without geodir_places_detail being present and so the plugin itself doesn’t seem to realise there’s an issue. So I’m a little stuck until I can reinstall / rebuild.

    Thanks for your help gents, I know it was a silly thing to do.

    #516713

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Peter,

    you should keep backup of database and files.
    there are many wp plugins available for backing up code and db.
    it is one among them – https://wordpress.org/plugins/updraftplus/

    step 1: take your db backup
    step 2: try below code once and then remove it.

    
    add_action('init',function (){
    	GeoDir_Admin_Install::install();
    });
    

    Thanks

    #516922

    Peter David Pedrick
    Full Member
    Post count: 23

    Thanks Naveen,

    Your points about backups are understood and we ‘did’ have them until they were deleted by a 3rd party without my knowledge… hence the massive error with all of this. I have put in steps to ensure this doesn’t happen again.

    Step 2: where must I put this code to run it?

    Thanks,
    Peter

    #516925

    Naveen Giri
    Moderator
    Post count: 1559

    You can use following instruction for adding custom code.

    https://wpgeodirectory.com/docs-v2/faq/customizing/#snippets

    the above code will generate table schema for you.
    step 3: import the data that you have for table content.

    Thanks

    #516935

    Peter David Pedrick
    Full Member
    Post count: 23

    Hi Naveen,
    Ran the code – it said it executed and geodir_places_detail was created. I then imported data and it went in to wp_posts but not in to geodir_places_detail.

    The result is that my WP admin site shows 1,054 records in the gs_places section but zero in the Dashboard and the website seems to have stopped working when previously it was just showing ‘No Records’ in the map area.

    Thanks,
    Peter

    #516955

    Peter David Pedrick
    Full Member
    Post count: 23

    Apologies, I should have been clearer – the WordPress admin is working, however, the public website is no longer showing.

    #516985

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Peter,

    can you share the csv file you importing in private reply?

    thanks

    #516986

    Peter David Pedrick
    Full Member
    Post count: 23
    This reply has been marked as private.
    #516990

    Peter David Pedrick
    Full Member
    Post count: 23
    This reply has been marked as private.
    #517024

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    I am not able to login to the site with those credentials. Please validate them and re-post.

    About the import, the CSV looks OK, but did you compare it to an export to create it? Make sure all the columns match. You can find more hints in our recommended process here:

    https://wpgeodirectory.com/docs-v2/geodirectory/settings/import-export/#recommended

    #517089

    Peter David Pedrick
    Full Member
    Post count: 23
    This reply has been marked as private.
    #517122

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #517533

    Peter David Pedrick
    Full Member
    Post count: 23
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 26 total)

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

Open Support Ticket