1. User Alice completes order 29
  2. User Bob visits /checkout/29/review or /checkout/29/complete
  3. User Bob sees Drupals "Page not found"

Now the Drupal log lists the 404 (of course) and the following PHP warning (same minute) ("Location" is the visited checkout page):

Warning: Cannot modify header information - headers already sent by (output started at /…/includes/common.inc:2607) in drupal_send_headers() (line 1243 of /…/includes/bootstrap.inc).

I read (for example at #1129234: Cannot modify header information) that the cause could be a trailing blank line or PHP tag.
I wonder if this could be the cause (didn't find anything) for my case. These "headers already sent" warnings are only logged for those described cases where I visit completed checkout pages that are not from my own orders.

This is only happening for existent order IDs.

Could someone test if this is happening at his/her site, too?

Comments

no2e’s picture

Issue summary: View changes

warning → en instead of de

no2e’s picture

Issue summary: View changes

not for faked order ids

no2e’s picture

Issue summary: View changes

minor

mr.baileys’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Category: support » bug
Status: Active » Needs review
StatusFileSize
new893 bytes

I'm able to reproduce this problem. This is a bug in commerce originating from the use of drupal_not_found() and drupal_access_denied() in commerce_checkout_router().

According to the docs for drupal_access_denied() and drupal_not_found(), page callback handlers should return MENU_ACCESS_DENIED or MENU_NOT_FOUND instead of calling those fuctions.

bojanz’s picture

Status: Needs review » Reviewed & tested by the community

Nice catch.

rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Cool, I didn't know about that. Is this new behavior since Drupal 7.0 or did I just miss it ever going in?

bojanz’s picture

You missed it originally ;)

rszrama’s picture

Forsooth, I am asham-ed.

hehe Good to know it's changed - can't believe we didn't get reports sooner! : P

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

minor