Discussion:
Upgrading to Wordpress 3.7 is deleting a file from our plugin thus breaking a lot's of sites
Nicola Peluchetti
2013-10-25 17:18:21 UTC
Permalink
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.

* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Mika A Epstein
2013-10-25 17:26:40 UTC
Permalink
"Our Plugin" is http://wordpress.org/plugins/all-in-one-event-calendar/

I haven't heard of any other plugin having it's content in wp-content
whacked by the update. I added this to the master list though.

In general, it SHOULD be impossible for WP to delete anything like that.
It has a very specific list in wp-admin/includes/update-core.php of what
it deletes. Look for the _old_files array.
Post by Nicola Peluchetti
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.
* *
*
Facebook: nicola.peluchetti<https://www.facebook.com/nicola.peluchetti>
Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nicola Peluchetti
2013-10-25 17:31:37 UTC
Permalink
Hi,

yes it's that plugin. As you can see on the support page
http://wordpress.org/support/plugin/all-in-one-event-calendar there are
lot's of complaints about this. Personally i updated my local install with
no problems.

If you have any suggestion on how this might be happening on our side we
could investigate, but i can't think of a way where an upgrade on wordpress
triggers the deletion of a file from our plugin.

* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
"Our Plugin" is http://wordpress.org/plugins/**all-in-one-event-calendar/<http://wordpress.org/plugins/all-in-one-event-calendar/>
I haven't heard of any other plugin having it's content in wp-content
whacked by the update. I added this to the master list though.
In general, it SHOULD be impossible for WP to delete anything like that.
It has a very specific list in wp-admin/includes/update-core.**php of
what it deletes. Look for the _old_files array.
Post by Nicola Peluchetti
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<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.
* *
*
Facebook: nicola.peluchetti<https://www.**facebook.com/nicola.peluchetti<https://www.facebook.com/nicola.peluchetti>
**>
Stackoverflow: Stackoverflow<http://**stackoverflow.com/users/**
397861/nicola-peluchetti<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
______________________________**_________________
wp-hackers mailing list
http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
______________________________**_________________
wp-hackers mailing list
http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
Mika A Epstein
2013-10-25 17:32:51 UTC
Permalink
Just the usual, really.

Get the list of plugins and themes, try to see if anything common is
there. Ask HOW they upgraded (clicked on the link, their host did it, what?)
Post by Nicola Peluchetti
Hi,
yes it's that plugin. As you can see on the support page
http://wordpress.org/support/plugin/all-in-one-event-calendar there are
lot's of complaints about this. Personally i updated my local install with
no problems.
If you have any suggestion on how this might be happening on our side we
could investigate, but i can't think of a way where an upgrade on wordpress
triggers the deletion of a file from our plugin.
* *
*
Facebook: nicola.peluchetti<https://www.facebook.com/nicola.peluchetti>
Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Mika A Epstein
"Our Plugin" is
http://wordpress.org/plugins/**all-in-one-event-calendar/<http://wordpress.org/plugins/all-in-one-event-calendar/>
I haven't heard of any other plugin having it's content in wp-content
whacked by the update. I added this to the master list though.
In general, it SHOULD be impossible for WP to delete anything like that.
It has a very specific list in wp-admin/includes/update-core.**php of
what it deletes. Look for the _old_files array.
Post by Nicola Peluchetti
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<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.
* *
*
@nik_peluchetti<https://**twitter.com/#!/nik_peluchetti<https://twitter.com/#!/nik_peluchetti>
nicola.peluchetti<https://www.**facebook.com/nicola.peluchetti<https://www.facebook.com/nicola.peluchetti>
**>
Stackoverflow: Stackoverflow<http://**stackoverflow.com/users/**
397861/nicola-peluchetti<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
______________________________**_________________
wp-hackers mailing list
http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
______________________________**_________________
wp-hackers mailing list
http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Otto
2013-10-25 18:41:03 UTC
Permalink
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
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
Nicola Peluchetti
2013-10-26 14:29:21 UTC
Permalink
Hi,

sure that's horrible, we will fix that, but the real problem is that the
file is deleted. If we catch the exception still the js is not loaded and
the file was there before the upgrade.
During the upgrade process, is any plugin code executed?We already have 25
people reporting our plugin as not compatible with 3.7 for this and i
imagine people affected are many more. I can't replicate this locally, i
will add a check to load that file from our plugin dir and not wp-content i
can't think of any other way to handle this.

* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Otto
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Hi,
we received lot's of reports that our plugin is not compatible with 3.7
and
Post by Nicola Peluchetti
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.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
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
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
John Blackbourn
2013-10-26 15:08:06 UTC
Permalink
This plugin's `uninstall.php` file deletes the WP_CONTENT_DIR/themes-ai1ec
directory when called. It sounds like this plugin's uninstall.php file is
being called during the upgrade.

Potential cause: People running a plugin which forces plugin uninstall
routines to run when plugins are disabled?

@Nicola: It would help hugely if you can get a list of active plugins on
affected sites from users who are experiencing the problem.
Post by Nicola Peluchetti
Hi,
sure that's horrible, we will fix that, but the real problem is that the
file is deleted. If we catch the exception still the js is not loaded and
the file was there before the upgrade.
During the upgrade process, is any plugin code executed?We already have 25
people reporting our plugin as not compatible with 3.7 for this and i
imagine people affected are many more. I can't replicate this locally, i
will add a check to load that file from our plugin dir and not wp-content i
can't think of any other way to handle this.
* *
*
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Otto
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Hi,
we received lot's of reports that our plugin is not compatible with 3.7
and
Post by Nicola Peluchetti
many site where brought down. The problem seems to be that wordpress
3.7
Post by Otto
Post by Nicola Peluchetti
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
Post by Otto
Post by Nicola Peluchetti
wp-content. Any idea why this might be happening?This doesn't seem to
be
Post by Otto
Post by Nicola Peluchetti
under our control but user are blaming us. If we need to change
something
Post by Otto
Post by Nicola Peluchetti
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.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
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
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nicola Peluchetti
2013-10-26 15:33:10 UTC
Permalink
The fact is that only the event.min.js file seems to be deleted. Not the
whole folder. I released 1.10.4 to address this, basically i fall back to
loading the file from our original folder if the file is missing from
wp-content. Still would like to understand why this is happening.
Version 2.0 will have a global exception/error handler to avoid bringing
down websites and wasting my weekends fixing things :D

* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235


On Sat, Oct 26, 2013 at 5:08 PM, John Blackbourn
Post by John Blackbourn
This plugin's `uninstall.php` file deletes the WP_CONTENT_DIR/themes-ai1ec
directory when called. It sounds like this plugin's uninstall.php file is
being called during the upgrade.
Potential cause: People running a plugin which forces plugin uninstall
routines to run when plugins are disabled?
@Nicola: It would help hugely if you can get a list of active plugins on
affected sites from users who are experiencing the problem.
Post by Nicola Peluchetti
Hi,
sure that's horrible, we will fix that, but the real problem is that the
file is deleted. If we catch the exception still the js is not loaded and
the file was there before the upgrade.
During the upgrade process, is any plugin code executed?We already have
25
Post by Nicola Peluchetti
people reporting our plugin as not compatible with 3.7 for this and i
imagine people affected are many more. I can't replicate this locally, i
will add a check to load that file from our plugin dir and not
wp-content i
Post by Nicola Peluchetti
can't think of any other way to handle this.
* *
*
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Otto
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Hi,
we received lot's of reports that our plugin is not compatible with
3.7
Post by Nicola Peluchetti
Post by Otto
and
Post by Nicola Peluchetti
many site where brought down. The problem seems to be that wordpress
3.7
Post by Otto
Post by Nicola Peluchetti
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
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
The file name is event.min.js and we create the folder themes-ai1ec
under
Post by Otto
Post by Nicola Peluchetti
wp-content. Any idea why this might be happening?This doesn't seem to
be
Post by Otto
Post by Nicola Peluchetti
under our control but user are blaming us. If we need to change
something
Post by Otto
Post by Nicola Peluchetti
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.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
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
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Andrew Nacin
2013-10-26 15:59:05 UTC
Permalink
An exception over a missing CSS file? Really? That also means you are
running unnecessary systems calls on every page, slowing down sites for no
good reason. Rather than wasting effort and CPU cycles on a global
exception handler, consider removing this.

WordPress doesn't touch wp-content during an update unless it is to copy
over a new default theme, so I don't really know what's going on here. I
can pretty safely say this is not WordPress core.

If you want to understand, start by responding to John. "Potential cause:
People running a plugin which forces plugin uninstall routines to run when
plugins are disabled? It would help hugely if you can get a list of active
plugins on affected sites from users who are experiencing the problem."

