I had 7.x-1.0-beta1 installed originally. In trying to resolve #1221580: Completion of an order isn't issuing file licenses, I upgraded to latest dev. That didn't fix the issue, but after re-reading the description of the previous issue, it appears I need to completely uninstall this module then reinstall it with latest dev version for changes in the dev to take effect.

That's the problem. I'm unable to disable and/or uninstall the module as it's listed as in use by Drupal fields. I've removed any fields that were using Commerce File (there was only one). In the field list, however, it shows the field name "commerce_file_license_file (Locked)" with type "Commerce File (module: Commerce File)" used in "Commerce File License". Sounds, to me, like it's referring to its own fields somehow? How can I properly get the dev version of this module installed? This is on a site that's pretty far along in development, so wiping and starting from scratch isn't an option.

"Beta beware", I know, but there is nothing indicating that the module is un-removeable once installed.

Comments

urban farmer’s picture

I had the same problem a few days ago. I had to delete everything associated with the file, the orders, the customer, the product page, the commerce files in the store... then I was able to deactivate the module. I was surprised at everything I had to delete. I think I may had had to deactivate a few dependent modules as well. Wish I could be more specific, but I hope this helps.

scottrouse’s picture

Thanks for your help. I am still unable to get it disabled. I tried some database tricks to allow me re-run the install script for that module, but that didn't appear to help.

RKS’s picture

Priority: Major » Critical

This issue is critical due to this issue http://drupal.org/node/1325722#comment-5177308

RKS’s picture

So I deleted the instances from the field_config in the database and it allowed me to disable and uninstall the module, now it returns another fatal error:

Fatal error: Class 'CommerceFileLicenseEntityUIController' not found in /var/www/html/el/eldorain.com/sites/all/modules/entity/entity.module on line 937

trampjuice’s picture

Fatal error: Class 'CommerceFileLicenseEntityUIController' not found in /home/eviction/public_html/sites/all/modules/entity/entity.module on line 893

After simply upgrading from drupal-7.8 to drupal-7.9 core. (update.php)
also get
Fatal error: Call to undefined function commerce_file_field_property_info_callback() in /home/eviction/public_html/sites/all/modules/entity/modules/field.info.inc on line 30

every time I try to login. Site is broken. Going to have to wipe the work I have done and redo everything from a backup, then clear the commerce file licence module and retry to upgrade the core to 7.9 again.

trampjuice’s picture

Component: User interface » Code
Category: support » bug

Tried to uninstall this module by using drush and no go...

drush pm-disable commerce_product

The following extensions will be disabled: commerce_product, commerce_product_re
ference, commerce_product_pricing, commerce_cart, commerce_file, commerce_produc
t_pricing_ui, commerce_product_ui, commerce_tax, commerce_tax_ui
Do you really want to continue? (y/n): y
PHP Fatal error:  Class 'CommerceFileLicenseEntityUIController' not found in C:\
xampp\htdocs\evictionsfrom10pounds.com\sites\all\modules\entity\entity.module on
 line 893

Fatal error: Class 'CommerceFileLicenseEntityUIController' not found in C:\xampp
\htdocs\evictionsfrom10pounds.com\sites\all\modules\entity\entity.module on line
 893
Drush command terminated abnormally due to an unrecoverable error.       [error]

Error: Class 'CommerceFileLicenseEntityUIController' not found in
C:\xampp\htdocs\evictionsfrom10pounds.com\sites\all\modules\entity\entity.module
,
line 893
luchoh’s picture

Workaround before the contributors implement the real solution:

1. (Optional) If you are in broken state, get the original module again and install it with drush: drush [@<your site alias>] en commerce_file

2. Delete the field references as per #4

3. (Optional, but recommended) Clear the cache: drush [@<your site alias>] cc all

4. Open the commerce_file.module and comment out/delete the lines between 74 and 79:

admin ui' => array(
'path' => 'admin/commerce/file-licenses',
'file' => 'commerce_file_license.forms.inc',
'file path' => $module_path . '/includes',
'controller class' => 'CommerceFileLicenseEntityUIController',
),

5. Disable the module with drush: drush [@<your site alias>] dis commerce_file;

6. Remove the view User Licensed Files - there is a menu associated with it.

Disclaimer:
1. I am not experienced enough with Entity to be sure the above instructions are perfect, but I was able to get rid of the module and my site is back online.
2. I hope the module contributors will figure this out quickly - I suspect it is as simple as implementing hook_uninstall in the commerce_file.install.
3. Last but not least - I am not sure the drush part of the above instruction can be performed from the UI.

recrit’s picture

Status: Active » Needs review

just committed initial effort to address this issue...

  1. This commit fixes the fatal errors seen above regarding CommerceFileLicenseEntityUIController - http://drupalcode.org/project/commerce_file.git/commit/cf791e2
  2. Drupal core's field module now blocks disabling any module that defines a field type if that field type is still being used in a field instance somewhere. This blocks anyone from disabling this module since some fields get programmatically added during install. This is addressed in http://drupalcode.org/project/commerce_file.git/commit/277390f with a temporary fix to set this module's weight heavier than the field module and implementing commerce_file_system_info_alter() to eliminate programmatically controlled fields that will be removed on uninstall of commerce_file.
    • Future Plans for long term fix: separate license entity and field into separate modules. Then uninstalling the license entity module would remove all field instances allowing the uninstall of the field module.

To test:
Download and review: http://drupalcode.org/project/commerce_file.git/snapshot/277390f.tar.gz

recrit’s picture

marking as fixed. please re-open if issue exists with latest dev on a clean install

recrit’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

jackrowe’s picture

this module has farked me up good and wasted days and days of work. same problem as other folk here, couldnt uninstall the damn thing. still struggling getting the same fatal error.

jackrowe’s picture

heres how i solved the problem:

1) deleted the instances from the field_config in database - thanks RKM

2) deleted the whole damn folder

3) cleared cache

4) voila its gone :)

appreciate the work on this module though guys, will check back when it's workin again ;)

basvredeling’s picture

This is a horrible update path blocker. I found myself in the midst of a broken site after an update and encountering this error.
I resolved this in the ugliest way possible:

  • First by opening the system table in the db and setting the field module status to 0.
  • Next, I've disabled every dependent module missing field until I got access to drush cc all without php errors.
  • Once that was done I ran all db updates and reenabled all previously disabled modules.

ughhh, now I feel dirty.