Bug #12094

[Fluid] Ajax Widgets can't be used from within cachabele actions

Added by Thomas Maroschik over 8 years ago. Updated almost 4 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2011-01-11
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Associated revisions

Revision 1629aea9 (diff)
Added by Helmut Hummel over 5 years ago

[WIP] fluid widgets without sessions

Fixes: #12094
Change-Id: If11ffd7c554f1f45264a06046ecf5d50bc22690d

History

#1 Updated by Thomas Maroschik over 8 years ago

Oops, perhaps this issue should be moved to fluid project.

#2 Updated by Kevin Ulrich Moschallski over 8 years ago

Hi,

+1 on this. I noticed this behaviour yesterday.

Do you have a patch for that?

#3 Updated by Marc Bastian Heinrichs over 8 years ago

  • Category set to 964

#4 Updated by Stefan Neufeind over 7 years ago

  • Has patch set to No

@Thomas: Have you solved or worked around this issue when you discovered it (back then long time ago)?

#5 Updated by Ingo Pfennigstorf about 7 years ago

  • Status changed from New to Needs Feedback

#6 Updated by Anja Leichsenring over 6 years ago

  • Project changed from Extbase MVC Framework to Fluid
  • Category changed from 964 to Fluid: Widgets

#7 Updated by Viktor Livakivskyi almost 6 years ago

Issue still exists in 6.0.
Any news regarding fix?

#9 Updated by Helmut Hummel over 5 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

#10 Updated by Marc Bastian Heinrichs over 5 years ago

  • Status changed from Resolved to Accepted

#11 Updated by Benjamin Franzke over 5 years ago

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?

#12 Updated by Stefan Dürrenberger over 5 years ago

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, '&');

#13 Updated by Stefan Dürrenberger over 5 years ago

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).

#14 Updated by Alexander Opitz about 5 years ago

  • Project changed from Fluid 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

#15 Updated by Mathias Schreiber almost 4 years ago

  • Target version deleted (next-patchlevel)

Also available in: Atom PDF