Skip to content

Instantly share code, notes, and snippets.

@aaronschachter
Last active August 29, 2015 14:02
Show Gist options
  • Save aaronschachter/a2c287e8b142fa0737c1 to your computer and use it in GitHub Desktop.
Save aaronschachter/a2c287e8b142fa0737c1 to your computer and use it in GitHub Desktop.
Removing SMS Game view mode
  • Action Guide
  • Campaign
  • Campaign Group
  • Campaign Run
  • Fact
  • Fact Page
  • Home
  • Image
  • Static content
@aaronschachter
Copy link
Author

SELECT * FROM field_config_instance WHERE data LIKE '%sms_game%'
72 rows.

static_content fact_page, and campaign are all here. which makes sense why features hasn't removed these view modes upon features update.

Attempting to remove the sms_game array from a few fields in DS Campaign Field instance. Upon save, feature still shows as default. Clearing cache to see if it now shows up as overridden.

It doesn't, however, now there are only 63 rows with sms_game. Time to just manually remove this shit from the field_instance.inc

@aaronschachter
Copy link
Author

Removed it all from the field_isntance.inc for DS Campaign. Refreshed the http://dev.dosomething.org:8888/admin/structure/features/dosomething_campaign view and it says "rebuilding" in field instances. Refreshing again, still rebuilding. Let's see how many query results there are now. Still 63. Field isntances also says 63. Let's clear cache and see what happens, suspecting that features will be default and # of records in field_config_instance containing sms_game will be much smaller.

@aaronschachter
Copy link
Author

Ok cache cleared. Lets refresh the features page. Ok, nice it says Default. Let's refresht he DB query, 33 rows affected. Still a few campaign fields. Did I miss some? Yep, the ones at the beginning of the file. Looks liek this was the way to get rid of it when there's data within the field_config_instance table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment