Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Developer experience
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2011 at 12:56 UTC
Updated:
25 Apr 2013 at 16:51 UTC
When I delete an order from my orders list, I get this error:
Notice: Undefined index: path in redirect_delete_by_entity_path() (line 802 of [path redacted]/sites/all/modules/redirect/redirect.module).
The delete still goes through.
Comments
Comment #1
rszrama commentedLooks like a problem with the Redirect module to me. Perhaps it ought to be checking for a path instead of assuming the entity is going to return a valid URI. In our case, I'm betting that it's not returning one because there is no view access for deleted orders. : ?
You might try posting a support request in that queue. Perhaps there's a way to ignore the Order entity in the Redirect module?
Comment #2
vasikeit seems we're back with this issue here #1349212-5: Deleting an order from Drupal Commerce erases all redirects
they say there that it's a Commerce issue with the uri callback
what else i can say: that i get this error for deleting products within a rule
Comment #3
mr.baileysThis is actually a Commerce bug in that, strictly speaking, an URI callback is not allowed to return FALSE or NULL, and instead always has to return a valid array with a 'path' key/value. Commerce does return NULL/FALSE in a number of uri callbacks, including commerce_order_uri().
Marking this issue as a duplicate of #1392654: Commerce can return invalid return values for uri callbacks..
Comment #4
tmsimont commentedI'm pretty sure things have changed in the Entity API and this fix should now originate in the redirect module. I made a comment in the supposed duplicate issue: http://drupal.org/node/1392654#comment-7344176
I'm marking this as active again because I'm fairly certain that with the change in the API this error now is the redirect module's responsibility.
I could be wrong.. if so... sorry! just close it again.
Comment #5
dave reidRedirect has already been fixed to account for a NULL/FALSE value:
Comment #6
rszrama commentedComment #7
tmsimont commentedI got this error even though that code is present... I had to add another line to make it go away:
I'm honestly not sure why that was the case -- somehow $uri was getting set but not $uri['path'] i guess... i do have some unusual checkout configurations (http://drupal.org/sandbox/tmsimont/1891426) so I guess it could be related with other things i'm doing.
Comment #8
dave reidReturning an empty $uri['path'] is not a valid result from the function, so if that's still an issue it needs to be fixed upstream.
Comment #9
tmsimont commentedyep. my bad