I just spent about 3 hours on researching the issue, turns out there were multiple points of failure, and I am not sure if the ones I found would apply to everyone, but I think these were major ones…
1. A conflict with the NextGEN Gallery.
Turns out NextGEN does not check if a script file exists before trying to include it. They simply suppress the error by using the @ syntax.
However, ai1wm installs its own error handler which logs EVERY error. This causes the log to grow constantly because these silent errors happens on every request server.
As a quick and dirty fix, you should add this to your error_handler to ignore file inclusion errors.
if ($errstr && strpos($errstr, "include_once") !== FALSE) {
return;
}
The correct approach, however would be hooking the error handler only when routing your plugin’s methods that handle the export process. ai1wm should be as little intrusive as possible when handling “foreign” requests.
2. Hanging at “Done creating an empty archive”
You are doing a wp_remote_get() to route internal steps to the next handler, however you are not checking the result for failures. In my case, I am using an .htaccess rule to allow access to the admin-ajax.php to a very small number of hosts (my home network only), and the server itself wasn’t in the list of allowed hosts. The wp_remote_get was being blocked by Apache, but because you aren’t checking for errors, the export process simply stops here and never moves past step 1. Adding my server’s IP address to the allowed hosts list has fixed the issue.
3. A conflict in the Wassup plugin
When processing the “export” action, I noticed the following error in Apache’s log file:
PHP Fatal error: Call to undefined method Akismet::isSpam() in /home/alloyphoto/public_html/wp-content/plugins/wassup/wassup.php on line 2561
This also caused the action to terminate.
Basen on this thread I simply removed the file “akismet.class.php” in Wassup’s “/lib/” folder.
I didn’t have the time nor the energy to research this any further, so I don’t know why this error happens only when serving the routed request for the internal steps of the export operation, but removing the file has helped – the request finally reached the appropriate handler and I was able to create and download the export file.
I am hoping you would be able to pick things up from here and make appropriate adjustments to your plugin, which we all would be able to enjoy using again ??
Regards,