when create a new page:
/wp-admin/post-new.php?post_type=page
i get this error:
Fatal error: Cannot redeclare class Search_Post_Module in ...\wp-content\plugins\search-unleashed\models\search-module.php on line 237
but all of a sudden, after reload the page a couple of times while playing witht the code in that file, it it working but the code remained intact.
weird, uh?
http://wordpress.org/extend/plugins/search-unleashed/
It happened again, and after i reloaded the error was gone
a more detailed error log:
( ! ) Fatal error: Cannot redeclare class Search_Post_Module in [..]\wp-content\plugins\search-unleashed\models\search-module.php on line 237
Call Stack
# Time Memory Function Location
1 0.0205 113104 {main}( ) ..\post-new.php:0
2 1.1486 31643936 get_default_post_to_edit( ) ..\post-new.php:50
3 1.7884 32205592 wp_insert_post( ) ..\post.php:371
4 1.8027 32230968 do_action( ) ..\post.php:2294
5 1.8043 32232656 call_user_func_array ( ) ..\plugin.php:395
6 1.8043 32232656 SearchUnleashedPlugin->save_post( ) ..\plugin.php:0
7 1.8429 32338640 include_once( '[..]\wp-content\plugins\search-unleashed\models\spider.php' ) ..\search-unleashed.php:452
Confirmed for WP 3.0 final.
Same here as well. Had to deactivate Search Unleashed in order to keep posting. Anyone from urbangiraffe looking at this?
Mark Barnes
Member
Posted 1 year ago #
I have the same problem on my production site, though it works fine on my test site.
I solved it by changing lines 237-241 to this:
if (!class_exists( 'Search_Post_Module' ) ) {
class Search_Post_Module extends Search_Module {
function is_post() {
return true;
}
}
}
mark8barnes, is that change in search-unleashed.php? My lines 237-241 in that file don't look like the right lines to change. Can you post the lines you changed?
I really hate to give up Search Unleashed but I can't take the continuous error messages anymore. Thanks!
Goce Mitevski
Member
Posted 1 year ago #
class Search_Post_Module extends Search_Module {
function is_post() {
return true;
}
}
The Search_Post_Module class can be found in search-module.php, placed in: /search-unleashed/models/
having same problems with classes being redeclared, mailed like to this thread to developer, lets hope we can get some feed back.
Leo Plaw
Member
Posted 1 year ago #
I had to do that if (!class_exists( 'Search_xxx_xxx' ) ) { }
to every single class in /search-unleashed/models/search-module.php
and as of writing this reply, I'm running 1.6 which is up to date. So there is no official fix yet.
@mark8barnes I can confirm that did indeed fix it on my site.
Running WordPress 3.0.4
Lembit Kivisik
Member
Posted 1 year ago #
Same here as Leo: had to add the check if (!class_exists( 'Class_Name' ) ) { } to every class 'in search-module.php', all 4 of'em. Plugin version 1.0.6, WP 3.0.4.
hughhempel
Member
Posted 1 year ago #
Same Problem here... I found 2 (Search_Post_Module & Search_Comment_Module) of the 4 "classes" mentioned by Lembit... Can someone specify the other 2 classes and confirm that they are located in "search-module.php"...
I love this plugin, but I am unable to POST after making the proposed changes...
Running 3.04 and 1.0.6
Where the heck is the author in all of this??? How can there be a "new version" as of January 6, 2010 and this known issue (more than a year old) was not addressed or mentioned...
Lembit Kivisik
Member
Posted 1 year ago #
@hughhempel The other 2 classes are Search_Module_Factory and Search_Module.
leichtman
Member
Posted 1 year ago #
I have the same problem. I found a work around. While in the back end instead of clicking on the add new post on the left sidebar I click posts.On the "Posts page" /wp-admin/edit.php I then click the addnew button and it works.