johncoswell
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Can’t access wp-admin after upgradeWhat version of WordPress are you running?
Forum: Fixing WordPress
In reply to: Attach image to post from media libraryI second that, I’m using attachments in a programmatic way much more lately and having them automatically attach to the post that they’re being uploaded from would make my life a lot easier.
Forum: Plugins
In reply to: Anyone unit-testing his plugins?I changed my GitHub name, so new link: MockPress
Forum: Plugins
In reply to: Anyone unit-testing his plugins?I’m doing unit testing on my plugins. One has a full set of tests, one I’m completely refactoring for proper unit testability, and one has no tests and really should have more than that. 🙂 I’m working on a full WordPress mock library so that one can simulate WordPress and set up test expectations in your unit testing framework. Try it out and let me know what you think: MockPress.
Forum: Plugins
In reply to: [Plugin: WP Super Cache] super cache and php speedyOK, can you do a little diagnostic for me? Right after:
$output_buffer_handlers = ob_list_handlers();can you add:
error_log("buffers: " . implode(", ", $output_buffer_handlers));And then post the result from your error log? I want to see what the status of the buffers on your machine looks like when you hit that point in the code.
Forum: Plugins
In reply to: [Plugin: WP Super Cache] super cache and php speedy@ulfben, http://pastebin.com/mde7a944 — Lines 455-460
Forum: Plugins
In reply to: [Plugin: WP Super Cache] super cache and php speedyI believe I have a solution to this problem. PHP Speedy’s output buffering gets stacked below WP Super Cache’s, and the way that WP Super Cache handles working with its own output buffer doesn’t take this into account. The buffers below WP Super Cache’s need to be resolved before WP Super Cache can continue with its page processing. I’ve come up with the following code which seems to allow PHP Speedy and WP Super Cache to play nicely together. This replaces the standalone
@ob_end_flush()in wp-cache-phase2.php://back up through any output buffers until we get to us $output_buffer_handlers = ob_list_handlers(); while (count($output_buffer_handlers) > 0) { @ob_end_flush(); if (array_pop($output_buffer_handlers) == "wp_cache_ob_callback") { break; } }