Skip to content

Commit

Permalink
Issue #3474835 by anacolautti: Scheduling a published content with co…
Browse files Browse the repository at this point in the history
…ntent moderation unexpectedly unpublishes the content

* Require scmi 3

* update actions/download-artifact

* allow older version

* also update upload artifact

* tmate

* Fix path to download

* empty

* Remove fix and run new test, this should fail

* Reanable fix

---------

Co-authored-by: Christian Fritsch <[email protected]>
  • Loading branch information
dbosen and chrfritsch authored Sep 24, 2024
1 parent 1f5c02d commit 6d497ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"drupal/responsive_preview": "^2.1",
"drupal/redirect": "^1.7",
"drupal/scheduler": "^2.0.2",
"drupal/scheduler_content_moderation_integration": "^2.0",
"drupal/scheduler_content_moderation_integration": "^2.0||^3.0",
"drupal/schema_metatag": "^2.4",
"drupal/select2": "^1.7",
"drupal/search_api_mark_outdated": "^1.0",
Expand Down
16 changes: 16 additions & 0 deletions tests/src/Functional/ModeratedContentSchedulingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ public function testPublishStateSchedule(): void {
$this->assertEquals('published', $node->moderation_state->value);
$this->assertEquals('Test workflow article 1 - Draft', $node->getTitle());

// Test published to published.
// See: https://www.drupal.org/project/thunder/issues/3474835
$this->drupalGet($edit_url);
$this->submitForm([
'title[0][value]' => 'Test workflow article 1 - Still Published',
'moderation_state[0]' => 'published',
'publish_on[0][value][date]' => date('Y-m-d', $publish_timestamp),
'publish_on[0][value][time]' => date('H:i:s', $publish_timestamp),
'publish_state[0]' => 'published',
], 'Save');
$node_storage->resetCache([$node->id()]);
/** @var \Drupal\node\Entity\Node $node */
$node = $node_storage->loadRevision($node_storage->getLatestRevisionId($node->id()));
$this->assertEquals(TRUE, $node->isPublished());
$this->assertEquals('published', $node->moderation_state->value);

}

/**
Expand Down

0 comments on commit 6d497ff

Please sign in to comment.