I have discovered that version 1.2.1 is not working on 6 of my WP sites, both on Linux and Windows WP sites.
The main problem is that whilst WPB2D reports that it completes successfully, it completes in only about 10 seconds, and it doesn’t backup anything as far as I can see. I saw comments that many people think it is working, yet I believe that it could be a false illusion in a number of cases because of the fact that the plugin says it finishes backing up when it fact it hasn’t. Thankfully reverting to 1.2 resolves the issue on all my sites, which including 5 sites on Windows and 1 on Linux.
I’ve spent about 6 hours today debugging the issue using the ‘Backup Now’ feature, and comparing the code from 1.2 and 1.2.1. From what I can see, the lines ‘$this->zip_file();’ in both
are causing the problems. I have been unable to prove this reliably, but it seems that may be I can’t prove it due to some latency, eg. in wp-cron.php (eg. plugin comment of ‘waiting for WordPress to kick off the job’), server caching of files or some other ‘lag’ (on some of my Windows site, ‘touching’ web.config to restart IIS made the code change take effect and cause the plugin to start backing up files, whereas on others it didn’t. I’m not sure how often WP kicks of the wp-cron.php file though.). On some of my Windows sites, commenting that out immediately fixed the problem, on others it did not straight away and I had to revert to 1.2 to fix it. I wouldn’t be surprised though if that commenting out that line causes an exception elsewhere (eg. given there would be no DB zip file to backup as per the plugin code). On my Linux site, I had to revert to 1.2 to get it to work (it was forever stuck on ‘Backing up WordPress path at (/home/mydir/public_html/)’.
Either way I’m somewhat surprised that the line ‘$this->zip_file();’ doesn’t have a try/catch statement around it or in the function itself, as it seems like a likely place for the code to crash, especially with so many different server configurations around. Additionally surprising that the plugin seems to fall over totally when this fails.
This also could explain why the backup runs for 10 seconds or so, as it seems plausible that the DB backup would take that long to complete, and then upon failing to zip the file it, just finishes there, and for some reason reports a successful completion.
Whilst debugging using the ‘Backup Now’ feature , I noticed that admin-ajax.php would always return nothing (0 bytes) when the plugin was not working, and always more than 0 bytes when it was working/there was an update to the page HTML to be made with progress. I didn’t delve in any further than this in debugging the code though, without a more thorough understanding of how the plugin’s code all works. On one site I tried disabling all plugins and changing the theme to ‘twentyeleven’, but 1.2.1 would still not work, whereas 1.2 worked straight away.
Interestingly, whilst debugging, I tried deauthorising my plugins and deleting the app from within Dropbox, and for about 15 minutes was getting another plugin error that I’ve seen here in this discussion forum, as per this thread: http://wordpress.org/support/topic/plugin-wordpress-backup-to-dropbox-authorized-by-dropbox-api-but-thinks-it-failed?replies=11
Dropbox’s page was saying the plugin was authorised, yet in my settings on Dropbox, there were no App listed, and after clicking WPB2D ‘continue’, it was giving the error as per that thread.
Then on my 5 other WP sites, they all started giving the same error. I think Dropbox must have got confused for a while. After about 20 minutes the problem went away. Maybe I deauthorised or uninstalled the plugin whilst a backup job was running and Dropbox kinda got locked up.
Anyway, I hope this helps make the plugin better.
On Windows, excluding any files still does not seem to get saved in 1.2.1 either, and clicking a checkbox does the AJAX POST to admin-ajax.php, but the response again is 0 bytes. I guess there is a plugin exception in there somewhere. I could possibly look in to it further with some more info about how the plugin works, I realise you got your work cut out for you!
- The topic ‘[Plugin: WordPress Backup to Dropbox] Issues with v1.2.1’ is closed to new replies.