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.
When viewing an order, I'm getting the notices below:
Notice: Undefined index: path in template_preprocess_entity() (line 820 of /home/ampsound/public_html/sites/all/modules/entity/entity.module).
Notice: Undefined index: path in template_preprocess_entity() (line 821 of /home/ampsound/public_html/sites/all/modules/entity/entity.module).
Comment | File | Size | Author |
---|---|---|---|
#21 | 1233226-21.commerce_payment_transaction_access.patch | 2.56 KB | rszrama |
#12 | order-1233226-12.patch | 694 bytes | illuminatedgeek |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedAre you using a custom template or the Display Suite per #1206788: Undefined index in theme subsystem on view order page?
Comment #2
PI_Ron CreditAttribution: PI_Ron commentedIm using Display suite, and have a done suggestions in above issue.
Comment #3
brunorios1 CreditAttribution: brunorios1 commentedsame here...
. using garland theme
. not using display suite
Comment #4
amfis CreditAttribution: amfis commentedAny update?
same here
- using 'seven' theme for admin view (
?q=admin/commerce/orders/1/view
)- the same using garland theme and looking into user orders (
user/1/orders/1
)- not using display suite
Applied some "minor" fix to it.. dunno if it is proper one:
- added $uri['path'] checking
Moved to Entity API because this is not Drupal Commerce issue.
Comment #5
amfis CreditAttribution: amfis commentedComment #6
fagoI don't see an issue with the code, as $uri['path'] needs to be there if an uri is returned. So I guess there is a wrong entity-uri implementation in commerce?
Also there is actually no patch, please follow patch creation docs.
Comment #7
amfis CreditAttribution: amfis commentedMight be, because $uri['path'] for some elements is empty.
I've added additional if statement to check for existence. After doing this, everything works fine so far.
Comment #8
stopshinal CreditAttribution: stopshinal commentedI'm also receiving the same errors on all of my order pages. It's first visible under default settings for the review order checkout page. I'm a bit of a newbie, how can I make this go away?
*edit , no display suit, a pretty much bare install
Comment #9
amfis CreditAttribution: amfis commentedWell.. you can use quick hack for entity.module at line ~ 860 as mentioned in #4.
Comment #10
dcarr CreditAttribution: dcarr commented#4 as a quick fix worked for me. Is that just a quick workaround, or will there be a patch available for this change?
Comment #11
amfis CreditAttribution: amfis commentedDon't think so..
Comment #12
illuminatedgeek CreditAttribution: illuminatedgeek commentedI generated a patch based on the code above against the dev branch; it appears to fix the problem. Also since it patches the Entity API, I'm moving the issue back into that project.
Comment #13
fagoAs stated in #6, I think the code in the entity API is right. Please check commerce implementations.
Comment #14
Nikit CreditAttribution: Nikit commentedEnabling "Customer UI", submodule of Commerce, help me for this...
Comment #16
wesleydv CreditAttribution: wesleydv commentedAs mentioned in #14 enabling Customer UI also solved the problem for me.
Comment #17
amfis CreditAttribution: amfis commentedIt was enabled - "Customer UI" in my issue.
Comment #18
StryKaizerSame issue here, Enabling Customer UI fixxed the issue
Comment #19
mr.baileysDuplicate of #1392654: Commerce can return invalid return values for uri callbacks..
Comment #20
Antoine_k CreditAttribution: Antoine_k commentedIf I may, I have coped with a similar problem for days...
My problem was connected to a view displaying Payments. It displayed exactly the same error messages.
After debugging, I found out that on commerce_payment_ui.module, on line 186, the test was wrong:
Indeed, the function commerce_payment_transaction_access needs respectively as arguments: the operation ('view' is right), the transaction (NOT THE $ORDER) and then the $user_account (facultative).
So I rewrote the line as follows (just remove "$order, "):
And it works fine, I don't get any error message now!
It also fixes another error message "Undefined property $role".
Comment #21
rszrama CreditAttribution: rszrama commentedGreat lead, Antoine_k. Upon further inspection, there were several places where we passed the wrong arguments to commerce_payment_transaction_access(), likely relics of the code before we added commerce_payment_transaction_order_access(). They didn't cause any tests to fail because the order entity had an order_id property just like the payment transaction entity, so it loaded and passed the generic order level access checks just fine.
Attaching a patch for test bot to confirm.
Comment #22
rszrama CreditAttribution: rszrama commentedAccidentally committed / pushed this with another patch while I was coming back to check the test bot status. Fortunately all was well, so I committed a simply whitespace fix to note this in the changelog. :-/
Comment #24
adam1 CreditAttribution: adam1 commented@ rszrama: Having the above issue using Omega-Theme, I would like to use your patch but I don't know, for which version of Drupal Commerce the patch is intended: for the last stable release or the dev-version?
Thanks!
Comment #25
aspilicious CreditAttribution: aspilicious commentedUsing latest kickstart in combination with DS I still get these warnings on the confirmation step AND when a user looks at his orders:
Notice: Undefined index: path in template_preprocess_entity() (line 1020 of /data/sites/bram.peleman-industries-unibindshop.dev/www/sites/all/modules/contrib/entity/entity.module).
Notice: Undefined index: path in template_preprocess_entity() (line 1028 of /data/sites/bram.peleman-industries-unibindshop.dev/www/sites/all/modules/contrib/entity/entity.module).
Notice: Undefined index: path in template_preprocess_entity() (line 1020 of /data/sites/bram.peleman-industries-unibindshop.dev/www/sites/all/modules/contrib/entity/entity.module).
Notice: Undefined index: path in template_preprocess_entity() (line 1028 of /data/sites/bram.peleman-industries-unibindshop.dev/www/sites/all/modules/contrib/entity/entity.module).
Comment #26
rszrama CreditAttribution: rszrama commentedThis patch has been included in Commerce Kickstart 2.x, so it appears you have a separate issue. Go ahead and check the Kickstart queue to make sure it hasn't already been reported; if not, I'd open an issue in that queue, as perhaps it's just the Omega Kickstart theme missing some parameter. : ?
Comment #27
giorgio79 CreditAttribution: giorgio79 commentedUsing plain commerce, I am also getting #25
Notice: Undefined index: path in template_preprocess_entity() (line 1020 of entity/entity.module
PS: enabling commerce_customer_ui solved it for me as well :P
Comment #28
fewgoodmen CreditAttribution: fewgoodmen commentedError on /checkout/8/review page
Notice: Undefined index: path in template_preprocess_entity() (line 1020 of /home2/My Domain_name/public_html/carriconec/sites/all/modules/entity/entity.module).
Notice: Undefined index: path in template_preprocess_entity() (line 1028 of /home2/My Domain Name/public_html/carriconec/sites/all/modules/entity/entity.moduule)
I am getting the same problem could you tell me how to apply this patch
current version of Drupal being used: 7:20
Comment #29
rszrama CreditAttribution: rszrama commentedYour issue is different from this one, and since this was marked closed (fixed), that's an indicator that the patch for this issue has already been committed - as of October 2012, in fact. There's another open issue about path variables you can follow along through - but basically, I think it might just be an incorrect assumption in the Entity module.
Comment #30
FiNeX CreditAttribution: FiNeX commentedI've the same error with Drupal Commerce and Customer UI enabled (I'm not using Kickstart):
P.S: Drupal 7.22, Entity API 7.x-1.0, Commerce 7.x-1.6.
Comment #31
fatfish CreditAttribution: fatfish commentedSame here.
I'm using costume lineItem