Nacin


On Sat, Oct 26, 2013 at 11:33 AM, Nicola Peluchetti <
Post by Nicola Peluchetti
The fact is that only the event.min.js file seems to be deleted. Not the
whole folder. I released 1.10.4 to address this, basically i fall back to
loading the file from our original folder if the file is missing from
wp-content. Still would like to understand why this is happening.
Version 2.0 will have a global exception/error handler to avoid bringing
down websites and wasting my weekends fixing things :D
* *
*
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
On Sat, Oct 26, 2013 at 5:08 PM, John Blackbourn
Post by John Blackbourn
This plugin's `uninstall.php` file deletes the
WP_CONTENT_DIR/themes-ai1ec
Post by John Blackbourn
directory when called. It sounds like this plugin's uninstall.php file is
being called during the upgrade.
Potential cause: People running a plugin which forces plugin uninstall
routines to run when plugins are disabled?
@Nicola: It would help hugely if you can get a list of active plugins on
affected sites from users who are experiencing the problem.
Post by Nicola Peluchetti
Hi,
sure that's horrible, we will fix that, but the real problem is that
the
Post by John Blackbourn
Post by Nicola Peluchetti
file is deleted. If we catch the exception still the js is not loaded
and
Post by John Blackbourn
Post by Nicola Peluchetti
the file was there before the upgrade.
During the upgrade process, is any plugin code executed?We already have
25
Post by Nicola Peluchetti
people reporting our plugin as not compatible with 3.7 for this and i
imagine people affected are many more. I can't replicate this locally,
i
Post by John Blackbourn
Post by Nicola Peluchetti
will add a check to load that file from our plugin dir and not
wp-content i
Post by Nicola Peluchetti
can't think of any other way to handle this.
* *
*
Facebook: nicola.peluchetti <
https://www.facebook.com/nicola.peluchetti>
Post by John Blackbourn
Post by Nicola Peluchetti
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Otto
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Hi,
we received lot's of reports that our plugin is not compatible with
3.7
Post by Nicola Peluchetti
Post by Otto
and
Post by Nicola Peluchetti
many site where brought down. The problem seems to be that
wordpress
Post by John Blackbourn
Post by Nicola Peluchetti
3.7
Post by Otto
Post by Nicola Peluchetti
upgrade deletes ( in some occasions ) a file in a folder we create
in
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
wp-content.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
The file name is event.min.js and we create the folder themes-ai1ec
under
Post by Otto
Post by Nicola Peluchetti
wp-content. Any idea why this might be happening?This doesn't seem
to
Post by John Blackbourn
Post by Nicola Peluchetti
be
Post by Otto
Post by Nicola Peluchetti
under our control but user are blaming us. If we need to change
something
Post by Otto
Post by Nicola Peluchetti
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.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
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
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
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
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
Ai1ec_File_Not_Found and putting catches around them, to handle the
situation better.
-Otto
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Nicola Peluchetti
2013-10-27 17:42:12 UTC
Permalink
Yes it's insane throwing an exception (and not catching it) but we all
dealt with legacy code. We are rewriting/re-architecturing the pugin right
now. Looking at some sites i've also finally found where the issue was:
Wordpress 3.7 Broke our code which we used to prevent updating to
wordpress.org version.
So the user of our standard version where prompted to download the version
on wordpress.org which has a totally different way of serving resources. No
update of files in wp-content was triggered and for this reason the file
were not there.

Thanks for the help and the advice.

