> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gradial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AEM Page Safeguards

> What Grady does with pages AEM is holding for deletion, how copied pages start, and how Grady reports partial tag lists.

These safeguards apply to Grady's own AEM write operations on a **classic AEM connection** (a Sling author connection). Each section says where the behavior has limits.

## Pages held for deletion

When AEM can't let someone delete a **published** page outright (the person or account doing it can't deactivate the page), AEM does not remove it. It hides the page in the Sites console, marks it with `deleted` and `deletedBy` on `jcr:content`, and starts a Request for Deletion workflow. Until an administrator approves the request, the page still exists. This is what "held for deletion" means here. A delete request on a page that is not published is not held in this way.

Where the check runs, Grady refuses to change a page in this state. It also refuses to copy one, or to create content under one. Nothing is written, and Grady tells you why. The message depends on what was asked.

If Grady was asked to change the page:

> AEM is holding this page for deletion approval, so it's hidden in the AEM Sites console. An AEM admin needs to approve the Request for Deletion, or remove the page's deletion mark (deleted and deletedBy on jcr:content) if the request was stopped. Nothing was written.

If Grady was asked to copy a held page, the message says it can't copy the page because a copy would be hidden too, and gives the same two ways to clear the hold.

To clear the hold, an AEM administrator approves the Request for Deletion or removes the deletion mark.

### What the check covers

* **Only a Task with a classic AEM connection is checked.** The check reads the page's `jcr:content` from the Sling author. A Task that has only a standalone **AEM OpenAPI** integration skips the check, even if another environment in your organization has a classic connection. When the Task does have a classic connection, page writes through OpenAPI are checked too, if that author can read the page.
* **It checks the pages each request names.** For a copy it checks the source. For a create it also checks the nearest existing page above the new one. For a launch promotion started by Grady it checks the launch, its root and its source page. For a rollout started by Grady it checks the blueprint and the selected targets. A clean child page of a held page can still receive new content. Pages AEM works out on its own, for example the other pages of a full launch promotion, are not named in the request and are not checked.
* **It runs when the change is requested.** Planning a change without making it (a dry run) is not checked. Promotions started from the artifact menu are not checked for held pages, and this page does not describe the artifact menu's own checks.
* **If AEM can't answer in time, Grady allows the change.** Each read has a short time limit, and the whole check has about ten seconds. A page Grady could not read within that time is allowed, so a slow author never blocks a write. This check is a safeguard, not a guarantee.
* **Reading is unaffected.** Grady can still read a held page. Its page details show when the hold started and who requested it.

## Copied pages start unpublished

AEM's own copy keeps the source page's publish status and deletion marks. After Grady copies a page, or creates a new Experience Fragment, it removes those from the new page's `jcr:content`: the copied publish-status properties (`cq:lastReplicat…` and `cq:lastPublished…`) and the `deleted` and `deletedBy` marks. The new page then:

* Starts unpublished.
* Does not carry a deletion mark that came with the copy.

A held source page is normally refused before the copy starts, as described above. The cleanup matters when a mark came across on a copy that was allowed, for example when the source's state could not be read in time, or when an Experience Fragment template's initial content already held it.

Grady changes only those properties. The title, template and content stay as they were. A copy that includes pages below the copied page (a deep copy) gets the same cleanup on those pages. For an Experience Fragment, the cleanup covers the fragment and its variations. A copy into a launch keeps its source's status on purpose, because a launch mirrors its source.

The cleanup has limits: it covers up to 200 pages and about 15 seconds. If Grady cannot confirm or finish it, the copy still succeeds, Grady reports a warning, and the new page may keep the status it copied. **When you see that warning, check the new page's publish status in AEM before you rely on it being unpublished.**

## Partial tag lists

When Grady lists tags, AEM may hold more tags than one result returns. A tag list can say that its results were truncated. When it does, treat the list as partial.

## Related

* [Working with AEM Launches](https://docs.gradial.com/docs/integrations-administration-and-setup/integrations/aem/aem-launches.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.