From 7bfec1efc74342550ee6f206716d3c71d8779ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Sat, 22 Sep 2018 15:55:44 +0200 Subject: [PATCH] Fix chash errors of ajax requests for good --- .../ep_events/Configuration/TypoScript/Page/Ajax.typoscript | 1 + .../Resources/Private/Templates/Form/Configurator.html | 3 ++- .../Resources/Private/Templates/Form/ContactForm.html | 2 +- .../Resources/Private/Templates/Form/InquiryForm.html | 2 +- .../ext/ep_products/Configuration/TypoScript/setup.txt | 2 +- .../ext/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php | 3 +++ .../ext/ep_theme/Configuration/TypoScript/Page/Ajax.typoscript | 1 + .../ep_theme/Resources/Private/Templates/Form/FullForm.html | 2 +- .../ep_theme/Resources/Private/Templates/Form/SimpleForm.html | 2 +- 9 files changed, 12 insertions(+), 6 deletions(-) diff --git a/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Ajax.typoscript b/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Ajax.typoscript index c9896347..f2bdd89f 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Ajax.typoscript +++ b/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Ajax.typoscript @@ -24,6 +24,7 @@ ajax_page_json { 2 = processConfiguratorForm } } + features.requireCHashArgumentForActionArguments = 0 settings =< plugin.tx_epevents.settings persistence =< plugin.tx_epevents.persistence view =< plugin.tx_epevents.view diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/Configurator.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/Configurator.html index 3133a800..93ff7bc8 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/Configurator.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/Configurator.html @@ -57,7 +57,8 @@ :options-period='{configuratorConfig.periodOptions -> v:format.json.encode()}' inline-template> + controller="AjaxForm" pluginName="Ajax" pageType="1703" pageUid="{settings.ajaxPageUid}" + noCacheHash="1"> diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/ContactForm.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/ContactForm.html index b8100798..5af36cce 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/ContactForm.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/ContactForm.html @@ -12,7 +12,7 @@
+ pageUid="{settings.ajaxPageUid}" noCacheHash="1">
diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/InquiryForm.html b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/InquiryForm.html index c5264778..0732c97e 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/InquiryForm.html +++ b/web/typo3conf/ext/ep_events/Resources/Private/Templates/Form/InquiryForm.html @@ -13,7 +13,7 @@
+ pageUid="{settings.ajaxPageUid}" noCacheHash="1"> diff --git a/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt b/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt index 9c2fb473..3ea48d27 100644 --- a/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt +++ b/web/typo3conf/ext/ep_products/Configuration/TypoScript/setup.txt @@ -122,7 +122,7 @@ tx_epproducts_ajax_json { 1 = list } } - + features.requireCHashArgumentForActionArguments = 0 settings =< plugin.tx_epproducts.settings persistence =< plugin.tx_epproducts.persistence view =< plugin.tx_epproducts.view diff --git a/web/typo3conf/ext/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php b/web/typo3conf/ext/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php index 01ffa21f..7b0bdfdc 100644 --- a/web/typo3conf/ext/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php +++ b/web/typo3conf/ext/ep_theme/Classes/ViewHelpers/Uri/AjaxViewHelper.php @@ -78,6 +78,9 @@ class AjaxViewHelper extends ActionViewHelper // Force absolute urls $arguments['absolute'] = true; + // Disable cache hash + $arguments['noCacheHash'] = true; + return parent::renderStatic($arguments, $renderChildrenClosure, $renderingContext); } diff --git a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Ajax.typoscript b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Ajax.typoscript index 2fe34e45..296db0c6 100644 --- a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Ajax.typoscript +++ b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/Page/Ajax.typoscript @@ -23,6 +23,7 @@ ajax_page_json { 1 = processForm } } + features.requireCHashArgumentForActionArguments = 0 settings =< plugin.tx_eptheme.settings persistence =< plugin.tx_eptheme.persistence view =< plugin.tx_eptheme.view diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html index f96e3cab..3e2d24d2 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html @@ -9,7 +9,7 @@
+ noCacheHash="1" class="border" additionalAttributes="{v-show: '!success'}">
diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/SimpleForm.html b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/SimpleForm.html index c56de3ba..d7d679b2 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/SimpleForm.html +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/SimpleForm.html @@ -9,7 +9,7 @@
+ noCacheHash="1" class="border" additionalAttributes="{v-show: '!success'}">