Ran into a somewhat obscure bug with Strongarm / CCK via Features.
If you through caution to the wind and try to strongarm (almost) all the variables on your site, you can run into some seriously bugs if you strongarm the variable content_schema_version.
Because strongarm relies on Ctools to handle the imports and ctools relies on this variable to work properly, if it is added to strongarm, it gets deleted from the database during a revert. However, the variable never loads correctly from code, probably because ctools needs the variable to correct load stuff from code.
As a result, a bunch of CCK related stuff will break and wreak havoc on your site. (it took me half a day to track down the source of the problem)
While it's sort of a fringe case, relying on code in Ctools but which is only really leveraged by strongarm, it might still be useful at some point in time to put together a "blacklist" of variables which shouldn't be strong-armed, either because of conflicts like this one, or because the variables change frequently.
Looking at the code, it looks like it would require writing some custom hooks for strongarm rather than relying on the default stuff via ctools export, so I don't think there's a "quick fix" to this.
If there's any interest in this, I can try to knock together a patch.
But in the meantime: DON'T STRONGARM CONTENT_SCHEMA_VERSION!
Comments
Comment #1
firebus commented+1! I had the same problem. It would be nice to have some best practice documentation on what not to strongarm (or maybe the best practice is only to strongarm stuff that you are familiar with?)
for example, css_js_query_string is updated when you clear the cache. strongarming this would probably be a bad idea for certain cache configurations.
Comment #2
schultetwin commentedI also ran into this issue. What a pain. I think the proper fix is just to not allow the content_schema_version via features/strongarm.
For anyone else that runs into this issue:
Issue presents as following:
lots of "table does not exist, node_field_instance" errors.
Maybe lack of ability to add content to cck fields in nodes.
Inability to see fields in content type overview page.
1) Remove variable content_schema_version from feature (either by editing the code manually, or recreating the feature and removing the content_schema_version variable from the "strongarm" selection.
2) Set the content_schema_version variable to the version of cck you're using. You can usually find this number in content.install. As of posting this, it should be 6009. You can do this via drush:
drush vset content_schema_version 6009or php
variable_set('content_schema_version', 6009)or you can manually enter in into the variable table in the database. Remember, it's a serialize value, so it's actual database value is: "i:6009"
Good luck
Comment #3
bblake commentedThis isn't a bug, as strongarm is functioning as expected, it's more of a feature request. I also see a ticket for something very similar but a little more broad here: http://drupal.org/node/1302064. Development of the feature will be tracked through the other ticket. Closing this ticket and linked to this ticket from the other one.