Title: plugin stops executing after action
Last modified: August 18, 2016

---

# plugin stops executing after action

 *  [libtek](https://wordpress.org/support/users/libtek/)
 * (@libtek)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/plugin-stops-executing-after-action/)
 * Hi,
 * I’m writing a plugin that uses add_action and add_filter. The action needs to
   be done first, but the problem is: the action works, but then all processing 
   stops. The filter doesn’t even get a chance to run.
 * Any ideas?
 * Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [petit](https://wordpress.org/support/users/petit/)
 * (@petit)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/plugin-stops-executing-after-action/#post-355199)
 * Are you sure that you return the modified indata at the end of action execution?
   
   [http://codex.wordpress.org/Plugin_API](http://codex.wordpress.org/Plugin_API)
 *  Thread Starter [libtek](https://wordpress.org/support/users/libtek/)
 * (@libtek)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/plugin-stops-executing-after-action/#post-355391)
 * I’m returning exactly what was passed to it. I’m not modifying the data either,
   just writing the data to a file and that’s it:
 * add_action(‘feedwordpress_update’, ‘blt_check_url’);
 * function blt_check_url($feed)
    { $file1 = “/www/example.com/htdocs/wp-content/
   plugins/url.txt”; $fh = fopen($file1, ‘w’); fwrite($fh, $feed); flcose($fh); 
   return $feed; }
 *  [petit](https://wordpress.org/support/users/petit/)
 * (@petit)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/plugin-stops-executing-after-action/#post-355402)
 * I don’t know PHP, but other languages, so I understand what that function does.
   My guess is that something happens in the I/O system call, that makes it hang.
 * Loose shot again – can’t make that a habit 🙂
 *  [CalEvans](https://wordpress.org/support/users/calevans/)
 * (@calevans)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/plugin-stops-executing-after-action/#post-355413)
 * [@libtek](https://wordpress.org/support/users/libtek/),
 * A few old-school debugging techniques.
 * 1: After the line:
    $fh = fopen($file1, ‘w’);
 * drop a :
    var-dump($fh);
 * in there. Run it and see if you get anything. If you get a null or a false then
   you are not opening the file. if you don’t get anything then take the line back
   out.
 * 2: Check the permissions on the file to make sure that the user that apache is
   running as has permission to open and write to the file.
 * HTH,
    =C=

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘plugin stops executing after action’ is closed to new replies.

## Tags

 * [action](https://wordpress.org/support/topic-tag/action/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [programming](https://wordpress.org/support/topic-tag/programming/)

 * 4 replies
 * 3 participants
 * Last reply from: [CalEvans](https://wordpress.org/support/users/calevans/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/plugin-stops-executing-after-action/#post-355413)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
