joppuyo / disable-media-pages

WordPress plugin to disable "attachment" pages automatically created for WordPress media
https://wordpress.org/plugins/disable-media-pages/
GNU General Public License v2.0
19 stars 2 forks source link

"set_404" in error log #42

Closed paulchen closed 6 months ago

paulchen commented 6 months ago

Today at 20:51, the plugin on my WordPress instance was updated from 3.0.5 to 3.1.0. Since that time, entries containing only the string set_404 started to appear in the error log:

[Mar 24, 21:22:00] set_404
[Mar 24, 22:19:13] set_404
[Mar 24, 22:22:55] set_404
[Mar 24, 22:22:57] set_404
[Mar 24, 22:22:58] set_404
[Mar 24, 22:23:00] set_404
[Mar 24, 22:23:01] set_404
[Mar 24, 22:23:03] set_404
[Mar 24, 22:23:04] set_404
[Mar 24, 22:23:06] set_404
[Mar 24, 22:23:07] set_404
[Mar 24, 22:30:33] set_404
[Mar 24, 22:58:06] set_404

At each of these timestamps, the access log shows an access to a location that does not exist (nothing related to an attachment), leading to a 404 error, e.g.:

xxx.xxx.xxx.xxx - - [24/Mar/2024:22:22:55 +0100] "GET /sftp-config.json HTTP/1.1" 404 71203 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:22:57 +0100] "GET /.vscode/sftp.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:22:58 +0100] "GET /.vscode/ftp-sync.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:23:00 +0100] "GET /.sftp-config.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:23:01 +0100] "GET /ftpsync.settings HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:23:03 +0100] "GET /ftp-sync.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:23:04 +0100] "GET /.ftp-sync.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:23:06 +0100] "GET /sftp.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"
xxx.xxx.xxx.xxx - - [24/Mar/2024:22:23:07 +0100] "GET /.sftp.json HTTP/1.1" 404 71207 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0"

I traced this down to https://github.com/joppuyo/disable-media-pages/blob/master/lib/Plugin.php#L53 which was added recently.

Is that (together with a similar statement on line 33) some debug output that should actually be replaced by a call to the debug() function?

olegmeglin commented 6 months ago

Additional to this I also get init spammed into my debug.log file:

[26-Mar-2024 13:01:53 UTC] init
[26-Mar-2024 13:03:53 UTC] init
[26-Mar-2024 13:07:06 UTC] init
[26-Mar-2024 13:08:06 UTC] init
[26-Mar-2024 13:10:06 UTC] init
joppuyo commented 6 months ago

Hey! Thanks for reporting this bug. It's entirely my fault, these debugging statements should not have made their way into the released version of the plugin. I will release a new version of the plugin with these removed right away.

joppuyo commented 6 months ago

I have released version v3.1.1 of the plugin which addresses this issue. It is available on the WordPress plugin directory.

olegmeglin commented 6 months ago

Thank you for the quick response. I have just applied the fix, and the log messages are now gone :)

paulchen commented 6 months ago

@joppuyo Thanks for fixing this, after updating the plugin the log messages do not appear anymore. :)