Details
-
Bug
-
Resolution: Invalid
-
Critical
-
None
-
5.0.0beta2
-
None
Description
Several ajax calls have been modified to not use eZExecution::cleanExit();
Like content/treemenu:
https://github.com/ezsystems/ezpublish/commit/8c8f99d411f1dfe32a3d6469fabae7a72675fdb2#L2L24
However this is a big BC break as we recommended using this for ajax calls for many years for several reasons, from the top of my head: avoid storing url in session, avoid applying pagelayout, and speed up execution and lots of unneded code in index.php was skipped.
We should #1 make sure eZExecution::cleanExit() still works, and then maybe #2 consider removing the workarounds deployed to several ajax calls that currently have been causing some side effects.
Potential approach to solving #1:
1. Change the code in cleanExit() to throw exception instead of calling "exit;"
2. Put ob_get_clean() content as a param on this exception
3. catch this exception in ezpKernelWeb and ezpKernelTreemenu (and others?) and pass it on to Symfony / web in a sensible way skipping further execution in the ezpKernelHandler