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
Comment #1
danreb commentedI 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).Comment #2
dave reidMy 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
Comment #4
vasikei 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
Comment #5
dave reidThat 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.
Comment #6
Anonymous (not verified) commentedReopening 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).
Comment #7
dave reidMoving 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.
Comment #8
dave reidThis 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.
Comment #9.0
(not verified) commentedTypo