Download & Extend

Impossible to create a new coupon type

Project:Commerce Coupon
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Nothing fancy, Drupal 7.15 installed, drupal commerce and commerce coupon (plus dependencies)
Create my first coupon type and it crashed right here. This is the error:

FieldException: Attempt to create a field of unknown type "number_integer". in field_create_field() (line 110 of /var/www/sites/drupal7/modules/field/field.crud.inc).

it's related to commerce_coupon_number_of_uses

I've tried with Drupal 7.13 also and have the same error.

Of course the whole site is down because there is half the entity created in the database.
When refreshing the page I have this error:

Recoverable fatal error: Argument 2 passed to entity_views_field_definition() must be an array, null given, called in /var/www/sites/default/modules/contrib/entity/views/entity.views.inc on line 152 and defined in entity_views_field_definition() (line 175 of /var/www/sites/default/modules/contrib/entity/views/entity.views.inc).

Comments

#1

This is because there is a missing dependency with the module Number

Could someone patch this ?

#2

Priority:critical» normal
Status:needs review» postponed (maintainer needs more info)

Do you have "number" module installed? that comes with core.

#3

Status:postponed (maintainer needs more info)» needs review

Experienced the same problem. Site database was fouled up so badly I had to start from scratch!

Module needs to include Number module as a dependency as it can be installed without it but it seems to be absolutely critical. One line patch attached.

AttachmentSize
1787434-fix-depencies-3.patch 369 bytes

#4

Version:7.x-1.0-beta6» 7.x-1.x-dev
Status:needs review» fixed

Thanks for the catch and the patch!

Committed!

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.