2 baileyjs Dec 12, 2010 18:14
![](https://forums.b2evolution.net/media/users/baileyjs/profile_pictures/.evocache/2011-08-14-114258.jpg/crop-top-80x80.jpg?mtime=1441726970)
Note the "beta" in the version number ;)
Moving this to bugs forum
¥
Fixed in CVS
Reload plugins after you edit the file /plugins/basic_antispam_plugin/_basic_antispam.plugin.php
sam2kb wrote:
Fixed in CVS
Reload plugins after you edit the file /plugins/basic_antispam_plugin/_basic_antispam.plugin.php
It appears your modifications did not make it to b2evolution 4.0.3 stable. I had to download your reference file and replace the one bundled with b2evo 4.0.3 -which apparently is version 1.37 whereas yours is version 1.39
< * @version $Id: _basic_antispam.plugin.php,v 1.37 2010/02/08 17:56:01 efy-yury Exp $
---
> * @version $Id: _basic_antispam.plugin.php,v 1.39 2010/12/10 21:03:29 sam2kb Exp $
I was noticing in my Apache error log file multiple entries similar to what follows:
[client abc.def.ghi.jkl] PHP Notice: Undefined index: makelink in /my/path-to-my/blog/plugins/basic_antispam_plugin/_basic_antispam.plugin.php on line 214
Cheers!
Yeah, I noticed that too. I already sent a message to FG, hopefully he'll update the download.
Well, I do not know how it got fixed in CVS or the new version, but it's likely to be wrong - if not the hook invocation got fixed.
See this fix here: https://github.com/whissip/whissip/commit/4607124277c8c49b39da8ebbf153643a30d101f4
The problem is that "makelink" does not get passed from the plugin hook anymore, and every plugin making use of it would have to get "fixed" - it is no fix however, if you check if an accepted param exists.
In this case the notice alerts you that something is wrong, and it's the hook in this case.
Cool, added your fix to CVS
Thanks.
Then please revert the wrong fix, too.
Should be something like this:
https://github.com/whissip/whissip/commit/28a87487a2f84b11e7ec88c42487125ea7807b69
btw: this change is wrong because of two things:
1. "makelink" is always expected (and should throw a notice)
2. you should have used "empty", not isset - if "makelink" is provided as "true", it would return here, too.
done
blueyed wrote:
Thanks.
Then please revert the wrong fix, too.Should be something like this:
https://github.com/whissip/whissip/commit/28a87487a2f84b11e7ec88c42487125ea7807b69btw: this change is wrong because of two things:
1. "makelink" is always expected (and should throw a notice)
2. you should have used "empty", not isset - if "makelink" is provided as "true", it would return here, too.
Got raw file from your site:
wget --no-check-certificate https://github.com/whissip/whissip/raw/master/blogs/plugins/basic_antispam_plugin/_basic_antispam.plugin.php
A quick diff between sam2kb/basic_antispam_plugin & blueyed/basic_antispam_plugin shows:
30c30
< * @version $Id: _basic_antispam.plugin.php,v 1.39 2010/12/10 21:03:29 sam2kb Exp $
---
> * @version $Id$
251c251
< if( ! isset($params['makelink']) )
---
> if( ! $params['makelink'] )
663c663
< * $Log: _basic_antispam.plugin.php,v $
---
> * $Log$
Now I replace my current blog sam2kb/basic_antispam_plugin file with blueyed/basic_antispam_plugin and this is what my Apache error.log file shows:
[Wed Jan 19 02:53:43 2011] [error] [client xy.abc.def.ghi] PHP Notice: Undefined index: makelink in /myBlog/directoryPath/blog/plugins/basic_antispam_plugin/_basic_antispam.plugin.php on line 251
[...48 more lines snipped...]
[Wed Jan 19 02:57:14 2011] [error] [client tu.hij.kl.mno] PHP Notice: Undefined index: makelink in /myBlog/directoryPath/blog/plugins/basic_antispam_plugin/_basic_antispam.plugin.php on line 251
[Wed Jan 19 02:57:14 2011] [error] [client tu.hij.kl.mno] PHP Notice: Undefined index: makelink in /myBlog/directoryPath/blog/plugins/basic_antispam_plugin/_basic_antispam.plugin.php on line 251
[Wed Jan 19 02:57:14 2011] [error] [client tu.hij.kl.mno] PHP Notice: Undefined index: makelink in /myBlog/directoryPath/blog/plugins/basic_antispam_plugin/_basic_antispam.plugin.php on line 251
[Wed Jan 19 02:57:14 2011] [error] [client tu.hij.kl.mno] PHP Notice: Undefined index: makelink in /myBlog/directoryPath/blog/plugins/basic_antispam_plugin/_basic_antispam.plugin.php on line 251
Hence, I returned sam2kb/basic_antispam_plugin to my blog and errors are gone once again.
Cheers.
nanahuatl, you need the other/correct fix, too - see my message above (http://forums.b2evolution.net//viewtopic.php?p=106947&sid=699bbcbaa1a1866d290eeea058a7ec01#106947).
I added the second fix to cvs too. Just get the latest revision.
blueyed wrote:
nanahuatl, you need the other/correct fix, too - see my message above (http://forums.b2evolution.net//viewtopic.php?p=106947&sid=699bbcbaa1a1866d290eeea058a7ec01#106947).
Ok, I got your other fix (prior to noticing sam2kb reply):
wget --no-check-certificate https://github.com/whissip/whissip/raw/4607124277c8c49b39da8ebbf153643a30d101f4/blogs/inc/comments/model/_comment.class.php
After backing up the original, I overwrote the relevant file with the _comment.class.php downloaded previously as above. There are no more errors produced in Apache error.log :D
Thanks to you and sam2kb for the replies.
Best Professional Regards.
Good it works now.
However, you rather not want to replace the whole file - it is a fork/different branch after all.
In case it works out, fine, but just wanted to notice you about this.
You should have patched/manually edit your file instead.
blueyed wrote:
Good it works now.
[...]
In case it works out, fine, but just wanted to notice you about this.
You should have patched/manually edit your file instead.
Thanks for the warning. I only replaced the relevant lines as per your indications. I do not want security issues due to possible extraneous undefined variables.
http://www.metztli-it.com/readOnlyEphemeral/_comment_class_php.png
Cheers!
Sorry if this question is a little dense, but is the fixed plug-in available for download, or do I have to modify ver 1.37 myself?
If it's available for download, could someone please provide the link?
Thanks!
Ross
Seems like the antispam plugin piece is already OK. I used Blueyed's fix for _comment.class and the problem is fixed. Thanks!
Similar thing with me on the makelink error: