When I browse to the Create Feature page, I get 2 instances of the following commerce_coupon error:
Notice: Trying to get property of non-object in commerce_coupon_type_features_export_options() (line 36 of /Users/kendow/Sites/bluewaterlearns.local/profiles/commerce_deploy/modules/contrib/commerce_features/commerce_coupon_type.features.inc). Backtrace:
commerce_coupon_type_features_export_options('commerce_coupon_type')
call_user_func_array('commerce_coupon_type_features_export_options', Array) features.module:582
features_invoke('commerce_coupon_type', 'features_export_options') features.admin.inc:599
_features_export_build(NULL, Array) features.admin.inc:350
_features_export_form_components(Array, Array) features.admin.inc:210
features_export_form(Array, Array)
call_user_func_array('features_export_form', Array) form.inc:841
drupal_retrieve_form('features_export_form', Array) form.inc:350
drupal_build_form('features_export_form', Array) form.inc:130
drupal_get_form('features_export_form')
call_user_func_array('drupal_get_form', Array) menu.inc:517
menu_execute_active_handler() index.php:21
The referenced section of commerce_coupon_type.features.inc is:
/**
* Implements hook_features_export_options().
*/
function commerce_coupon_type_features_export_options() {
$feature_types = array();
$coupon_types = commerce_coupon_get_types();
if (!empty($coupon_types)) {
foreach($coupon_types as $type) {
$feature_types[$type->type] = $type->label;
}
}
return $feature_types;
}
There is only the default coupon type (discount_coupon) and no coupons have been created yet. I searched the Commerce Coupon issue queue and nothing turned up there. Thoughts?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | commerce_coupon-2469643-1.patch | 1.22 KB | discipolo |
Comments
Comment #1
discipolo commentedcould be you need this patch
projects[commerce_features][patch][1973602] = "https://www.drupal.org/files/issues/make_commerce_checkout-1973602-8.patch"
projects[commerce_features][patch][2173529] = "https://www.drupal.org/files/issues/commerce_features-commerce_coupon-2...."
Comment #2
thekenshow commentedThanks! Downloaded the latest commerce_deploy, applied this patch and ran rebuild.sh without error. When I apply the new profile to my site (removing everything but ~/sites and then copying commerce_deploy into place), I get the following dependency issue message when running drush updb:
The inline_entity_form in profiles/commerce_deploy/modules/contrib has no version number:
The commerce_deploy make file does not have an entry for inline_entity_form.
I went ahead with the database update and confirmed that the commerce_coupon_type_features_export_options error message no longer appears on the Create Feature page. Will review the rest of my site functions to confirm that nothing new is broken :-)
Comment #3
discipolo commentedComment #4
thekenshow commentedJust upgraded to the latest (May 1st) commerce_deploy and the "Trying to get property of non-object in commerce_coupon_type_features_export_options()" error message has returned. I can see that the features module version was changed to 2.5 in the latest commerce_deploy (as per the patch above) but the accompanying features patches didn't make it. Added those into commerce_deploy/drupal-org.make:
Ran rebuild.sh and updated my site with the result (delete everything except ~/sites, copy in generated commerce_deploy site).
UPDATED: The coupon error DID clear, but I'm now seeing the same "Unresolved dependency Inline Entity" warning I described above:
Prior to the update, `drush pmi inline_entity_form` returned:
After update, they're empty:
Looking at commerce_deploy_product.make, I see:
Looking into commerce_coupon: before the update, `drush pmi commerce_coupon` returned:
After update, it they are empty:
Looking at commerce_deploy_promotions.make, I see:
Maybe your `We have to mark a version, otherwise dependencies will be angry` comment is related? Not sure where to head on this.
Comment #5
mglamanThis fix was committed to Commerce Features, profile is now using updated module in dev.