Skip to content

Commit 4994d67

Browse files
committed
Use actionUrl instead of relying on {{siteUrl}} to generate the cache clearing URL
1 parent a0cd48c commit 4994d67

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Buster Changelog
22

3+
## 1.0.6 - 2019-04-05
4+
5+
### Fixed
6+
- Use `actionUrl` instead of relying on `{{siteUrl}}` to generate the cache clearing URL
7+
38
## 1.0.5 - 2019-02-01
49

510
### Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "trendyminds/buster",
33
"description": "A control panel utility to clear just the template-based caches",
44
"type": "craft-plugin",
5-
"version": "1.0.5",
5+
"version": "1.0.6",
66
"keywords": [
77
"craft",
88
"cms",

src/templates/index.twig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@
1919
{% do view.registerAssetBundle("trendyminds\\buster\\assetbundles\\indexcpsection\\IndexCPSectionAsset") %}
2020

2121
{% set title = craft.buster.pluginName %}
22+
{% set clearAction = actionUrl("buster/default/clear-cache?key=#{craft.buster.authKey}") %}
2223

2324
{% set pluginCpUrl = url('buster') %}
2425

2526
{% set content %}
2627
<p>If your site data appears to be stale, try clearing the cache. This will ensure the templates and data across your site renew for all users.</p>
27-
<a href="{{siteUrl}}actions/buster/default/clear-cache?key={{craft.buster.authKey}}" class="btn submit" data-buster-button>Clear Cache</a>
28+
<a href="{{clearAction}}" class="btn submit" data-buster-button>Clear Cache</a>
2829

2930
<hr>
3031

3132
<h2>Clear cache with URL request</h2>
3233
<p>You may also clear the cache by requesting the following URL. Feel free to bookmark this or send a GET request here after deploying changes to your site.</p>
33-
<code class="Buster__url">{{siteUrl}}actions/buster/default/clear-cache?key={{craft.buster.authKey}}</code>
34+
<code class="Buster__url">{{clearAction}}</code>
3435
{% endset %}

0 commit comments

Comments
 (0)