You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The current implementation of error_page() in html/inc/util.inc#L367 contains a call to page_head() which among other things outputs header information (via header(). This means that after a page called page_head() itself it can't use the current error_page() function or the header is output twice. This leads to duplication of HTML code (two navbars) and PHP warnings Cannot modify header information - headers already sent by.
Steps To Reproduce
Create a page that calls error_page() after page_head()
View this page with a browser
Expected behavior
There should be no warnings and only one vaigation bar on the top. Therefore the second call to page_head() when calling error_page()afterpage_head() should be avoided. When error_page() is called beforepage_head() then of course it needs to call page_head() itself.
Scope
This is a rather big change as one has to check each PHP file and modify the error_page() call that happens after a page_head() call. So I would propose to do this in chunks and document progress in this issue.
The text was updated successfully, but these errors were encountered:
error_page() calls page_head(), but there are instances of code that call error_page() having already called page_head() before, thus attempting to send headers twice and creating double page header.
Fixes#2960
Describe the bug
The current implementation of
error_page()
in html/inc/util.inc#L367 contains a call topage_head()
which among other things outputs header information (viaheader()
. This means that after a page calledpage_head()
itself it can't use the currenterror_page()
function or the header is output twice. This leads to duplication of HTML code (two navbars) and PHP warningsCannot modify header information - headers already sent by
.Steps To Reproduce
error_page()
afterpage_head()
Expected behavior
There should be no warnings and only one vaigation bar on the top. Therefore the second call to
page_head()
when callingerror_page()
afterpage_head()
should be avoided. Whenerror_page()
is called beforepage_head()
then of course it needs to callpage_head()
itself.Scope
This is a rather big change as one has to check each PHP file and modify the
error_page()
call that happens after apage_head()
call. So I would propose to do this in chunks and document progress in this issue.The text was updated successfully, but these errors were encountered: