I meant Filefield PATHS in Title -- long day. .

I'm not sure why, but the latest update seems to cause problems with Drupal Commerce. I've seen no comments or documentation to this effect, but disabling Filefield Paths appears to get rid of the Unsupported operand types in . . .commerce/modules/cart/commerce_cart.module on line 830 issue at least so far.

Could be a commerce issue, but it did only occur after most recent update to this module. FF Paths was installed prior and no other meaningful changes. Happy to provide more info if it helps.

CommentFileSizeAuthor
#6 9WLI7V.png2.17 MBGray Fox

Comments

markandrewsutton’s picture

Project: File (Field) Paths » Commerce Core
Issue summary: View changes

Used the wrong title - I wanted to clarify

deciphered’s picture

Title: Filefield Sources 7.x-1.0-beta3 and Drupal Commerce » Filefield Pathss 7.x-1.0-beta3 and Drupal Commerce
Project: Commerce Core » File (Field) Paths

Hi markandrewsutton,

Can you tell me where and when the error occurs? Simply installing the modules don't appear to be enough.
Also, the version of Commerce could be helpful.

Cheers,
Deciphered.

deciphered’s picture

Just for your note, the line in question that is error has so little to do with FFP that I would find it very difficult to see how it could be related, but I would still like confirmation.

petrovnn’s picture

I confirm this problem. Many times I have unfolded the backup site and update the modules one by one, until I realized that the reason for the error FFP (or maybe commerce). I do not know how, but FFP conflict with the sub-module of Commerce - CART.

The error occurs when we are the second time we put any product in the basket. If you try to go to the basket (/ cart) - site stops working altogether. In other cases, the error can occur during the removal of goods from the basket.

I think that Commerce_cart.module (or Commerce) also has some unresolved bugs.

I am using Ajax Cart, but I think it is not important, because error occurred at the site where there were no other Ajax Cart.

I'm using the latest stable version of Commerce 7.x-1.2 and the latest stable version of FFP - beta3.

They are completely can't work together!

I do not want to abandon FFP, becouse me need it for SEO for my shop.

I do not know how to solve it, but at the moment is not compatible with beta3 Commerce. FFP beta 2 works with commerce normally.

petrovnn’s picture

Perhaps this bug Commerce somehow influences on FFP beta3?
http://drupal.org/node/1253114

UPD.
Before crash may shown this Commerce error:

Notice: unserialize() [function.unserialize]: Error at offset 0 of 5 bytes in function commerce_price_field_load() (string 88 in file \sites\all\modules\commerce\modules\price\commerce_price.module).

markandrewsutton’s picture

I'm using Commerce 7.x-1.2. I can confirm the issue here occurs when adding or removing a product to the cart.

Basically, adding a second item to the cart, or removing the first causes WSOD and "Unsupported operand types in commerce_cart.module on line 835." This occurs on any cart page or any page displaying a cart block (every page on a default Commerce Kickstart install).

I'm pretty sure I've narrowed this down to filefield_paths_entity_update($entity, $type).

Adding a dpm($type) to the function confirms that it is firing during the add-cart process. In fact, it's firing at least twice. As a proof of concept, I tried this and it's working:

function filefield_paths_entity_update($entity, $type) {
  if ($type != 'commerce_order' && $type != 'commerce_line_item') {
   
    do function. . . 

  }
}

Not a long term solution, but I hope it helps get to one.

Gray Fox’s picture

Priority: Normal » Major
StatusFileSize
new2.17 MB

#5 fix didn't work for me works only if done before module installation; I had to roll back my database, since it was made unusable (same error happens whenever trying to add products to cart), even after I fully uninstalled filefield_paths (though the problem does only happen after installing the module). The error happens at $data = $line_item_wrapper->commerce_unit_price->data->value() + array('components' => array()); because $line_item_wrapper->commerce_unit_price->data->value() returns FALSE (even though product price is set and can be seen when var_dump-ing $line_item_wrapper->commerce_unit_price). I attached complete error trace.

deciphered’s picture

Project: File (Field) Paths » Commerce Core
Version: 7.x-1.0-beta3 » 7.x-1.2
Component: Code » Cart

The specifics of the issue is this, if field_attach_update() is invoked inside of hook_entity_insert() during the addition of a product to a Commerce cart then Commerce will break.

The reason why the issue is currently occurring in File (Field) Paths beta3 is due to a re-architecture, however I'm not doing anything that I should be doing.

Therefore I am classing this as not an issue with File (Field) Paths, but an issue with Commerce.

I'd be happy to help with the issue if I can and have the time.

Cheers,
Deciphered.

rszrama’s picture

Priority: Major » Normal

Will look at it when I can... field troubles abound. : P

batigol’s picture

Status: Active » Closed (duplicate)

This issue is not related with FFP. @Deciphered is right, I have test it 'to the ground' and it's commerce, eventually drupal core related. @markandrewsutton here you can find issue you have been talking about - http://drupal.org/node/1446000

I'm closing this as a duplicate.

batigol’s picture

Issue summary: View changes

I'm an idiot