I'm using commerce recurring module in my project (along with few additional commerce modules like card on file, invoices and few more). Recurring was working fine around 10 days ago. Since then I continued with development of other areas.
I came back to testing recurring payments and there's a problem with it during cron job rule/acion. I get following three errors in following order
Notice: Trying to get property of non-object in commerce_product_line_item_populate() (line 1354 of /site/public/sites/all/modules/contrib/commerce/modules/product_reference/commerce_product_reference.module). Unable to get a data value. Error: Invalid data value given. Be sure it matches the required data type and format. Unable to evaluate action commerce_recurring_generate_order_from_recurring.
I'm stunned and stuck, no idea where to start looking. Everything was fine before. I installed few other modules in the meantime, also did some custom coding, but nothing that would address or impact core recurring module setup or rules. Not even sure how to start debugging it
I've discovered there's a problem with this function on line 504 in commerce_recurring.rules.inc:
$line_item = commerce_product_line_item_new($product_wrapper->value(), $recurring_entity->quantity);
This is where errors come from. $product_wrapper->value() returns an empty Array