1 bgray Dec 12, 2010 01:09
3 yabba Dec 12, 2010 18:31
Note the "beta" in the version number ;)
Moving this to bugs forum
¥
4 sam2kb Dec 13, 2010 05:01
Fixed in CVS
Reload plugins after you edit the file /plugins/basic_antispam_plugin/_basic_antispam.plugin.php
5 nanahuatl Dec 27, 2010 00:40
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!
6 sam2kb Dec 27, 2010 01:18
Yeah, I noticed that too. I already sent a message to FG, hopefully he'll update the download.
7 blueyed Jan 16, 2011 22:59
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.
8 sam2kb Jan 17, 2011 03:16
Cool, added your fix to CVS
9 blueyed Jan 17, 2011 11:19
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.
10 sam2kb Jan 18, 2011 01:57
done
11 nanahuatl Jan 19, 2011 12:22
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.
12 blueyed Jan 19, 2011 13:09
nanahuatl, you need the other/correct fix, too - see my message above (http://forums.b2evolution.net//viewtopic.php?p=106947&sid=699bbcbaa1a1866d290eeea058a7ec01#106947).
13 sam2kb Jan 19, 2011 13:42
I added the second fix to cvs too. Just get the latest revision.
14 nanahuatl Jan 19, 2011 14:17
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.
15 blueyed Jan 19, 2011 15:57
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.
16 nanahuatl Jan 19, 2011 17:04
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!
17 rossputin Feb 01, 2011 15:21
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
18 rossputin Feb 01, 2011 15:45
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: