Hi,
In a page in a local plugin, I get error for $OUTPUT->header(); :
Coding error detected, it must be fixed by a programmer: Invalid state passed to moodle_page::set_state. We are in state 1 and state 1 was requested.
I have checked at this earlier thread :
https://moodle.org/mod/forum/discuss.php?d=197321
that the cause could be a second call to $OUTPUT->header();
But there is no second call.
Also, what is puzzling and surprising is that there is error in all other pages, including, similar other local plugins, error is only for this local plugin page.
Also, I tried $OUTPUT->has_started() , it returns false.
Also, $PAGE->state is 0 , just before call to header.
Moodle version 2.8
Please help and guide.