[wp-trac] [WordPress Trac] #62029: Do not bloat Debug Log with Scraping home page… when auto upgrade is OK
WordPress Trac
noreply at wordpress.org
Fri Sep 27 12:25:43 UTC 2024
#62029: Do not bloat Debug Log with Scraping home page… when auto upgrade is OK
-----------------------------+---------------------
Reporter: georgwordpress | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+---------------------
Comment (by georgwordpress):
What makes the reproducibility of problems with the automatic updater so
difficult:
The current cookies are sent with the loopback request.
When detecting errors after editing PHP files by the user this makes
sense.
But the automatic update of plugins and its error detection is about a
process that is started in the background by a cron job.
Usually anonymous - so the loopback request on the homepage would also be
executed as an anonymous user.
However, if it is a standard WordPress installation, wp-cron.php is called
by every user request.
In this case, the has_fatal_error() function of the wp-automatic-updater
and it's loopback request uses the cookies from the user request that
triggered the cron job.
As a result, WordPress always behaves slightly differently with this
loopback request, depending on user rights - and in an other way than
accessed anonymously.
The test sequence described above only works if the cron job is triggered
by an anonymous user or a server cron job.
Some plugins can also trigger a cron job anonymously, like the Plugin
'Cron Jobs' described above.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62029#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list