Invenzzia »

Open Power Template 2.x family

PLEASE PROVIDE THE TEMPLATES AND/OR PHP CODE IN THE TASK DESCRIPTION (Not URL-s to them). THAT ALLOWS US TO REPRODUCE THE PROBLEM! OTHERWISE WE ARE NOT ABLE TO HELP YOU!

Remember to hide all the security-related pieces of code from the task description, like passwords, server paths etc. for your own safety. Once we close the task, we cannot edit it anymore!
Tasklist

FS#96 - In Opt_Class::__destruct() all active output buffers are flushed and ended

Attached to Project: Open Power Template
Opened by Anonymous Submitter - Friday, 17 July 2009, 10:09 GMT-7
Last edited by Zyx (Zyx) - Wednesday, 01 September 2010, 00:11 GMT-7
Task Type Bug Report
Category Base class
Status Closed
Assigned To Zyx (Zyx)
Operating System OS-independent
Severity Low
Priority Normal
Reported Version 2.0.0
Due in Version 2.0.6
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Don't you think everyone should close only its own buffers?

My particular case is an ob_start() callback function that sets some HTTP headers (Content-Length and such). The problem is it is not called in the end but after OPT renders a template (which is just a part of the page).

--
Francesc Rosàs
This task depends upon

Closed by  Zyx (Zyx)
Wednesday, 01 September 2010, 00:11 GMT-7
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed in Git now.
Comment by Zyx (Zyx) - Saturday, 18 July 2009, 01:54 GMT-7
Hmmm... the assumption was to free the users from the manual output buffer management. This is where the current implementation came from. However, it should be no problem to improve it. I'll see, what could be done and added to 2.0.1 version.

BTW. If OPT generates only a part of the page, you should consider not to use the Opt_Output_Http output system.
Comment by Zyx (Zyx) - Tuesday, 21 July 2009, 22:33 GMT-7
Could you provide a pseudocode showing your code structure? I'd like to write a proper test case and see, what the best solution would be.
Comment by Francesc Rosàs (frosas) - Monday, 14 June 2010, 08:54 GMT-7
Here it is an example where I need OPT not touching my OB handlers:

I have an OB handler in the front controller that adds some HTTP headers: ob_start(array(new Pct_Web_HttpOutputHandler, 'execute'), 4096). I attached Pct_Web_HttpOutputHandler class for completeness.

In this case, after executing an OPT template, ETag and Content-Length headers are already sent and I can't echo anything else (well, I can but headers won't be valid then).

This is just one of the cases I've found but I have more. The point is that OPT shouldn't touch other's handlers.
Comment by Francesc Rosàs (frosas) - Wednesday, 30 June 2010, 23:21 GMT-7
  • Field changed: Percent Complete (10% → 0%)
Feedback provided :)
Comment by Zyx (Zyx) - Wednesday, 30 June 2010, 23:21 GMT-7
Thanks, I'll check this out soon.

Loading...