2

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?

3 Answers 3

3

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.

2

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.

4
  • i have a bunch of actions, but i dont think they all are orphaned: img818.imageshack.us/img818/5817/2yed.jpg -- know of anyway to just delete the orphaned ones? Commented Jun 28, 2013 at 15:07
  • 3
    Go to /admin/config/system/actions/orphan. If you have orphaned actions, it will give you the opportunity to remove them. Commented Jun 28, 2013 at 15:12
  • i dont see an option for that and if i put in the path you give me with /orphan. it just redirects me back to /manage Commented Jun 28, 2013 at 15:36
  • 1
    Then you have no orphaned actions. Leave everything alone. Commented Jun 28, 2013 at 15:40
1

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.