Undefined indexes breaking plugin


#1

There are a a few issues with the plugin that causes it to fail to purge at certain times, in particular future posts and when trashing some posts. I’ve fixed the issues by modifying some of the plugin files.

Issue 1 about future posts deals with custom post types and the key custom_post_types_recognized, which is only referenced on one line in the code, nginx-helper.php, row 119. This key is never set anywhere in the admin interface and causing an undefined index error.

Issue 2 is the purge archive on trashing post: The admin page and the database uses “purge_archive_on_del” as the key to store whether or not to purge the cache, while the purger looks for the key “purge_archive_on_delete” and thus fails with undefined index. Changing either of those to the other will fix the issue.

I hope this could be of help to others having issues.


#2

@d_a

Thanks for sharing your solution.


#3

Hi @d_a,

We have fixed that notice and corrected the key in purger.php, it will be available in next update of plugin by this weekend.


#4

Thank you for providing a proper fix for the issue.

Another issue we’re having on an ECS-server where we host multiple clients is that the “Purge” button doesn’t not only purge the current site, but all other sites as well. Would it be possible to check the contents of the cache-files to check for the key and only delete the current domain’s files? It would probably be pretty slow but if you did it in chunks it could probably work.


#5

Nginx (free version) doesn’t provide any way to do that. Nginx plus has a feature for that.

We are planning to provide a workaround for EasyEngine users. Details -


#6