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 #1

Updated by Martin Schulz over 2 years ago

Any news here? Iam on 10.4 building some forms that do prefilling by current fe_user?

Actions #2

Updated by Björn Jacob over 2 years ago

  • Status changed from New to Closed

Thanks for your contribution :) We are working on a solution which will also be available for v10. Please see #93887 and #92406 / https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460/. I am closing this issue since the patch will fix your problem.

Actions #3

Updated by Björn Jacob over 2 years ago

  • Related to Bug #93887: Ext:Form Caching Determination breaking Ajax Request added
Actions #4

Updated by Björn Jacob over 2 years ago

  • Related to Bug #92406: Using formvh:render without extbase context results in Exception added
Actions #5

Updated by Björn Jacob over 2 years ago

  • Sprint Focus set to Remote Sprint
Actions #6

Updated by Gerrit Code Review over 2 years ago

  • Status changed from Closed to Under Review

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460

Actions #7

Updated by Gerrit Code Review over 2 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70460

Actions #8

Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70587

Actions #9

Updated by Simon Schaufelberger over 2 years ago

  • Subject changed from Disable caching on a per form basis. to Disable caching on a per form basis

I'm also affected by this bug as I have a prefill typoscript config when logged in with data from fe_user.

Actions #10

Updated by Simon Schaufelberger over 2 years ago

  • Description updated (diff)
Actions #11

Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70587

Actions #12

Updated by Tim Obert almost 2 years ago

Any news here?
It seems that the patch is not compatible to the current state of the repo anymore and the workaround with "TYPO3_CONF_VARS" also doesn't seem to help.

Actions #13

Updated by Björn Jacob almost 2 years ago

We are still working on this issue. ATM there is another core sprint. The changes are rather complex.

Actions #14

Updated by Alexander Grein 9 months ago

The workaround to set `tt_content.form_formframework.20 = USER_INT` is not working under TYPO3 12, since it uses an EXTBASEPLUGIN content object now.

Disabling caching for all forms, feels very crude.

Actions #15

Updated by Jarvis H 2 months ago

Any news here after (checks calendar) 4 years?

Actions

Also available in: Atom PDF