This module creates a few instances of cvm fields to store data. This made it impossible to disable. I'm not sure why you'd be storing this information in fields. I thought this module was simply a context reaction. It ended up being too unwieldily for me to use. Per node contextual view mode reactions seems like overkill but maybe that was just my use case.

Comments

ravencoder’s picture

I have also problems uninstalling. Perhaps the author can provide steps on how we can uninstall this module.

frank ralf’s picture

The reason is that the module creates a field_cvm_cvm in the field_config table which seems to be active ("1") by default even when the field isn't actually used.

Deactivating that field by changing the value in the active column to "0" lets you disable and uninstall the module.

hth
Frank

Contextual View Modes on modules page

CVM field in field_config table

frank ralf’s picture

frank ralf’s picture

I had a little peek under the hood of the module:

The field is created by the function contextual_view_modes_enable() in the .module file and not as usual from the .install file. So it gets created and enabled when enabling the module and never gets deactivated or uninstalled again using the usual Drupal procedures. IMO that's a bug.

sherakama’s picture

Thanks for the updates guys.

I have changed the module so that the field is defined in a sub module. This allows the parent module to uninstall and remove all of the fields and field information. Check out latest development branch for this update.

sherakama’s picture

Status: Active » Needs review
frank ralf’s picture

StatusFileSize
new15.69 KB

Hi Shea,

Thanks, that's much better. Now the parent module indeed uninstalls and removes all of the fields and field information.

The only thing I find a bit awkward is the procedure to uninstall the CVM Field sub module itself:

  1. Deactivate the parent module.
  2. Uninstall the parent module.
  3. Only then can you deactivate the sub module.
  4. Uninstall the sub module.

CVM Field sub module

Perhaps uninstalling the parent module should uninstall the sub module automatically at the same time?

Thanks for this great module!

Frank

frank ralf’s picture

StatusFileSize
new15.91 KB
sherakama’s picture

I will roll this into a new point release if someone can mark it RBTC.

Thanks,

  • sherakama committed de6018f on 7.x-2.x
    Issue #2120467 - Split field into own module to resolve uninstall issue
    
sherakama’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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