[wp-hackers] Upgrading to Wordpress 3.7 is deleting a file from our plugin thus breaking a lot's of sites

Otto otto at ottodestruct.com
Fri Oct 25 18:41:03 UTC 2013


On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
<nicola.peluchetti at gmail.com> wrote:
> Hi,
>
> we received lot's of reports that our plugin is not compatible with 3.7 and
> many site where brought down. The problem seems to be that wordpress 3.7
> upgrade deletes ( in some occasions ) a file in a folder we create in
> wp-content.
> http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
>
> The file name is event.min.js and we create the folder themes-ai1ec under
> wp-content. Any idea why this might be happening?This doesn't seem to be
> under our control but user are blaming us. If we need to change something
> to be compatible, we will, but i have no guess now on what to do.

While I can't see any particular reason for a file like that to be
deleted on an update, this error is coming entirely from your plugin.

Examine the error message posted in this thread:
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8

If you examine that code, you have this:

if( $file_found === false ) {
throw new Ai1ec_File_Not_Found( "The specified file '" . $file . "'
doesn't exist." );
}

That is a pretty horrible thing to do on a production site *if* you're
not catching the exception higher up and handling it gracefully. An
uncaught exception is a fatal error = Instantly broken site.

I would look at all the places you're calling functions that can throw
Ai1ec_File_Not_Found and putting catches around them, to handle the
situation better.

-Otto


More information about the wp-hackers mailing list