-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot declare class Perflab_Server_Timing_Metric #1150
Comments
This seems to be something unique to your setup. Do you by chance have multiple copies of the Performance Lab plugin active somehow? |
A couple of additional reports of this added to this support topic, one whereby a user shared their Site Health info. I haven't been able to replicate the same, upgrading from 2.9.0 to 3. |
As we chatted about earlier, I suspect this may be a problem with the WP update mechanism and possibly in relation to PHP's OPcache (maybe Core-60397?). If the OPCache is not flushed during upgrade, then it can possibly load stale PHP files which can result in this issue. Nevertheless, flushing of the OPcache is supposed to be done by core when plugins are updated. |
I'll re-enable the plugin and clear the cache and get back to you. |
This sounds like a cache-related issue. If somehow the root In the previous versions (2.9, 2.8, etc..), we loaded those files like this:
And in version 3.0, we changed it to:
So there is no way to load the previous location files. Could you please share the code from your root |
Hi, the same happened to a client of mine, the error started popping up on April 16th
After reading this thread I noticed that there is an After renaming the What I can't explain is how the error began. The plugin is not scheduled to auto-update, but on April 16th the new includes folder was created. |
@mfru Very interesting that there is both an
These files are only in the 2.9.0 release. So it seems that WordPress core's plugin update was not completely successful. I suggest downloading plugin ZIP from WordPress.org and re-installing it to make sure only the expected files are present. |
Another user who experienced the same issue: #1180 |
Experienced the same issue also from 15/16-April-2024. Renaming the server-timing folder as suggested by @mfru rectified the issue. (What was more confusing in my instance was that the .com.au domain name was not renewed 12 days before domain name expiry, as apparently required of .com.au domains, leading to an accumulation of issues one on top of the other.) |
It seems this is not a problem with the plugin itself but rather with WordPress's plugin update routine. So I'm going to close this, as the best place to report this problem would be in Trac. |
Bug Description
[16-Apr-2024 12:35:05 UTC] PHP Fatal error: Cannot declare class Perflab_Server_Timing_Metric, because the name is already in use in /home/DOMAIN/wp-content/plugins/performance-lab/includes/server-timing/class-perflab-server-timing-metric.php on line 14
Steps to reproduce
Access any web page
Screenshots
Additional Context
Contributors: wordpressdotorg
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.0
Stable tag: 3.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, site health, measurement, optimization, diagnostics
The text was updated successfully, but these errors were encountered: