Problems with new version of Inport – Export

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

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

Open Support Ticket

Tagged: , ,

  • Author
    Posts
  • #56538

    giacomo
    Expired Member
    Post count: 235

    Hi all,

    i’m perplexed about the new add about the import – export solution you’ve implemented with the last version 1.5.3…

    https://wpgeodirectory.com/change-logs/

    I’m going to explain it step by step writing down the following VERY SIMPLE use case:
    -> An admin wants to backup (export) a database (listings information) and wants to import it:

    STEP 1 -> Admin imports Listing “A” in English
    STEP 2 -> Geodirectory gives Listing “A” an ID (example: 100)
    STEP 3 -> Admin imports Listin “B” in Italian using in the tag “Original ID” the ID that Geodirectory gave to Listing “A”
    STEP 4 -> Geodirectory gives Listing “B” an ID (example: 200) and B is considered a traduction of A
    STEP 5 -> Admin extract the listing csv file: He will find 2 listings: “A” (id 100) and “B” (id 200 + original_id 100)
    STEP 6 -> Admin clars All the listings on the site
    STEP 7 -> Admin import the csv file (only the english)
    STEP 8 -> ALSO IF the “POST_ID” tag is full (Listing A has in the .csv file the ID 100), Geodirectory gives a NEW ID to the Listing (example 300) making impossible to let the platform know that the B listing is a traduction of the A listing.

    Please, i beg you, when you perform new version of GeoDirectory please write down an Use Case making that uppdate useful… otherwise you (and i) work a lot for a frustrating non-result.

    Thanks for your job

    M

    #56542

    Guust
    Moderator
    Post count: 29970

    At step 8, did you tick “Update listing if post with post_id already exists.” when importing the updated post with ID 100, and did you add “100” in the column “post_id” of the CSV?

    I just tested it and it works as expected.
    If you do not use the post_id, then the system cannot know you are updating an existing listing and it will think it is a new one, so it will give a new ID.

    I hope I understood your question correctly.

    #56543

    giacomo
    Expired Member
    Post count: 235

    i have flagged “Update listing if post with post_id already exists.”

    POST_ID is full (ex: is write down 100 in the tag).
    But there is no id 100 already present in the db…
    the listings are cleared and the db is empty.
    I would like to insert a new listing with an ID i choose (that is linked in the db for the other Traducted listings) and not with an ID given automatically by GD.

    i hope i explained it well

    #56545

    Guust
    Moderator
    Post count: 29970

    Clearing a listing does not delete the post ID. You can use a Post ID only once, that is how WordPress works (unless you work direct in the database – not recommended).
    If you want to use the same ID in the future, you should not delete but overwrite.

    You can always create the new listing (id 300), export, and change the original_post_id which were 100 to 300, so the translated posts know where they belong. Then re-import the translations again and they will attach to post ID 300.

    #56550

    giacomo
    Expired Member
    Post count: 235

    i think i don’t understand that… i have tried it now:

    i have created a new listing: AAA-TRY… gd gives the id->25437
    i have extracted that csv file
    i have cleared the listing from backend
    i have imported the csv file extracted before (the one with AAA-TRY with id->25437)
    GD created a new listing AAA-TRY with ID->25438

    tried that 5 minutes ago with all the last version and update installed

    #56563

    Guust
    Moderator
    Post count: 29970

    DO NOT CLEAR the listing from the backend, if you do want to use the same ID in the future. Just re-import using the same ID and it will use the same ID if you ask it too.
    Again: do NOT trash or delete or clear the existing listing. Just leave it.

    If you clear the listing, you clear the ID and it can NOT be used again.

    #56572

    giacomo
    Expired Member
    Post count: 235

    so if i want to use the same exported database in another geodirectory site i will not have the linked translation listings… ???

    #56584

    Guust
    Moderator
    Post count: 29970

    That’s right. You will need to import first, and then export to find the new numbers of the original listings, and adjust the original IDs of the translated listings.

    Unless you clone the database.

    #56609

    Paolo
    Site Admin
    Post count: 31206

    Adding this Just to make sure it is clear:

    1) Import of listings in a empty database can only be made without IDs. The system must add his own IDs to be able to work correctly (this is not just WordPress, this is true for all database)

    2) Import listings with IDs can only update existing listings.

    3) To copy a WPML database from one website to another keeping identical IDs the solution is cloning the database or its tables, not using import/export

    Thanks

    #56712

    giacomo
    Expired Member
    Post count: 235

    ok, that respond my question, but i would like to notice that with this method if a person has a database with translations inserted one by one in a geodirectory site “A” he can’t copy that in a geodirectory site “B”.

    Thanks

    #56731

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    yes he can, but not using the import export tool.

    It can be done by cloning the entire database as Guust said.

    Thanks

Viewing 11 posts - 1 through 11 (of 11 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