Bug #12094
closed
[Fluid] Ajax Widgets can't be used from within cachabele actions
Added by Thomas Maroschik over 13 years ago.
Updated over 2 years ago.
Description
Problem¶
When using a Fluid Ajax Widget on a cachable controller action, then fluid-widget-id is cached in template output. Since fluid-widget-id is bound to an individual fe_user, the fluid-widget-id won't get updated upon every request.
Sometimes you want be able to fetch cached data via Ajax.
Solution¶
Check if the stored action in Widget Context is cacheable. If yes, then save the context with AjaxWidgetContextHolder to a cache instead of the session.
Oops, perhaps this issue should be moved to fluid project.
Hi,
+1 on this. I noticed this behaviour yesterday.
Do you have a patch for that?
@Thomas: Have you solved or worked around this issue when you discovered it (back then long time ago)?
- Status changed from New to Needs Feedback
- Project changed from 534 to 2559
- Category changed from 964 to Fluid: Widgets
Issue still exists in 6.0.
Any news regarding fix?
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Accepted
The accepted commit 1629aea9afd7c11198763b0ec69d634cf7a32b63 is not yet in master.
Whats holding this up?
Ajax Widgets are quite useless without this.
Therefore: Do you think this could be cherry-picked to 6.0/6.1 TYPO3 versions, as this really fixes a major bug?
I tested the patch on 6.2.2 and it seems to work fine except for one detail. I get a 404 if the AJAX request doesn't go to index.php. In the patch, that is addressed for UriViewHelper, but not for LinkViewHelper.
I'm not sure if there's a reason for it, but otherwise line 111 in typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php should be changed to:
return '/index.php?' . http_build_query($arguments, NULL, '&');
After some more testing we were not able to use the patch in production. The string generated from the widget context can grow too large, resulting in a URL that is longer than supported by browsers and servers (> 2kb in our tests).
- Project changed from 2559 to TYPO3 Core
- Category changed from Fluid: Widgets to Fluid
- Target version set to next-patchlevel
- TYPO3 Version set to 6.2
- Is Regression set to No
- Target version deleted (
next-patchlevel)
- Status changed from Accepted to Closed
Also available in: Atom
PDF