using smf 2.0.1.7
have no idea how to fix this
would appreciate any help
8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/*******/public_html/Themes/default/GenericControls.template.php (registration_agreement sub template - eval?)
Line: 53
This is the code
sCode: ', JavaScriptEscape($smiley['code']), ',
Am I doing something wrong here, that there are no responses?
Would appreciate any help
turn off eval, in the server settings screen of the admin.
Thank you so much for replying, I really appreciate it
I did what you said, and thought I had it beat, but later on
Apply Filter: Only show the error messages of this URLhttp://www.***.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/******/public_html/Themes/default/Register.template.php
Line: 53
Thanks for doing that. It gave us more info!
Can you reproduce it? Do you know what action triggers the error? Are they frequent?
There were several every day until I did what Kindred said
Now there were only two yesterday, and seems to me the error
is triggered by an IP addresses that I am pretty sure have nothing
to do with my forum. The majority of my members are in
Canada,
I have attached a screen shot...thank you so much for your help.
Just got another one, same IP as yesterday http://www.com/smf/index.php?action=trackip;searchip=185.232.21.27
How do you have guests configured? Is everything default? Or did you remove guest access for certain functions?
Another question: Have you enabled GDPR?
One more: Is this a new install, or did you upgrade an existing forum?
GDPR....I would say no, because I don't know how to do that.
This is not a new install, has been running for years, and
I have only kept up with the suggested upgrades.
Everything is basically default for guests, except someone
who is not a registered member, cannot see contact info
for members, they cannot see the entries on simple portal,
or the forum Boards and sub Boards.
I am willing to provide the url to someone with knowledge
and experience to have a look, if they wish.
thanks again for the reply
I hope I didn't give the wrong impression that this issue is solved.
I am still getting several errors of this type per day.
If there is any other info I can provide, please let me know.
Does registration work?
Yes, the registration process seems to work well.
The error seems to be always caused by a "guest" which
makes sense if they are trying to register I guess.
But mostly caused by Ip's with spam complaints.
I have blocked those in Cpanel, but that doesn't seem
to always work that well.
I do get the odd legitimate member causing it as well.
Do you have coppa enabled?
yes I do as well as an additional question to be answered.
Sounds like the error is being caused by a mod. If everything is working and you just want to stop the errors, you can make some fudge -
Register.template.php
// Age restriction in effect?
if (!isset($context['require_policy_agreement']))
$context['require_policy_agreement'] = null;
if ($context['show_coppa'])
echo '
<input type="submit" name="accept_agreement" value="', $context['coppa_agree_above'], '" class="button_submit" /><br /><br />
<input type="submit" name="accept_agreement_coppa" value="', $context['coppa_agree_below'], '" class="button_submit" />';
else
echo '
<input type="submit" name="accept_agreement" value="', $txt['agreement' . ($context['require_policy_agreement'] ? '_policy' : '') . '_agree'], '" class="button_submit" />';
Thank you very much, I will try that.
There are two...change them both?
Name
/public_html/smf/Themes/default/Register.template.php
/public_html/Themes/default/Register.template.php
Quote from: quartzster on April 14, 2020, 10:21:02 AM
Thank you very much, I will try that.
There are two...change them both?
Name
/public_html/smf/Themes/default/Register.template.php
/public_html/Themes/default/Register.template.php
You should change the one that is inside the forum folder that you are using, which by looking at your previous posts appears to be the one inside the smf folder.
thanks for your help
No problem
Quote from: doug_ips on April 14, 2020, 11:13:29 AM
Quote from: quartzster on April 14, 2020, 10:21:02 AM
Thank you very much, I will try that.
There are two...change them both?
unfortunately this did not work.
Name
/public_html/smf/Themes/default/Register.template.php
/public_html/Themes/default/Register.template.php
You should change the one that is inside the forum folder that you are using, which by looking at your previous posts appears to be the one inside the smf folder.
Changed both files, but still same problem.
Attach the edited file from the production install.
Hope this is right
Edit is correct. Go into Admin -> Server Settings and check 'Disable evaluation of templates'. Post the error.
Thank you....Disable evaluation of templates, is already checked...
What happens if you disable coppa?
ok, I have done that, now will have to wait and see.
Are you still getting this error?
Quote from: quartzster on April 03, 2020, 08:47:17 PM
Apply Filter: Only show the error messages of this URLhttp://www.***.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/******/public_html/Themes/default/Register.template.php
Line: 53
What triggers it?
Maybe it's coming from the source code. If error persists, try this -
/Sources/Register.php
loadLanguage('Login');
loadTemplate('Register');
if (!isset($context['require_policy_agreement']))
$context['require_policy_agreement'] = null;
// Do we need them to agree to the registration agreement, first?
$context['require_agreement'] = !empty($modSettings['requireAgreement']);
$context['registration_passed_agreement'] = !empty($_SESSION['registration_agreed']);
$context['show_coppa'] = !empty($modSettings['coppaAge']);
$context['require_policy_agreement'] = !empty($modSettings['requirePolicyAgreement']);
// Under age restrictions?
if ($context['show_coppa'])
{
$context['skip_coppa'] = false;
$context['coppa_agree_above'] = sprintf($txt['agreement' . ($context['require_policy_agreement'] ? '_policy' : '') . '_agree_coppa_above'], $modSettings['coppaAge']);
$context['coppa_agree_below'] = sprintf($txt['agreement' . ($context['require_policy_agreement'] ? '_policy' : '') . '_agree_coppa_below'], $modSettings['coppaAge']);
}
yes I still get the error, it seems to appear when a spam ID appears as a guest.
If it persists, I will definitely try what you are suggesting.
thank you very much
I tried turning off the captcha that was a mistake, had six new spam members waiting
for admin approval.
made the change you suggested, we'll see what happens
thanks again
tried the code change suggested by Sir Osis of Liver, but it had no effect.
I get two or three spam IP's per day, I have them banned and also blocked
on the server in cPanel, but that just doesn't work. It is these spam IP's
that appear to cause the errors, i.e line 53 and today also line 1264, 1262
and 627...all caused by a guest.
This is not doing any harm to my forum, just annoying and I have to
clean out the log everyday.
I contacted the host and he says
Adding 185.232.21.28 to csf.deny and iptables DROP... DROP all opt -- in !lo out * 185.232.21.28 -> 0.0.0.0/0 LOGDROPOUT all opt -- in * out !lo 0.0.0.0/0 -> 185.232.21.28
I asked him if this was something he did or I would have to do, he responded
We can both do. However like I one can only place 1IP at a time. No xx.xxx.x/xx
still shaking my head.
1- banning IPs for perma ban in SMF is a bad process
2- If setting the IPs to DENY in your htaccess does not prevent them from accessing your site, then there is a MAJOR issue with your hosting configuration
3- preventing SPAM registrations -- the *BEST* way is to use good questions. Not Captcha. Captcha is basically useless.
Kindred,
Thank you. I use Captcha plus one question, so
I can certainly change that.
I can remove the perma bans, and will check
my htaccess.
It always seems to be the same IP's, if I can
stop them from getting to the site I won't
have to worry about the errors.
thanks again
BTW: one question is not enough.
you need to have 20-30 questions and ask 2...
thank you, appreciate the info :)
Hi folks,
So far I have tried everything suggested, but this morning get these errors
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address 62.210.79.40
Reverse chronological order of list Today at 05:58:37 AM
Apply Filter: Only show the error messages of this session 04b8de95f51eecbc2c67395025863365
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://xxx.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/sc/public_html/Themes/default/Register.template.php
Line: 53
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address 196.52.84.45
Reverse chronological order of list Today at 05:13:55 AM
Apply Filter: Only show the error messages of this session ee2d987efd5e7a3f8d9edd54b542de0c
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/sc/public_html/Themes/default/Register.template.php
Line: 53
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address 77.243.191.23
Reverse chronological order of list Today at 04:09:50 AM
Apply Filter: Only show the error messages of this session 5be0b3e54be6449d87f752488d227984
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/sc/public_html/Themes/default/Register.template.php
Line: 53
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address 196.52.84.45
Reverse chronological order of list Yesterday at 09:22:32 PM
Apply Filter: Only show the error messages of this session 3b2d9f5437a4ed4acdc9f40f045d5058
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/sc/public_html/Themes/default/Register.template.php
Line: 53
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address
Reverse chronological order of list Yesterday at 06:01:48 PM
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?scheduled=task;ts=1587769200Apply Filter: Only show the errors with the same message8: Undefined index: character_setApply Filter: Only show the errors from this fileFile: /home/sc/public_html/smf/Sources/Subs-Post.php
Line: 1219
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address
Reverse chronological order of list Yesterday at 06:01:48 PM
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?scheduled=task;ts=1587769200Apply Filter: Only show the errors with the same message8: Undefined index: utf8Apply Filter: Only show the errors from this fileFile: /home/sc/public_html/smf/Sources/Subs-Post.php
Line: 1264
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address
Reverse chronological order of list Yesterday at 06:01:48 PM
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?scheduled=task;ts=1587769200Apply Filter: Only show the errors with the same message8: Undefined index: utf8Apply Filter: Only show the errors from this fileFile: /home/sc/public_html/smf/Sources/Subs-Post.php
Line: 1262
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address
Reverse chronological order of list Yesterday at 06:01:48 PM
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?scheduled=task;ts=1587769200Apply Filter: Only show the errors with the same message8: Undefined index: character_setApply Filter: Only show the errors from this fileFile: /home/sc/public_html/smf/Sources/Subs-Post.php
Line: 1219
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address
Reverse chronological order of list Yesterday at 06:01:48 PM
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?scheduled=task;ts=1587769200Apply Filter: Only show the errors with the same message8: Undefined index: serverApply Filter: Only show the errors from this fileFile: /home/sc/public_html/smf/Sources/Subs-Post.php
Line: 627
Apply Filter: Only show the error messages of this member Guest
Apply Filter: Only show the error messages of this IP address 196.52.84.33
Reverse chronological order of list Yesterday at 02:03:38 PM
Apply Filter: Only show the error messages of this session a0f96cc6b78db0394b19a1393ed9045c
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttp://www.xxx.com/smf/index.php?action=registerApply Filter: Only show the errors with the same message8: Undefined index: require_policy_agreementApply Filter: Only show the errors from this fileFile: /home/sc/public_html/Themes/default/Register.template.php
Line: 53
this is the content of my .htaccess file
order allow,deny
deny from 77.243.255.255
deny from 37.113.184.0/21
deny from 185.232.21.0/28
deny from 178.216.48.130
deny from 196.52.84.0/24
deny from 178.216.48.130
deny from 196.52.84.0/24
deny from 185.0.0.0 - 185.255.255.255
deny from 196.0.0.0 - 196.255.255.255
allow from all
As you can see, I get many of the same I.P addresses
every day, despite the fact I have tried to block them
and somehow they are causing these errors.
any help appreciated
quartzster, did you get this fixed? If not please let us know I am going to mark as solved as its been a month.
no I did not...it is not solved as there are no more replies, but you
can lock it if you wish, no new ideas or methods I guess.