* *
*Nicola Peluchetti - Senior PHP Developer @ Timely**
*
Twitter: @nik_peluchetti <https://twitter.com/#!/nik_peluchetti>
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Andrew Nacin
An exception over a missing CSS file? Really? That also means you are
running unnecessary systems calls on every page, slowing down sites for no
good reason. Rather than wasting effort and CPU cycles on a global
exception handler, consider removing this.
WordPress doesn't touch wp-content during an update unless it is to copy
over a new default theme, so I don't really know what's going on here. I
can pretty safely say this is not WordPress core.
People running a plugin which forces plugin uninstall routines to run when
plugins are disabled? It would help hugely if you can get a list of active
plugins on affected sites from users who are experiencing the problem."
Nacin
On Sat, Oct 26, 2013 at 11:33 AM, Nicola Peluchetti <
Post by Nicola Peluchetti
The fact is that only the event.min.js file seems to be deleted. Not the
whole folder. I released 1.10.4 to address this, basically i fall back to
loading the file from our original folder if the file is missing from
wp-content. Still would like to understand why this is happening.
Version 2.0 will have a global exception/error handler to avoid bringing
down websites and wasting my weekends fixing things :D
* *
*
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
On Sat, Oct 26, 2013 at 5:08 PM, John Blackbourn
Post by John Blackbourn
This plugin's `uninstall.php` file deletes the
WP_CONTENT_DIR/themes-ai1ec
Post by John Blackbourn
directory when called. It sounds like this plugin's uninstall.php file
is
Post by Nicola Peluchetti
Post by John Blackbourn
being called during the upgrade.
Potential cause: People running a plugin which forces plugin uninstall
routines to run when plugins are disabled?
@Nicola: It would help hugely if you can get a list of active plugins
on
Post by Nicola Peluchetti
Post by John Blackbourn
affected sites from users who are experiencing the problem.
On 26 October 2013 15:29, Nicola Peluchetti <
Post by Nicola Peluchetti
Hi,
sure that's horrible, we will fix that, but the real problem is that
the
Post by John Blackbourn
Post by Nicola Peluchetti
file is deleted. If we catch the exception still the js is not loaded
and
Post by John Blackbourn
Post by Nicola Peluchetti
the file was there before the upgrade.
During the upgrade process, is any plugin code executed?We already
have
Post by Nicola Peluchetti
Post by John Blackbourn
25
Post by Nicola Peluchetti
people reporting our plugin as not compatible with 3.7 for this and i
imagine people affected are many more. I can't replicate this
locally,
Post by Nicola Peluchetti
i
Post by John Blackbourn
Post by Nicola Peluchetti
will add a check to load that file from our plugin dir and not
wp-content i
Post by Nicola Peluchetti
can't think of any other way to handle this.
* *
*
Facebook: nicola.peluchetti <
https://www.facebook.com/nicola.peluchetti>
Post by John Blackbourn
Post by Nicola Peluchetti
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Otto
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Hi,
we received lot's of reports that our plugin is not compatible
with
Post by Nicola Peluchetti
Post by John Blackbourn
3.7
Post by Nicola Peluchetti
Post by Otto
and
Post by Nicola Peluchetti
many site where brought down. The problem seems to be that
wordpress
Post by John Blackbourn
Post by Nicola Peluchetti
3.7
Post by Otto
Post by Nicola Peluchetti
upgrade deletes ( in some occasions ) a file in a folder we
create
Post by Nicola Peluchetti
in
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
wp-content.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
The file name is event.min.js and we create the folder
themes-ai1ec
Post by Nicola Peluchetti
Post by John Blackbourn
Post by Nicola Peluchetti
under
Post by Otto
Post by Nicola Peluchetti
wp-content. Any idea why this might be happening?This doesn't
seem
Post by Nicola Peluchetti
to
Post by John Blackbourn
Post by Nicola Peluchetti
be
Post by Otto
Post by Nicola Peluchetti
under our control but user are blaming us. If we need to change
something
Post by Otto
Post by Nicola Peluchetti
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.
Post by Nicola Peluchetti
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
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
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
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
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
Ai1ec_File_Not_Found and putting catches around them, to handle the
situation better.
-Otto
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Otto
2013-10-27 19:11:32 UTC
Permalink
You can avoid that entirely just by naming the for-pay plugin
something different and giving it a different Plugin URI. Tack on a
"premium" to the end or something.

Or, better yet, make the for-pay version simply use the free version
and add on the features and such. This is probably the best long-term
strategy. The free plugin can have do_action() and apply_filter()
calls in appropriate places, and the paid version can then be a
separate plugin which uses those hooks to expand and extend the free
code.

-Otto


