As first reported in the Drupal Commerce issue queue - http://drupal.org/node/1317742 - if I delete an order from the order list in Drupal Commerce I get this error:

Notice: Undefined index: path in redirect_delete_by_entity_path() (line 802 of /home/pg29189/public_html/sites/all/modules/redirect/redirect.module).

And loose all my configured redirects.

Comments

danreb’s picture

I have the same problem too

Notice: Undefined index: path in redirect_delete_by_entity_path() (line 802 of /home/cocovie/public_html/sites/all/modules/redirect/redirect.module).

dave reid’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Active » Fixed

My apologies about the data loss. This seems to be a bug caused by not checking if entity_uri() returns a FALSE result. I have fixed the bug and committed to the 7.x-1.x-dev branch with http://drupalcode.org/project/redirect.git/commit/dd11452

Status: Fixed » Closed (fixed)

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

vasike’s picture

Status: Closed (fixed) » Needs work

i have this error for deleting products within a rule.

it seems that entity_uri() returns something but has no "path" index.
so maybe a cheking of the path in the entity_uri() return should be also present

dave reid’s picture

Status: Needs work » Closed (fixed)

That case would be a bug in whatever entity implements the uri callback then because that's plain invalid. You should file a new issue in Commerce with your results.

Anonymous’s picture

Status: Closed (fixed) » Active

Reopening this, as I still get the following error message with the latest dev (and beta4 as well) when deleting orders through the commerce UI:

Notice: Undefined index: path in redirect_delete_by_entity_path() (line 814 of .../redirect/redirect.module).

dave reid’s picture

Project: Redirect » Commerce Core
Component: Code » Order

Moving this issue over to Drupal commerce. The bug here is that calling entity_uri() on a commerce order returns an array with a 'path' key, instead of FALSE which is the proper result if there is not an URI for the entity.

dave reid’s picture

Project: Commerce Core » Redirect
Component: Order » Code
Status: Active » Fixed

This seems to be handled by #1392654: Commerce can return invalid return values for uri callbacks. in Drupal Commerce already, so moving this issue back to Redirect for posterity. @dro0x, you'll want to follow #1392654: Commerce can return invalid return values for uri callbacks. for futher updates.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Typo