[TYPO3-mvc] Fluid widgets

Pankaj Lele pankaj at lelesys.com
Mon Jul 18 13:57:02 CEST 2011


Hello Bastian,

>> This error goes off if I clear all FE cache and reload the page. Is
>> there any fix for this?
> 
> You reload the page that contains the widget?

Yes. I figured out the pattern to reproduce the problem. If I keep
refreshing the page having the AJAX widget, the stack of widget contexts
in the session keep on increasing even if there is only 1 widget on the
page. At the 4th or 5th refresh I start getting the "No widget context
was found.." error when I press button to call the AJAX side. Then at
next refresh the widget contexts stack in the session is reset (just 1
widget context is seen).

I observed that when I have a widget which has a argument of 1 domain
object of some repository (<m:widget.abc foo="{bar}" />) the error is
reproduced always. When I have a widget with argument of e.g. the
QueryResult, no error. Is this something to do with some limitations of
PHP? I already tried setting PHP memory_limit to 512M but still same
problem.

Following are possible solutions but I need to know the best approach:

1. Fix Extbase or Fluid to empty the widgetContexts stack for every page
load. I will try to submit a patch if this is a valid solution. (Long
term fix)
2. Avoid setting domain objects as widget arguments and send the
QueryResult as it is done with widget.autocomplete (quick solution for
now for me)
3. Not use AJAX widget and use normal controller->action through own
PAGE object. (Recommended?)

I won't choose option #3 as in general I believe that Fluid AJAX widgets
is the standard way of dealing with AJAX requests as we get a special
controller and view for each widget and some sort of security with
having the AJAX widget identifiers. Please correct me if this is wrong
understanding.

Thanks,
Pankaj

-- 

With best regards,
Pankaj Lele
---------------------------

CTO & Executive Director
Lelesys Infotech Pvt. Ltd.
Pune/Goa, India

Web: http://www.lelesys.com

[Certified TYPO3 Integrator]


More information about the TYPO3-project-typo3v4mvc mailing list