On Sun, Oct 27, 2013 at 12:42 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Yes it's insane throwing an exception (and not catching it) but we all
dealt with legacy code. We are rewriting/re-architecturing the pugin right
Wordpress 3.7 Broke our code which we used to prevent updating to
wordpress.org version.
So the user of our standard version where prompted to download the version
on wordpress.org which has a totally different way of serving resources. No
update of files in wp-content was triggered and for this reason the file
were not there.
Thanks for the help and the advice.
* *
*
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Andrew Nacin
An exception over a missing CSS file? Really? That also means you are
running unnecessary systems calls on every page, slowing down sites for no
good reason. Rather than wasting effort and CPU cycles on a global
exception handler, consider removing this.
WordPress doesn't touch wp-content during an update unless it is to copy
over a new default theme, so I don't really know what's going on here. I
can pretty safely say this is not WordPress core.
People running a plugin which forces plugin uninstall routines to run when
plugins are disabled? It would help hugely if you can get a list of active
plugins on affected sites from users who are experiencing the problem."
Nacin
On Sat, Oct 26, 2013 at 11:33 AM, Nicola Peluchetti <
Post by Nicola Peluchetti
The fact is that only the event.min.js file seems to be deleted. Not the
whole folder. I released 1.10.4 to address this, basically i fall back to
loading the file from our original folder if the file is missing from
wp-content. Still would like to understand why this is happening.
Version 2.0 will have a global exception/error handler to avoid bringing
down websites and wasting my weekends fixing things :D
* *
*
Facebook: nicola.peluchetti <https://www.facebook.com/nicola.peluchetti>
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
On Sat, Oct 26, 2013 at 5:08 PM, John Blackbourn
Post by John Blackbourn
This plugin's `uninstall.php` file deletes the
WP_CONTENT_DIR/themes-ai1ec
Post by John Blackbourn
directory when called. It sounds like this plugin's uninstall.php file
is
Post by Nicola Peluchetti
Post by John Blackbourn
being called during the upgrade.
Potential cause: People running a plugin which forces plugin uninstall
routines to run when plugins are disabled?
@Nicola: It would help hugely if you can get a list of active plugins
on
Post by Nicola Peluchetti
Post by John Blackbourn
affected sites from users who are experiencing the problem.
On 26 October 2013 15:29, Nicola Peluchetti <
Post by Nicola Peluchetti
Hi,
sure that's horrible, we will fix that, but the real problem is that
the
Post by John Blackbourn
Post by Nicola Peluchetti
file is deleted. If we catch the exception still the js is not loaded
and
Post by John Blackbourn
Post by Nicola Peluchetti
the file was there before the upgrade.
During the upgrade process, is any plugin code executed?We already
have
Post by Nicola Peluchetti
Post by John Blackbourn
25
Post by Nicola Peluchetti
people reporting our plugin as not compatible with 3.7 for this and i
imagine people affected are many more. I can't replicate this
locally,
Post by Nicola Peluchetti
i
Post by John Blackbourn
Post by Nicola Peluchetti
will add a check to load that file from our plugin dir and not
wp-content i
Post by Nicola Peluchetti
can't think of any other way to handle this.
* *
*
Facebook: nicola.peluchetti <
https://www.facebook.com/nicola.peluchetti>
Post by John Blackbourn
Post by Nicola Peluchetti
Stackoverflow: Stackoverflow<
http://stackoverflow.com/users/397861/nicola-peluchetti>
Mobile: +39 339 7507235
Post by Otto
On Fri, Oct 25, 2013 at 12:18 PM, Nicola Peluchetti
Post by Nicola Peluchetti
Hi,
we received lot's of reports that our plugin is not compatible
with
Post by Nicola Peluchetti
Post by John Blackbourn
3.7
Post by Nicola Peluchetti
Post by Otto
and
Post by Nicola Peluchetti
many site where brought down. The problem seems to be that
wordpress
Post by John Blackbourn
Post by Nicola Peluchetti
3.7
Post by Otto
Post by Nicola Peluchetti
upgrade deletes ( in some occasions ) a file in a folder we
create
Post by Nicola Peluchetti
in
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
wp-content.
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
Post by Nicola Peluchetti
Post by Otto
Post by Nicola Peluchetti
The file name is event.min.js and we create the folder
themes-ai1ec
Post by Nicola Peluchetti
Post by John Blackbourn
Post by Nicola Peluchetti
under
Post by Otto
Post by Nicola Peluchetti
wp-content. Any idea why this might be happening?This doesn't
seem
Post by Nicola Peluchetti
to
Post by John Blackbourn
Post by Nicola Peluchetti
be
Post by Otto
Post by Nicola Peluchetti
under our control but user are blaming us. If we need to change
something
Post by Otto
Post by Nicola Peluchetti
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.
Post by Nicola Peluchetti
http://wordpress.org/support/topic/not-compatible-with-wp-37?replies=8
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
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
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
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
Post by John Blackbourn
Post by Nicola Peluchetti
Post by Otto
Ai1ec_File_Not_Found and putting catches around them, to handle the
situation better.
-Otto
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Loading...