Post will be deleted if both city and map marker position has been changed

This topic contains 7 replies, has 3 voices, and was last updated by  Paolo 10 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #5755

    robertchittock
    Free User
    Post count: 19

    Hi Guys

    I wish to update the locations but not to delete any posts.

    Please can you advise where the delete query is so I can comment it out?

    (I have imported 1000 locations in SQL and need to update the maps for each, but when I click update then it removes any posts associated with that location.)

    Thanks

    Rob

    #5820

    Paolo
    Site Admin
    Post count: 31206

    hi Rob,

    I need to refer this to Vikas, I’m really not sure about this…

    Thanks for your patience.

    #5866

    Vikas
    Full Member
    Post count: 1128

    Hi,

    There is a logic behind it. Lets say u have 5 listing for the city LA at different address in LA
    So their address would be:
    Sr No. Country Region City Address Lat Lon
    1 USA California LA Address1 Lat1 Lon1
    2. USA California LA Address2 Lat2 Lon2
    3. USA California LA Address2 Lat3 Lon3
    and so on ….
    Now If u update LA city in back end and change it to something else then having these listing in database will not make any sense because markers of these listing on map will appear based on Lat/Lon.

    Please advise ?

    #5943

    robertchittock
    Free User
    Post count: 19

    Hi Vikas

    Yes the logic does seem correct for that user story, however my user story is a little different. I do believe that if you update a location, as the database is relational, any posts pointing to that location should have their locations updated, rather than the posts being deleted, but that is for another day!

    I just need to comment out the line that does the database as I have imported all my locations, but need to update the map so the locations have the lat lon correctly, otherwise all my maps are blue.

    I will uncomment it once done.

    Thanks

    Rob

    #5963

    robertchittock
    Free User
    Post count: 19

    Typo: I just need to comment out the line that does the delete*

    #6069

    Vikas
    Full Member
    Post count: 1128

    Try to find this ‘wp_delete_post($postid);’ line of code in location_manager adons/geodir_location_functions.php and comment this. It should be around line number 750.

    Please advise ?

    #6155

    robertchittock
    Free User
    Post count: 19

    Hi Vikas

    Many thanks and I have now disabled all deleting of posts as required.

    Thanks

    Rob

    #6161

    Paolo
    Site Admin
    Post count: 31206

    excellent!

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount