Skip to content

Commit

Permalink
Merge pull request #250 from lsst-epo/249-add-a-revalidation-event-fo…
Browse files Browse the repository at this point in the history
…r-when-a-live-entry-changes-to-another-status

249 add a revalidation event for when a live entry changes to another status
  • Loading branch information
ericdrosas87 authored Jun 7, 2024
2 parents e4ccf53 + 361791a commit 737e006
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/plugins/nextbuilds/src/NextBuilds.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ function (ModelEvent $event) {
$this->settings->activeSections[$entry->section->handle] &&
!ElementHelper::isDraftOrRevision($entry) &&
!($entry->duplicateOf && $entry->getIsCanonical() && !$entry->updatingFromDerivative) &&
($entry->enabled && $entry->getEnabledForSite()) &&
!ElementHelper::rootElement($entry)->isProvisionalDraft &&
!$entry->resaving
) {
Expand Down Expand Up @@ -155,6 +154,7 @@ function (ElementStructureEvent $event) {
Entry::class,
Entry::EVENT_AFTER_RESTORE,
function (Event $event) {
$entry = $event->sender;
if (
$this->settings->activeSections[$entry->section->handle] &&
!ElementHelper::isDraftOrRevision($entry) &&
Expand Down
2 changes: 1 addition & 1 deletion api/plugins/nextbuilds/src/services/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function buildPagesFromEntry(Entry $entry)
'secret' => $this->getSettingsData($settings->nextSecretToken)
];
$requestUrl = $endpoint . '?' . http_build_query($params);
Craft::debug("Request URL: " .$requestUrl, "REVALIDATE_STATUS");
Craft::info("Request URL: " .$requestUrl, "REVALIDATE_STATUS");

try {
$client->request('GET', $requestUrl, []);
Expand Down

0 comments on commit 737e006

Please sign in to comment.