“File not found.” Error After Activating Plugin
-
Hello there,
I just installed the plugin on a test site. After installing the plugin I clicked the “Activate” button.
This lead me to a
File not found.
error. ??I looked into your source code.
public function impact_activate( $plugin ) {
$arr = explode( '/', $plugin );
if ( count( $arr ) >= 1 && strpos( $arr[ count( $arr ) - 1 ], 'impact' ) !== false ) {
$store_url = home_url();
$path = '/wp-admin/admin.php?page=impact-settings';
$url = $store_url . $path;
wp_safe_redirect( $url );
exit;
{...}
}
}It looks like you’re using home_url() which is generally used on the front-end of the website.
If WordPress is installed in a subdirectory such as
example.com/wp/
then when you activate the plugin it will loadexample.com/wp-admin/admin.php?page=impact-settings
which doesn’t exist.I recommend using admin_url() instead.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.