Skip to content

Commit

Permalink
Hide sidbar panel when DummyStorage selected
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 13, 2024
1 parent e6f90b1 commit 7d0b29d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 5.9.1 - Unreleased

### Changed

- The element sidebar panel no longer appears when no storage driver is selected.

### Fixed

- Fixed a bug on the Tracked Element Queries page in the Blitz Diagnostics utility ([#716](https://github.com/putyourlightson/craft-blitz/issues/716)).
Expand Down
5 changes: 5 additions & 0 deletions src/helpers/ElementSidebarHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use craft\helpers\Html;
use craft\helpers\UrlHelper;
use putyourlightson\blitz\Blitz;
use putyourlightson\blitz\drivers\storage\DummyStorage;
use putyourlightson\blitz\models\SiteUriModel;
use putyourlightson\blitz\records\CacheRecord;

Expand Down Expand Up @@ -50,6 +51,10 @@ public static function getSidebarHtml(Element $element): string
return '';
}

if (Blitz::$plugin->cacheStorage instanceof DummyStorage) {
return '';
}

$uri = $element->uri;
if ($uri === null) {
return '';
Expand Down

0 comments on commit 7d0b29d

Please sign in to comment.