News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Error with new user registration

Started by Keep Looking, February 25, 2022, 09:10:15 AM

Previous topic - Next topic

Keep Looking

Hi folks! I'm an admin on a forum currently running on SMF 2.0.19. Recently new users trying to register on the forum have been unable to register: after trying to register a new account, they're directed to an error page reading "Undefined constant "error"". Does anyone here have any idea what the issue might be, and how I could solve it? I'm afraid I'm not super knowledgeable about code or forums or that sort of computer stuff, so I'm a bit off the deep end here.

There were a few incompatibility sort of issues that the system alerted me to when I updated to 2.0.19, but primarily they were to do with the search function (which had been customised before my time, somewhat badly) and after updating the search worked fine, so I don't think that is the issue.

Doug Heffernan

Quote from: Keep Looking on February 25, 2022, 09:10:15 AMHi folks! I'm an admin on a forum currently running on SMF 2.0.19. Recently new users trying to register on the forum have been unable to register: after trying to register a new account, they're directed to an error page reading "Undefined constant "error"". Does anyone here have any idea what the issue might be, and how I could solve it? I'm afraid I'm not super knowledgeable about code or forums or that sort of computer stuff, so I'm a bit off the deep end here.

There were a few incompatibility sort of issues that the system alerted me to when I updated to 2.0.19, but primarily they were to do with the search function (which had been customised before my time, somewhat badly) and after updating the search worked fine, so I don't think that is the issue.

Is there anything logged in the error log pertaining to this? It will help us in diagnosing the issue.

What incompatibility issues were you alerted about exactly? Do you remember?

From what version of Smf did you upgrade from and what mods do you have installed?


Keep Looking

#2
Quote from: Doug Heffernan on February 25, 2022, 09:13:00 AMIs there anything logged in the error log pertaining to this? It will help us in diagnosing the issue.

I can't find anything in the error log pertaining to this issue - the only error logged appears to be one within an existing user's post.

Quote from: Doug Heffernan on February 25, 2022, 09:13:00 AMWhat incompatibility issues were you alerted about exactly? Do you remember?

When I was installing SMF 2.0.19, in the test installation it said that the test had failed in ./Sources/Search.php - specifically, when I checked further it read as
"Code: (Find) [Select]
else
                    $_SESSION['search_cache']['num_results'] = 0;
Code: (Replace) [Select]
elseif ($_SESSION['search_cache']['num_results'] == -1)
                    $_SESSION['search_cache']['num_results'] = 0

I don't think that would be too relevant to new users being unable to register, though.

Quote from: Doug Heffernan on February 25, 2022, 09:13:00 AMFrom what version of Smf did you upgrade from and what mods do you have installed?

I was updating the forum from version 2.0.18. The mods we have currently installed are Responsive Curve, Anonymous Boards, Ohara YouTube Embed, Expanding and Collapsing Spoiler Tag, @mention members, Stop Forum Spam, reCAPTCHA for SMF, Custom Permissions, Additional Profile Permissions and Allow Deny Boards.

Doug Heffernan

Quote from: Keep Looking on February 25, 2022, 10:41:43 PMWhen I was installing SMF 2.0.19, in the test installation it said that the test had failed in ./Sources/Search.php

This sounds like an update you get when applying a patch through the package manager to me, or installing a mod. Are you sure that it was a full fresh install?

But I agree, this kind of error should not have caused the registration error. Can you refresh all your forum files by overwritting them with those from the large 2.0.19 upgrade package? This will uninstall all the mods as well as any custom/manual changes that you might have done to the files. Then see if the registration error will happen again. Like that will be able to determine if any of the mods is the culprit, or rule them out.

P.s. What is your php version btw?

Keep Looking

Quote from: Doug Heffernan on February 26, 2022, 08:11:36 AMThis sounds like an update you get when applying a patch through the package manager to me, or installing a mod. Are you sure that it was a full fresh install?

I installed 2.0.19 through the package manager, so it might be that (sorry, I don't know all the right terminology for these kinds of things).

I'm afraid I don't actually know how to find out what my forum's php is (as said before, I'm rather new to all this) - if you could tell me how to find out that'd be really great.

Also - I'm assuming with refreshing the forum files, there's a way to make it revert to how it was before and/or reinstall the mods?

Doug Heffernan

Quote from: Keep Looking on February 27, 2022, 08:30:50 AMI installed 2.0.19 through the package manager, so it might be that (sorry, I don't know all the right terminology for these kinds of things).

Do not worry about it. We all learn new things all the time.

Quote from: Keep Looking on February 27, 2022, 08:30:50 AMI'm afraid I don't actually know how to find out what my forum's php is (as said before, I'm rather new to all this) - if you could tell me how to find out that'd be really great.


In Smf 2.1. you can see it under PHP Info tab in the Admin Panel. I do not know if Smf 2.0.19 has this, as I do not have one installed, but you can see it at the Php Version section of your cpanel, or ask your host about it if you can not find it. Another way to see it for yourself is by following this guide:

https://wiki.simplemachines.org/smf/What_is_a_phpinfo()_file

Quote from: Keep Looking on February 27, 2022, 08:30:50 AMAlso - I'm assuming with refreshing the forum files, there's a way to make it revert to how it was before and/or reinstall the mods?

Refreshing the files will serve 2 purposes. 1) It will make sure that your forum is upgraded properly in case the automated patch did not work, and 2) it will rule out all mods as being the culprit/cause of the error. Hope it helps.

Oldiesmann

No need to put a phpinfo file up just to get the PHP version. Go to Admin and click "Support Information" (or click "Support and Credits" under "Main" from anywhere within the admin center). That will give you all the relevant info.
Michael Eshom
Christian Metal Fans

Advertisement: