FieldException: Attempt to create a field of unknown type inline_conditions. in field_create_field() (line 110 of

Comments

jkuma’s picture

Hi yktdan,

Thank you to report me this bug. May you give me more informations about your Drupal instance ?

Thanks in advance,
Jonathan

dimitriseng’s picture

I get the same error on install. Drupal 7.19 with commerce 7.x-1.7, Rules 7.x-2.3 and lots of other modules, no commerce kickstart. However, module still shows as enabled so not sure of any issues.

jkuma’s picture

Assigned: Unassigned » jkuma
jkuma’s picture

So, I've setup a drupal 7.19 instance with commerce vanilla and rules 2.3. I tried to enable commerce_discount and I can't reproduce this error. Same with just inline_conditions.

May you send me a .txt file with the complete list of your module.

ron_s’s picture

I'm receiving the same error:
FieldException: Attempt to create a field of unknown type <em class="placeholder">inline_conditions</em>. in field_create_field() (line 110 of /home/www/public_html/modules/field/field.crud.inc).

This is with Drupal 7.22, Commerce 7.x-1.7, and Rules 7.x-2.3. I think the issue is the hook_field_schema is being used to check "if ($field['type'] == 'inline_conditions')" when it doesn't exist.

Also to what table are you attempting to add the columns "condition_name" and "condition_settings"? There doesn't seem to be any hook_schema in the install file, so I'm assuming it is an existing table?

jkuma’s picture

This is with Drupal 7.22, Commerce 7.x-1.7, and Rules 7.x-2.3. I think the issue is the hook_field_schema is being used to check "if ($field['type'] == 'inline_conditions')" when it doesn't exist.

Inline_conditions is a field type, that's mean there are no reasons to create a database for it. Field API already takes care about it. hook_field_schema defines the further columns require by this field type.

Guys, Are you using commerce_discount module ? Do you have a fresh install of Drupal or are you trying to install inline_conditions on an existing instance ?

dimitriseng’s picture

I am installing it on an existing instance and at the moment only because commerce_discount 7.x-1.0-alpha2 requires it.

yktdan’s picture

Yes, commerce_discount module, existing test system in the process of being configured.

ron_s’s picture

Yes, we are using the commerce_discount module. We previously never had the Inline Conditions module installed. However the most recent update of commerce_discount (7.x-1.0-alpha2) now has a dependency with inline_conditions, which is why we installed it.

We had been using commerce_discount 7.x-1.0-alpha1+13-dev without issue.

jkuma’s picture

Status: Active » Needs work

I found your issue guys, it's during the update of commerce_discount (alpha1 => alpha2), you got an error when enabling inline_conditions module.

jkuma’s picture

Status: Needs work » Needs review

Ok, what you have to do is:

  • Disable and Uninstall completely commerce_discount.
  • Upgrade commerce_discount to alpha2 version (Delete commerce_discount folder and copy the new one).
  • Enable commerce_discount.

This way, it should work. Let me know if it's working for you.

jkuma’s picture

OK guys, we have submitted a patch to resolve that issue #2035437: Attempt to create a field of unknown type inline conditions. Please, keep me in touch if it's working for you !

jkuma’s picture

Status: Needs review » Fixed

Since I didn't receive replies from you guys, I've decided to switch the status to fixed knowing that patch #2035437: Attempt to create a field of unknown type inline conditions solves the issue according to me.

Status: Fixed » Closed (fixed)

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