Skip to content

Commit 6be78fc

Browse files
committed
Fix #196
1 parent 19f5f5c commit 6be78fc

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

Classes/Service/ConfigurationService.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ class ConfigurationService extends AbstractService
2626

2727
/**
2828
* Build up the configuration.
29+
*
30+
* @throws \Exception
2931
*/
3032
public function __construct()
3133
{
3234
$extensionConfig = (array)GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('staticfilecache');
35+
if (!array_key_exists('validHtaccessHeaders', $extensionConfig)) {
36+
throw new \Exception('It seams your extension configuration stored in the LocalConfiguration is old. Please save the configuration of the StaticFileCache extension in the extension manager or deployment process.');
37+
}
3338
$this->configuration = \array_merge($this->configuration, $extensionConfig);
3439

3540
if (\is_object($GLOBALS['TSFE']) && isset($GLOBALS['TSFE']->tmpl->setup['tx_staticfilecache.']) && \is_array($GLOBALS['TSFE']->tmpl->setup['tx_staticfilecache.'])) {

ext_conf_template.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# cat=basic; type=boolean; label=Clear cache for all domains in tree: When the TYPO3 tree hosts more than one domain, each domain has it's own cache branch. When clearing the cache, only the cache for the domain you are logged on to will be cleared. If you would like the cache for all domains to be cleared when clearing the frontend cache, then check this box.
22
clearCacheForAllDomains = 1
33

4-
# cat=basic; type=boolean; label=Boost mode: This mode do not delete the cache files, if editor change the cache or delete it. The URLs are added to a queue and there is a symfony command (also in the scheduler task module) that call the URLs to rebuild the cache. As result: The regular FE users always get a fast StaticFileCache.
4+
# cat=basic; type=boolean; label=Boost mode: This mode do not delete the cache files, if editor change the cache or delete it. The URLs are added to a queue and there is a symfony command (also in the scheduler task module) that call the URLs to rebuild the cache. As result: The regular FE users always get a fast StaticFileCache. Note: If you enable this feature you need the scheduler task. Without the scheduler tasks the website is not updateable anymore.
55
boostMode = 0
66

77
# cat=basic; type=options[Current=current,Childs=childs,Both=both]; label=Backend display options:The backend module should display cache entries of the current page, only the direct children or both?
@@ -10,7 +10,7 @@ backendDisplayMode = both
1010
# cat=basic; type=boolean; label=Debug headers:Send debug headers to get a information which component deliver the file (X-SFC-State).
1111
debugHeaders = 0
1212

13-
# cat=basic; type=string; label=Valid htaccess headers:List of headers that are transfered to the htaccess configuration. E.g. if you use config.additionalHeaders.xxx you can add this headers here
13+
# cat=basic; type=string; label=Valid htaccess headers:List of headers that are transfered to the htaccess configuration. E.g. if you use config.additionalHeaders.xxx you can add this headers here. Please change this configuration only, if you know waht you do. "Content-Type" is recommended.
1414
validHtaccessHeaders = Content-Type,Content-Language,Link,X-SFC-Tags
1515

1616
# cat=basic; type=boolean; label=Disable StaticFileCache in development: When checked, the StaticFileCache won't be generated if in development application context.
@@ -23,7 +23,7 @@ renameTablesToOtherPrefix = 0
2323
useReverseUriLengthInPriority = 1
2424

2525
# cat=basic; type=boolean; label=Use fallback middleware: use the fallback middleware to deliver the static file, if there is no htaccess configuration
26-
useFallbackMiddleware = 0
26+
useFallbackMiddleware = 1
2727

2828
# cat=basic; type=boolean; label=Hash URI in cache (BETA!!!): Hash the URI in cache so the cache idenfier is short. Avoid problems with very lage URIs
2929
hashUriInCache = 0
@@ -37,16 +37,16 @@ htaccessTemplateName = EXT:staticfilecache/Resources/Private/Templates/Htaccess.
3737
# cat=basic; type=string; label=Override cache directory: If this config var is empty the default is "typo3temp/tx_staticfilecache/". If you change this value you HAVE TO addapt you rewrite configuration.
3838
overrideCacheDirectory =
3939

40-
# cat=generator; type=boolean; label=Enable Cache Manifest generator (BETA!!!): Create manifest files
40+
# cat=Generator; type=boolean; label=Enable Cache Manifest generator (BETA!!!): Create manifest files
4141
enableGeneratorManifest = 0
4242

43-
# cat=generator; type=boolean; label=Enable Plain generator: When checked, the normal (default) file will write to the cache.
43+
# cat=Generator; type=boolean; label=Enable Plain generator: When checked, the normal (default) file will write to the cache.
4444
enableGeneratorPlain = 0
4545

46-
# cat=generator; type=boolean; label=Enable GZIP compression generator: When checked, a gzipped version of the static file is written to the cache directory. Take care to also choose the proper .htaccess configuration when enabling this option.
46+
# cat=Generator; type=boolean; label=Enable GZIP compression generator: When checked, a gzipped version of the static file is written to the cache directory. Take care to also choose the proper .htaccess configuration when enabling this option.
4747
enableGeneratorGzip = 1
4848

49-
# cat=generator; type=boolean; label=Enable Brotli generator: When checked, the brotli version of the static file is written to the cache directory.
49+
# cat=Generator; type=boolean; label=Enable Brotli generator: When checked, the brotli version of the static file is written to the cache directory.
5050
enableGeneratorBrotli = 0
5151

5252
# cat=Headers; type=boolean; label=Send Cache-Control header: If your Apache installation has 'mod_expires' loaded, you can use it to send Cache-Control headers. For each statically cached page a .htaccess file will be created with a mod_expires rule. This rule will make Apache send a cache header when delivering the cached page to the visitor.
@@ -55,14 +55,14 @@ sendCacheControlHeader = 1
5555
# cat=Headers; type=boolean; label=Send Cache-Control header redirect after cache timeout: Add a mod_rewrite statement to the generated htaccess files, that redirect the user to the index.php, if the Cache is invalid.
5656
sendCacheControlHeaderRedirectAfterCacheTimeout = 0
5757

58-
# cat=Cache Tags; type=boolean; label=Enable Cache Tags: Output the TSFE cache Tags for the current site in the rendering and for the cache entry
58+
# cat=Headers; type=boolean; label=Enable Cache Tags: Output the TSFE cache Tags for the current site in the rendering and for the cache entry
5959
cacheTagsEnable = 0
6060

61-
# cat=HTTP/2 Push; type=boolean; label=Enable HTTP/2 Push: Enable sending HTTP/2 push headers (experimental)
61+
# cat=HttpPush; type=boolean; label=Enable HTTP/2 Push: Enable sending HTTP/2 push headers (experimental)
6262
sendHttp2PushEnable = 0
6363

64-
# cat=HTTP/2 Push; type=string; label=File extensions for HTTP/2 push: Different file extension for HTTP/2 push. Please take care, that there is a Handler for parsing the file Extensions
64+
# cat=HttpPush; type=string; label=File extensions for HTTP/2 push: Different file extension for HTTP/2 push. Please take care, that there is a Handler for parsing the file Extensions
6565
sendHttp2PushFileExtensions = css,js
6666

67-
# cat=HTTP/2 Push; type=string; label=File limit for HTTP/2 push: The limit of files that are added as HTTP/2 push
67+
# cat=HttpPush; type=string; label=File limit for HTTP/2 push: The limit of files that are added as HTTP/2 push
6868
sendHttp2PushFileLimit = 10

0 commit comments

Comments
 (0)