Project

General

Profile

Actions

Feature #91419

open

Disable caching on a per form basis

Added by Jarvis H almost 4 years ago. Updated 2 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2020-05-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Remote Sprint

Description

The form framework caches forms which causes issues when pre-filling fields with data. Any dynamic data retrieved via get params or database queries will be cached and can't be overridden until caches are deleted.

Current solutions found in the typo3 slack channel fx. include disabling caching completely for the render function in the form controller:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['Form']['plugins']['Formframework']['controllers'][\TYPO3\CMS\Form\Controller\FormFrontendController::class]['nonCacheableActions'][] = 'render';

This of course changes caching for all forms which is not really an ideal solution.

Another solution suggested was using USER_INT instead of USER like this:

tt_content.form_formframework.20 = USER_INT

This would allow for disabling the cache on a per page basis. However certain forms which need to be uncached may be inserted by editors on multiple pages and makes it necessary to keep track of page ids where such forms are present and add them to our Typoscript.

It would be great to be able to disable caches for certain form configurations, perhaps as a yaml property. I am not sure if caches could be easily disabled via the form api in hooks where dynamic data is added, if this is the case that would also work for me.


Related issues 2 (2 open0 closed)

Related to TYPO3 Core - Bug #93887: Ext:Form Caching Determination breaking Ajax RequestNewRalf Zimmermann2021-04-09

Actions
Related to TYPO3 Core - Bug #92406: Using formvh:render without extbase context results in ExceptionNewRalf Zimmermann2020-09-25

Actions
Actions

Also available in: Atom PDF