Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
The following scenario should allow authenticated users to archive the Page B, which is referred by an archived Page A:
1.Page A has a link to Page B
2.Page A is published and then archived.
3. The user wants to archive Page B.
As a result, the system stops the user from archiving it as the archived Page A has a link to Page B.
So the safedelete should allow the user to archive the Page B, which is referred by the archived Page A.
Steps to reproduce
Proposed resolution
$moderation_state = $entity->get('moderation_state')->getString();
if ($moderation_state == 'published') {
$entities[$entity->getEntityTypeId()][$entity->id()] = $entity;
$items_count++;
}
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | checking-page-reference-archive-action-prevent-published-moderation-state-only-3329993-03.patch | 2 KB | jamesyao |
Comments
Comment #2
jamesyao commentedComment #3
jamesyao commentedComment #5
joseph.olstad