johnbillion / query-monitor

The developer tools panel for WordPress
https://querymonitor.com
GNU General Public License v2.0
1.6k stars 211 forks source link

Fatal error on activation #509

Closed photocurio closed 4 years ago

photocurio commented 4 years ago

Fatal error: Cannot declare class QM_Activation, because the name is already in use in /chassis/content/plugins/query-monitor/classes/Activation.php on line 0

When I try to network-activate this plugin I get the above error. The site is a multisite localhost install. I pulled the database from a different development environment that has Query Monitor active. After the usual search-and-replace actions everything works well except this plugin. Is there something in the database I can remove so I can activate Query Monitor on my new localhost?

johnbillion commented 4 years ago

Very odd. Not sure what would cause that.

johnbillion commented 4 years ago

Based on https://github.com/humanmade/Cavalcade/issues/96 it looks like you're running Altis. If so, you don't need to install Query Monitor separately as it's bundled with Altis.

Let me know if this isn't the problem and we can reopen this.

photocurio commented 4 years ago

@johnbillion yes, that explains it!

rmccue commented 4 years ago

(Specifically, it's provided by the altis/dev-tools Composer module.)

eduwass commented 2 years ago

In case this is useful for a future person trouble-shooting...

Today I was getting Fatal error: Cannot declare class ComposerAutoloaderInitd4d7d7d11152077b8234a5ecb185a7c0 on wp-content/plugins/query-monitor/vendor/composer/autoload_real.php after duplicating a site in LocalWP.

Was fixed after doing following steps mentioned on https://github.com/johnbillion/query-monitor/issues/509#issuecomment-609497689

  • Have you checked the mu-plugins directory to ensure QM isn't in there?
  • Is wp-content/db.php in place? Try deleting it if so
  • Try flushing your cache with wp cache flush.