#2401 closed defect (bug) (worksforme)
Akismet error after attempting to mark comment as non-spam
Reported by: | obeattie | Owned by: | |
---|---|---|---|
Milestone: | Priority: | highest omg bbq | |
Severity: | major | Version: | 2.0.1 |
Component: | Administration | Keywords: | akismet spam akismetakismet / \ %5c error fatal |
Focuses: | Cc: |
Description
When I attempt to mark a comment as non-spam with Akismet (WordPress v2.0.1), I recieve the following error: "Cannot load akismetakismet.php.".
I have made no modifications to Akismet's code and my database seems to be fine. However, the URL that I am directed to is /wp-admin/edit.php?page=akismet\akismet.php, with a backslash. This must cause some kind of a declaration to be made, causing me to be sent to an incorrect URL when marking comments as not spam.
If I address the URL as /wp-admin/edit.php?page=akisme/akismet.php, then I recieve the following error: "Fatal error: Cannot redeclare ksd_config_page() (previously declared in ...\htdocs\blog\wp-content\plugins\akismet\akismet.php:14) in ...\htdocs\blog\wp-content\plugins\akismet\akismet.php on line 17".
But, if I visit /wp-admin/edit.php?page=akisme%5cakismet.php, then I can unmark spam correctly and all is well.
I have been discussing this on the forum this afternoon (http://wordpress.org/support/topic/59936), and we really can't seem to figure out why this is happening.
Can you shed some light on this?
Change History (5)
#3
@
18 years ago
Hmm, I appear to be having the same issue with wp-cache. It seems to be a problem with passing __FILE__
to add_*_page
; replacing it with basename(__FILE__)
allows the menu to appear.
For example:
add_submenu_page('plugins.php', __('Akismet Configuration'), __('Akismet Configuration'), 1, __FILE__, 'akismet_conf');
becomes:
add_submenu_page('plugins.php', __('Akismet Configuration'), __('Akismet Configuration'), 1, basename(__FILE__), 'akismet_conf');
I've only noticed this problem on 2.1a*, though I don't have a 2.0.* install lying around to confirm this unfortunately.
Can we not fix it just by adding a
$file = str_replace('\\', '/', $file);
to plugin_basename()
?
Looks like you're on a Windows server. Deactivate the plugin, move it up from the /akismet/ directory into the /plugins/ directory and then reactivate it. But that's just a temporary solution.
I'm a little surprised that more things aren't broken in your install because of this issue, actually.