Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James 10 posts 50 karma points
    Jul 13, 2016 @ 22:16
    James
    0

    Publishing site includes articles on local server

    I'm working on a small personal site. It's set up and working locally and I am deploying it to my hosting account using a publishing profile from Visual Studio.

    So far so good, I am pretty happy with how this builds and deploys and it's quite easy for me.

    One problem I have though, is that test pages I have set up on my local site are somehow ending up on the live site. Even though the db hasn't been restored.

    I think I must have restored my local database from the live one at some point and the ids match. I deleted a load of pages from the live site, but after a deployment they appear on the site, but not in the back end.

    I don't know if I am deploying something I shouldn't be.

    This is Umbraco 7, Visual Studio 2015.

    Any help would be greatly appreciated!

    Update: So even though the pages have been deleted and removed from the site in the back office, clicking on a link on the front end still takes me to the page.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 14, 2016 @ 05:20
    Jan Skovgaard
    0

    Hi James

    Hmm, the pages may still be in the cache layer - Could you please try and see if right clicking on the "CONTENT" node and selecting "Republish entire site" helps? This should update the umbraco.config file found in the App_Data folder where I suspect the pages are still being kept.

    What database are you using btw?

    /Jan

  • James 10 posts 50 karma points
    Jul 14, 2016 @ 11:54
    James
    0

    Thanks Jan, that did the trick! Really appreciate the help.

    The very first time I deployed my site, I sent the app_data folder to the server (including the TEMP and cache sub folders) and I now wonder if this was a mistake?

    Last night after I posted the above message, I logged on and deleted these folders and everything seemed to be working, but when I checked again this morning they were back. Your republish entire site seems to have worked though!

    Do you know if there is any documentation which highlights the files and folders that should be deployed?

    For reference it's a SQL Server 2012 db.

    Thanks again.

    James

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 14, 2016 @ 12:32
    Jan Skovgaard
    100

    Hi James

    Happy to hear that it works :)

    Well usually you should not copy the stuff from the /App_Data folder since you don't want your local cache, logs and TEMP files nor the umbraco.config file from your local environment on your live or stage environment - But for instance you might want to copy over the "Models" folder if you're using the models builder...but I'm not 100% certain about that since that concept is still new to me so not sure what best practice is - Perhaps the models (depending on what setting one is using for them) are being compiled to a .dll anyway - But there are some different settings and at least one of them require the models to exist as .cs files in that folder...

    But apart from that keep the rest of the mentioned stuff out of your deploy since it will all be generated anyway once you enter the backoffice on your live environment the first time.

    If you're deploying the umbraco.config file then that's why you run into these issues I guess :)

    I suppose you're running two seperate Database instances?

    /Jan

  • James 10 posts 50 karma points
    Jul 14, 2016 @ 18:39
    James
    0

    Hi Jan.

    The pages came back again! Really weird. After republishing the entire site it was displaying as expected, but I've just checked it now and they are back!

    I have deleted everything from the wwwroot and republished the site, this time with the AppData folder excluded. After I granted the correct permission the AppData folder was recreated, just like you said.

    Fingers crossed it's now correct!

    Yeah, I've got two seperate db instances. A local environment and then the live one. Just transforming the connection strings at the publish.

    Thanks

    James

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 14, 2016 @ 18:43
    Jan Skovgaard
    0

    Hi James

    Ok, then I'm 99.995% sure that the issue is related to the fact that the umbraco.config is overriden each time you deploy (Or was since you have now changed your deploy routine) :).

    Please let us know whether this helps or not - It should but one never knows!

    /Jan

  • James 10 posts 50 karma points
    Jul 14, 2016 @ 18:47
    James
    0

    Excellent, thanks Jan. I'll report back tomorrow when I've had time to monitor it for a bit.

    Thanks so much for sharing your knowledge and your speedy responses!

    James

  • James 10 posts 50 karma points
    Jul 18, 2016 @ 20:45
    James
    0

    Very quick update on this, the error hasn't recurred!

    For anyone reading this in the future, don't deploy the App_Data folder and use the republish entire site function to update cache.

    James

Please Sign in or register to post replies

Write your reply to:

Draft