# Handling empty pages, templates, or blocks after a deployment

Source: https://dev.arcxp.com/pagebuilder-editor/developer-docs/handling-empty-pages-templates-or-blocks-after-a-deployment/

Various causes can lead to an empty page or template after a deployment. The short explanation is, PageBuilder Engine can no longer find configurations or code, resulting in an empty page, template, or block, even if many blocks are listed in PageBuilder Editor Preview.

To learn more about the possible changes in your code that may have caused this issue, see the following articles:

- [Content Source API](https://dev.arcxp.com/pagebuilder-engine/developer-docs/content-source-api/)
- [Layout API](https://dev.arcxp.com/pagebuilder-engine/developer-docs/layout-api/)
- [Feature API](https://dev.arcxp.com/pagebuilder-engine/developer-docs/feature-api/)
- [Chain API](https://dev.arcxp.com/pagebuilder-engine/developer-docs/chain-api/)
- [Custom fields in PageBuilder Engine](https://dev.arcxp.com/pagebuilder-engine/developer-docs/custom-fields-in-pagebuilder-engine/)

## Reverting to the previous state

As soon as you discover empty pages or templates caused by any of the changes above, revert the deployment to the previous state stable bundle to limit the impact. Additionally, download a PB Data. Then, deploy the code locally with the PB Data from the environment and investigate which of the potential changes was the cause.

> **Note:**
> 
> If you encounter empty pages or templates in a Production environment, you want to resolve those issues as soon as possible. The issues outlined above do not count as “errors” (with the exception of the Resolver, mentioned in [Content Source API](https://dev.arcxp.com/pagebuilder-engine/developer-docs/content-source-api/)), which means that as soon as the cache runs naturally out, you serve empty pages to your end-users.

Do not attempt to debug the issue on the environment, as this might corrupt the configuration of your pages or templates.

Even after reverting the deployment, previews might still be empty for certain users because you must also delete the breaking configurations in the local drafts. Those drafts were created for any page or template that was opened while the breaking deployment was live.

> **Note:**
> 
> If a page or template is published in the broken state, you can revert that item only by restoring a previously published draft. See [How to restore a document from an older revision](https://dev.arcxp.com/publishing-platform/developer-docs/draft-api/how-to-restore-a-document-from-an-older-revision/).

Every user who has opened a page or template during the broken time period has to open that item again and click **Use Shared** to restore to the good configuration in the local draft.

If you don’t know who opened a page or template, you can purge all local drafts for a page or template by selecting **Purge Drafts** in the menu for the individual page or template. You cannot purge drafts in bulk, but if specific pages or templates remain blank, you can purge individual pages.

## ![Purge Drafts](https://dev.arcxp.com/images/pagebuilder-editor/purgeDrafts.png)
