I just ran
$ drush cc all -v and it tells me I have orphaned actions. I'm curious to what the actions table is for in Drupal 7 and if it's safe to just drop all the data in the actions table?
There is no button or link or even an indication that orphans exist when going to /admin/config/system/actions.
I don't really get why, but when I visit /admin/config/system/actions/orphan the orphaned actions are removed. I'm watching the Drupal log when I go to that path and it systematically removes all the orphans.
If you visit /admin/config/system/actions you will see a list of the actions currently on your system. These actions are declared in the modules (named under Action Type), and may be orphaned if a module is de-activated.
Clearing orphaned actions is fine, but if you drop the table, you will break your site.
/admin/config/system/actions/orphan. If you have orphaned actions, it will give you the opportunity to remove them. If you're using Devel module then you can simply go to your-site/devel/php and then execute the below code:
actions_synchronize(TRUE); Your question indicates you have drush so you could evaluate the command with that;
drush eval 'actions_synchronize(TRUE)'
If you need to do this on a remote install where you don't have access to drush you can add this to a custom module's .install file with a hook_update_n()
/** * Implements hook_update_n(). * actions_synchronize(). */ function yourmodule_update_7001() { actions_synchronize(TRUE); } and then execute yoursite/update.php. You can test this locally using drush updb as well.