Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by sandip tawre -
Number of replies: 7

it is done by putting on index

ob_clean()

ob_start()

in grade/report/history/index.php


please suggest if anybbody have any other option

In reply to sandip tawre

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by samba ball -

Hi sandip tawre,

Thank you for posting this error in the forum, me too I have the same error.

I would like to know where in the file index.php did you place the

ob_clean ()

ob_start ()    ????

or else can you post your index.php on this forum in case other people will have errors of this type

Thank you very much

In reply to samba ball

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by Daniel Neis Araujo -
Picture of Core developers Picture of Plugin developers Picture of Translators

Hi,


some users are facing this error on 3.5.

Can this be related to MDL-36652 and non-ascii characters on course names?

In reply to Daniel Neis Araujo

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by Darko Miletić -

Whenever flexible_table is being used for exporting data the page MUST NOT print standard header or footer (or anything else for that matter). The only thing that should be executed is table setup and out.

So either a custom theme is used that messes this or the code itself is incorrect. If any of you uses some custom theme try with some stock theme just for the sake of testing.

In reply to Darko Miletić

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by Quang Tuyen -

Anyone find a solution for this issue yet ? changing to default clean theme doesn't help.  moodle 3.5.1 

In reply to Quang Tuyen

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by Dominique Palumbo -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi,

did the problem appear with all the export ? I mean if you do it on another course did you have the same error ?

Because, in fact, it seems to have special character in the course title (has it already remarked).



In reply to Dominique Palumbo

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by Julia fil -

Hi Dominique!

This problem appear with all the export in another courses.

In reply to Julia fil

Re: Programming error detected. This needs to be fixed by a programmer: Output can not be buffered before instantiating table_dataformat_export_format

by Julia fil -

Sorry, i found desicion of this problem.

Add in lib/dataformatlib.php ob_clean(); and comment exception and in /lib/tablelib.php ob_clean(); and comment exception

Average of ratings: Useful (2)