• Not Answered

All content missing from Web database after full site republish

 Our company website is built in Sitecore, and one of our marketing team had just updated a form and tried to publish the changes. Their change was not showing up so they tried a full site republish. At this point the site went down.

We have tried republishing several times since and every time it says 'Published 0 items'.

The Web database is completely empty, it doesn't have any items in it at all (which explains the site going down), but all expected content is visible in the Master database.

I have checked the state of our Home and Site item and both are publishable and not in any unusual/draft workflow state, so this is not the cause.

The only change made was a wording change on a form item.

Our site is using Sitecore 8.2 (rev. 161221)

 

This is quite urgent, so any help is greatly appreciated!

21 Replies

  • This sounds like more than a wording change on a form item. Do the templates still exist in the web database? Are there any indications in the log files as to any unexpected exceptions?

    In lieu of the actual solution, there may be a temp workaround to get the website up and running until then. Assumption is that there is no publishing agent that will attempt to publish on an interval. You could try to Transfer the items to the web database. Control Panel --> Database: Move an Item to Another Database. Untested idea but may buy you some time while researching the overall issue. If the transfer fails, then the templates may not exist OR you don't have write access to the destination.
  • Hi Phil,
    Let me know if Alpha Solutions can help - it's hard to come up with a real solution without having actually looked at the issue, but I am sure we can help sort this out with a closer look

    A couple of things to look into:
    1: Are the log files showing anything?
    2: Have you tried to completely blow away the existing Web databases? Not just keep replublishing to the existing (empty) ones
    3: For short term solution - is there any way you can point to the Master DB to run the site while troubleshooting (Live mode)

    Best
    Kim
  • In reply to Scott Freeman:

    Hi Scott,

    There is nothing in the Web database after a publish at all. It's as if it has been completely wiped, which is ... not good.

    As a temporary solution we are going to just restore it from a backup, but obviously we need to find a root cause in order to be able to continue publishing in future.
  • In reply to Kim Baekgaard:

    Hi Kim,

    The only error in the logs is one complaining about a missing item - this was what prompted me to check the Web database in the first place which was how I noticed it was completely empty. As I mentioned to Scott, the current plan is to restore the Web database from a backup to just get the site up and running, but I can't find a root cause for the publish wiping the Web database in the first place.
  • In reply to phil.quarrell boxuk.com:

    Phil - Happy to try to help figure this problem out too - but would probably need to know a bit more. These types of issues are always tough to fix when dealing with the black box of unknown implementation.

    To me, you need to start by checking why your templates aren't being published. No content items will publish without the templates.
  • Hi Phil,

    It sounds to me like either your publish failed causing an issue, or an issue occurred causing the publish to fail, do your logs show you anything useful to determine this?

  • In reply to phil.quarrell boxuk.com:

    Thanks Phil

    What item is it complaining about missing?
  • Is it possible that someone added publishing restrictions on the Templates folder to try and prevent anyone from "accidentally" updating them by marking them unpublishable? And then a full site publish to web caused all of those to be removed?
  • In reply to Hywel Bromby:

    Logs are pretty unhelpful sadly, just an error about a missing item (because *everything* is missing), the item GUID that is in the stack trace error definitely exists in the master db, so it is just one of many that has not been copied over in the publish and happens to be the one that throws an exception first.
  • In reply to Chris Pauly:

    Hi Chris,

    There haven't been any changes to publishing restrictions as far as I can see. Everything looks normal. My initial thought was that something had ended up in a draft state or something but nothing of that sort seems to have happened.
  • In reply to phil.quarrell boxuk.com:

    Can you make a copy of the master database and use it within a BETA environment? That would allow you to continue to play around without taking out production.

    Assuming you have a BETA environment that mirrors PROD, does a full site republish cause the same issue? Might try to use RAZL to compare the two environments to locate any changes.
  • In reply to Kim Baekgaard:

    Hi Kim,

    The item that it's complaining about is a 'Device' item, but everything is missing from Web, so I think it's more just that that's the one that is throwing an exception first rather than that being the root cause of the publishing issue.
  • In reply to Scott Freeman:

    I've seen this happen once where a publishing restriction was placed on a new (future) version of the homepage. The content did not disappear until the new version (with publishing restrictions on the homepage) was auto published with an automated task. Because the homepage could not publish, all of the content below vanished.

    However, I don't recall the entire web database being empty.

    As Scott mentioned, I'd make a copy of the Master DB to troubleshoot later. I like the RAZL idea too.

  • In reply to Scott Freeman:

    We're downloading a copy of the master database now and we have a UAT environment so we should be able to do some testing with that hopefully.
  • In reply to Ryan Zimmerman:

    Yeh, publishing restriction or an incorrect workflow state was my first instinct, but I've not been able to locate any issues here. There are no publishing restrictions in place and everything is marked as publishable (including the homepage item and site item in the content tree). Also worth noting that no changes have been made to these recently so it'd be strange for a restriction to have come into place or for the workflow state to have changed.