Skip to content

Commit

Permalink
Temporary fix for bulk operation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Apr 12, 2024
1 parent d4457a6 commit ada9fde
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes for Blitz

## 5.1.2 - 2024-04-12

### Fixed

- Fixed a bug in which propagated saves were not triggering refresh cache jobs ([#654](https://github.com/putyourlightson/craft-blitz/issues/654)).

## 5.1.1 - 2024-04-12

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "putyourlightson/craft-blitz",
"description": "Intelligent static page caching for creating lightning-fast sites.",
"version": "5.1.1",
"version": "5.1.2",
"type": "craft-plugin",
"homepage": "https://putyourlightson.com/plugins/blitz",
"license": "proprietary",
Expand Down
14 changes: 12 additions & 2 deletions src/Blitz.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,12 @@ private function registerBulkElementEvents(): void
{
// Enable batch mode
$events = [
[Elements::class, Elements::EVENT_BEFORE_BULK_OP],
/**
* TODO: revisit for the next version.
* https://github.com/putyourlightson/craft-blitz/issues/654
* https://craftcms.com/docs/5.x/extend/events.html#bulk-operations
*/
//[Elements::class, Elements::EVENT_BEFORE_BULK_OP],
[ResaveController::class, Controller::EVENT_BEFORE_ACTION],
];

Expand All @@ -420,7 +425,12 @@ function() {

// Refresh the cache
$events = [
[Elements::class, Elements::EVENT_BEFORE_BULK_OP],
/**
* TODO: revisit for the next version.
* https://github.com/putyourlightson/craft-blitz/issues/654
* https://craftcms.com/docs/5.x/extend/events.html#bulk-operations
*/
//[Elements::class, Elements::EVENT_AFTER_BULK_OP],
[ResaveController::class, Controller::EVENT_AFTER_ACTION],
];

Expand Down

0 comments on commit ada9fde

Please sign in to comment.