Importing Places deletes my homepage and makes one of the listings my home page

This topic contains 22 replies, has 4 voices, and was last updated by  BJ Bowen 6 years, 10 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #386114

    BJ Bowen
    Full Member
    Post count: 73

    Background: I redesigned a site for a client. You can view that site here: dev1.foundation96.com.

    During the redesign, the live site (foundation96.com) has had more users and places added. And, the client has deleted some users and places.

    So, now that the design is finished, the sites don’t match up. (obviously haha)

    For upgrades to the site in the past, this is what I’ve done:
    1. Turn off user notifications.
    2. Copy database tables of users to the dev database
    3. In the WP admin, GeoDirectory, export the places from the live site
    4. In WP admin, GeoDirectory, import the exported places file.

    When I import the places, my Home (front page) disappears and somehow a geodirectory listing becomes the home page.

    I have done this many times and never had an issue like this. Do you have any insight as to why this might be happening and what I can do to solve the problem?

    Thank you so much for all of your hard work on this plugin… It is a wonderful piece of work. Looking forward to resolving this.

    #386116

    Guust
    Moderator
    Post count: 29970

    I would think that is some slug or permalink conflict. Try giving that listing a different slug.
    Let us know how you went, and if no luck, post admin details for the live site in a private reply and we will have a look.
    Thanks

    #386155

    BJ Bowen
    Full Member
    Post count: 73

    hey… yes, the import rewrote a whole lot of slugs. We began the redesign in April.

    -We cloned the site (as usual — no problems.)
    -We redesigned the site in the development area.
    – Users were still adding and editing content on the live site.

    SLUGS:
    You’re right. The problem was with the slugs.

    I exported Places from the live site and imported that file into the dev site. Almost all of the listings that were added from April through July had very strange slugs. Also, some site pages (the home page!! and several others) were deleted and those deleted page slugs were assigned to various, seemingly random places. :-0

    IMAGES:
    Most of the images of the messed up places were being requested from the uploads July folder, not the folder that the image actually resides. (ex: New site colled: http://deryk.foundation96.com/wp-content/uploads/2017/07/3734_Jarrah-headshot-2016.jpg BUT OLD site: http://dev2.foundation96.com/wp-content/uploads/2017/05/3734_Jarrah-headshot-2016.jpg) So, I moved the images from their original folder to the July folder and now they appear. (Again, all of these image problems were from April to July.)

    MENUS:
    Menus (Secondary, Main, Footers) were messed up as well. I had to recreate menus in every section — I guess because those pages were deleted, the menus also deleted the links??

    I fixed all of this manually, but please find why this happened and let me know when it is fixed. We have a lot more upgrades planned to do to this site, and I can’t spend two days working for free the next time we push an upgrade live. I can’t charge my client for all of this time, she’d kill me.

    Not sure what else I’ll find… I’m still testing.

    #386165

    Guust
    Moderator
    Post count: 29970

    If you export listings from a live site, they all will have different IDs now.
    So the only way to re-import them to the live site, is to create duplicates.
    That will create new listings, and the system will create new slugs for them, that is how WP works.

    If you just update one database table, that does not create the necessary connections required in the database between the tables. That needs to be done by adding users or listings from the site.

    Importing listings does not import the images, it imports the URL of the image, in your case that would be referring to the date the listing was added on the live site, and the URL would refer to the live site, not the dev site.

    If pages are deleted, they indeed disappear from the menus, unless you added them as custom links, in which case you would get dead links.

    There is really nothing for us to fix, it is the way you are doing it.
    I am not sure what dev work you are doing, but the best way is to leave the live site alone, test the changes on the dev site, and then manually do the same stuff at the live site.
    It will be safe to FTP files of new plugins etc between them, but the database is best left alone.

    #386273

    BJ Bowen
    Full Member
    Post count: 73

    hmmm… I disagree. If I import Places from one site to another site, it SHOULD NOT delete the site pages and assign those page slugs to various Places.

    It was a complete site redesign. The only things that needed to be imported from the old (live) site was new Users and Places since April. It makes NO sense to have to take the live site down and make all of those changes –weeks worth of work.

    As I said, I’ve done this many times with no problem. 1. Make changes to the site in Dev area 2. Get approval from client 3. Import new users and places to dev site 4. push the entire dev site to the live URL.

    This is day 3 fixing broken crap and I still cannot push the dev site to the live URL because so many things broke this time. The breaks did not occur when importing the Users. But, as soon as I imported the Places (through the WP Admin Geodirectory Import function– not with the database), many, many, many things broke.

    Something is wrong. This is nothing that I’m doing.

    About the Image URL — you must have misunderstood. The imported Place brings the correct domain name, but references the wrong uploads folder. Instead of 2017/05/3734_Jarrah-headshot-2016.jpg (where the file is actually stored), the imported listing references 2017/07/3734_Jarrah-headshot-2016.jpg — where the file is NOT stored.

    I’m going to say this again… I’ve never had this happen before and we’ve been through this process with this site multiple times.

    Perhaps re-read what I wrote. I’m not exporting from a live site and then re-importing them to the same live site.

    1. Clone the live site to development/staging area
    2. In the dev environment, make changes to the site that do not affect the GeoDirectory listings (new homepage, new pages, new menus, new forms)
    3. Approval from Client.
    4. Import new users that have been added since the development began (April)
    5. Import new Places that have been added since the development began (April)
    6. Test site.
    7. Push the development site to the live URL and Boom! you have an upadated site!

    This is how it’s done. Do you understand now?

    #386404

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I guess you are importing with ID’s and setting to update?
    “Update listing if post with post_id already exists.”
    instead of
    “Ignore listing if post with post_id already exists.”

    The new listings on the site will share the same ID as the dev new PAGES and will break things like this.

    Please check and let me know if you have any further problems.

    Thanks,

    Stiofan

    #386405

    Paolo
    Site Admin
    Post count: 31206

    When you import it is the system to tell you where to upload the images.

    If you import in July it will tell you to add them in 2017/07, not 05. Looks like this wasn’t clear too.

    Just FYI,

    Thanks

    #386867

    BJ Bowen
    Full Member
    Post count: 73

    ok. So, for images I need to find all of the images that were uploaded after the exact time I cloned the site and move those to the folder it told me to move them to. (Cumbersome process, but okay.)

    Page IDs… Okay, so for us designers and developers, this is a serious problem. Is there any way the import can be based solely on slugs so that it doesn’t overwrite new content. Yes, I chose to Update pages with existing slugs because Users had updated their listings. If I had chosen to not update the listings with existing IDs, then I would have lost all changes that Users had made to their listings.

    However, if the import could be based on page slugs, then it wouldn’t overwrite other pages and posts that are created in the development area.

    I thought a Places import would only overwrite existing Places. And, it would be a better process if this were the case.

    Our next steps involve adding a webinar section to the site and we’ll have to go through this process again. We will clone the site over to a dev environment, build out the new section, and then merge the Users and Places that have been added since development began and then push that site live.

    Before we do that, I need to make sure that the process doesn’t destroy pages and posts when I import the places.

    Again, this plugin is fantastic in so many ways and I know a lot of thought and hard work went into making it. Is there any way you can change the import process so that it does not overwrite any content other than Places? Whether it’s by page slugs or some other way?

    Thank you for your time and attention. I truly do appreciate it.

    #386873

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you know when you last cloned the site you can export all before that date and import those as overwriting, then do another export after that date and tell it to ignore ID’s this will add the new listings with new ID’s.

    Stiofan

    #386875

    BJ Bowen
    Full Member
    Post count: 73

    Using the import function, one cannot specify a time and date for the import.

    Think about the import process a little more… I know there is a solution and I have faith that all of you can find it. Other plugins do it without overwriting existing content… so the answer is out there. You can do it!

    #386876

    BJ Bowen
    Full Member
    Post count: 73

    sorry… I meant to say “using the export function”…

    #386878

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You can export by date, see attached.

    Stiofan

    #386885

    BJ Bowen
    Full Member
    Post count: 73

    I know you can export by date, but not by time. This is a global site. In order to not overwrite, the exact time will be necessary. It would be better for everyone involved, if the export/import didn’t overwrite IDs.

    Please see if you can find out how other plugins do this without overwriting. It is possible. Thank you.

    #386908

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    No one have ever requested this and i know of no one else that does it that way.

    Thanks,

    Stiofan

    #387044

    BJ Bowen
    Full Member
    Post count: 73

    Okay… then please explain to me how I’m supposed to merge New Content from a development site and the New Users & Places from the site that is live. How do others do it? If you can teach me a way that is more efficient, I’m all ears.

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

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

Open Support Ticket