Basically it goes like this (relevant steps only):
plugins.php
page callsactivate_plugin()
function.- Function starts output buffering.
- Includes plugin file.
- Fires
activate_plugin
action. - Fires
'activate_' . trim( $plugin )
action. - Fires
activated_plugin
action. - If buffer is not empty it creates
WP_Error
object and returns it. plugins.php
page checks for error and displays error message.
So output happens somewhere between steps 2 and 7. If it comes up for multiple plugins then steps 3 and 5 are safe to exclude, they are plugin-specific.
So it is likely something in either activate_plugin
or activated_plugin
. Also actual unwanted output is passed in WP_Error
object but not used (only its length).
I’d try to dump hooks first, will take bit of extra code in core a bit to get to that output in WP_Error
object.
Related Posts:
- Why do I get this “peer’s certificate issuer not recognised” error when trying to install a theme?
- How to catch/what to do with a WP Error Object
- wordpress on localhost lamp doesn’t let me install plugins
- Prompted for FTP details even with FS_DIRECT set to true
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- What plugins do you commonly install on a fresh WordPress install?
- What are the best practices for updating?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Error: call_user_func_array() expects parameter 1 to be a valid callback
- How can I create a bash install script for my WordPress sites setup (WP+plugins+theme)?
- How to eliminate weird 404 errors in wp-admin?
- Combine multiple plugins into one?
- How to automatically install default WordPress plugins?
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- Validation error: Extending Gutenberg gallery block
- Does plugin uninstall always put WordPress back into original state?
- How do I fix the “sorry, you are not allowed to access this page” error I get on the “plugins > settings” links?
- Should messages in WP_Error already be html escaped?
- How to get Login Error messages on a custom template
- What is the purpose of the “Hello Dolly” plugin?
- PHP Deprecated: Non-static method should not be called statically
- How to properly secure my WordPress installation?
- Plugins error (Use roles and capabilities instead) on latest version, multisite
- WordPress plugin installation error
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Make plugin uninstalable on older versions of WordPress
- Please select a file error
- Error: “Cannot modify header information”
- Plugin.php: PHP Notice: Undefined offset: 0 in
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- check for the current screen
- “Are you sure you want to do this?” when deactivating all plugins in WordPress 4.3.1 [closed]
- Install plugin remotely
- What is $tab in `install_plugins_{$tab}` hook?
- Plugin to install a plugin
- How should I handle errors within a plugin?
- Force plugin to fail activation
- An Unexpected HTTP Error occurred during the API request
- Dashboard Disappears after Upgrade
- How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?
- Distributing and packaging plugins
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- echo do_shortcode is not working on theme’s template
- Seaweed Plugin not working
- All plugins deactivated due to error
- Getting a 404 when trying to load /wp-admin/plugin-install.php
- Can’t use the built-in wordpress install/upgrade plugin feature [closed]
- How can I see the error generated by plugin activation?
- Unable to activate wordpress importer after installing it
- Weird problems after recovery from security breach
- Error in the wp-config.php file: PHP Fatal error: Uncaught Error: Unknown named parameter (PHP 8.0)
- How to implement Sentry on WordPress? [closed]
- Can a plugin still effect a site even after deletion?
- Accessing GET variable named ‘error’
- How to check what plugins used to be on a WordPress installation?
- Error uploading plugin zip file
- Error handling a plugin with exceptions
- What causes an Unexpected HTTP Error within install plugins?
- Unable to install theme recommended plugins on Multisite
- How does WordPress process plugin installations?
- CMB2 installation – cannot get it to work
- Problem with wordpress version 3.8
- Post-terms-order PHP errors after update
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- Accidentally Broke Site (Please Help) [closed]
- One of my plugins broke when I tried to update it, how do I safely uninstall it?
- Plug-in (Slickr Flickr) works on local machine, but not server
- Using one-click plugin upgrade feature securely on suexec server
- Fatal error with Ultimate Coupon plugin
- Can I install plugins manually on WP.com? [closed]
- Theme causing SSL break on chrome
- The plugin generated xxx characters of unexpected output during activation
- Google analytics not working on WordPress
- WordPress Customer Reviews Error: Line 239?
- WordPress Plugin: Demon Image Annotation
- WordPress – connection information
- WordPress Plugins Error
- Plugin installation works only with FTP – how to debug?
- Receiving error with Custom Tables plugin
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- How can I send api calls from my plugin?
- Console errors after WordPress Update 6.1
- automation of plugin installations
- WordPress error Fatal error: Uncaught TypeError: Argument 3 passed to Automattic :get_setting_for_feature() [closed]
- How can I resolve an error on WordPress after PHP update
- How can I disable a plugin in Health Check mode if there’s a critical error?
- Oxygen plugin wordpress stuck in loading sequence forever when trying to edit a page [closed]
- Plugin that supports the purchase and installation of other plugins?
- wp-login 404 page not redirecting to homepage [closed]
- How to fix a Wordfence scan that doesn’t finish?
- How to resolve status code: 410 from Pagespeed insights for the wordpress website
- No WP-Content Folder in Website Files, No Ability to Disable Plugins Manually
- Allowing users to install a predefined bundle of plugins and themes with one action
- call_user_func_array() expects parameter 1 to be a valid callback, class ‘Automattic\Jetpack\Extensions\Contact_Form\Contact_Form_Block’ not found
- Litespeedcache key domain registration error
- SMTP email does not work even with the right firewall rules
- Bullet proofing a server with 150 WP insallations
- ERROR during WordPress Installation “There has been a critical error on this website.”
- How is wp_admin_notice supposed to work?