Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Currently the special menu items register menu items with drupal_not_found()
as page callback
. This can lead to errors like: Cannot modify header information - headers already sent by (output started at...
.
This is due the fact that drupal_not_found()
already calls drupal_deliver_page()
, which later is called again as this is the delivery callback.
Proposed resolution
As in the documentation of drupal_not_found()
defined we should have an own page callback which just returns drupal_not_found
instead.
Remaining tasks
Reviews needed.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
special_menu_items-do-not-use-drupal_not_found-as-page_callback.patch | 1.09 KB | das-peter |
Comments
Comment #1
gagarine CreditAttribution: gagarine commentedThanks
Comment #3
gagarine CreditAttribution: gagarine as a volunteer commentedCommitted.