Advertisement:

Author Topic: Users Can't Register  (Read 7102 times)

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Users Can't Register
« on: October 13, 2012, 12:47:05 PM »
I just recently upgraded to SMF 2.x (the latest version), and now users can't register. When they click on the Register link, they get:

Code: [Select]
The website encountered an error while retrieving http://www.hiddendragon.com/forums/index.php?PHPSESSID=3a6a8eafabcda7e51002b01f7233c685&action=register. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

When I check the error log, I see this:

Code: [Select]
71eece34a0336a1f506d547eaa2a61b2
 Type of error: Undefined

http://www.hiddendragon.com/forums/index.php?action=admin;area=logs;sa=errorlog8: Undefined index: newsFile: /services4/webpages/h/i/hiddendragon.com/public/forums/Sources/Subs.php
Line: 3177

Attached is my Subs.php file. Any suggestions?

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,864
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Users Can't Register
« Reply #1 on: October 13, 2012, 03:20:58 PM »
Welcome to the forums.

I am sorry to hear you are having trouble. The usual question though, do you have any mods installed? If so, which ones?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

kat

  • Guest
Re: Users Can't Register
« Reply #2 on: October 13, 2012, 03:49:39 PM »
Hi, jvaran!

That file seems bog-standard. Soooo... it could be important for us to know which version of SMF you upgraded FROM.

If the index "newsFile" isn't being defined, I'd suggest that the upgrade failed and it might be worth retrying. But, that might depend on which version you were using, before you upgraded.

Edit: Just been discussing this, with dear old Shambles. He's had an idea that you might have something weird in your "news" settings.

Can you go to Admin > News settings and check what's there?
« Last Edit: October 13, 2012, 04:38:12 PM by K@ »

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #3 on: October 14, 2012, 01:03:33 AM »
I upgraded from the latest 1.x version. I had some packages installed in the old version, but after I upgraded none of them came across (as expected). The only package I have installed on the new version is "Stop Forum Spam".

I went into News in the Admin section. Under "News", there is nothing defined (no news). Under Settings, all permissions are set to "Global Moderators" only.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #4 on: October 14, 2012, 12:42:33 PM »
I went into News in the Admin section. Under "News", there is nothing defined (no news). ...

Try entering some text in the news (you might have to use the "Click here to add another item." link)

Your error seems to stem from there being nothing defined for $modSettings['news'] which would normally contain news items, even if they are NULL.

Try it and report back :)

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #5 on: October 14, 2012, 07:54:57 PM »
I tried it, and it made no difference.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #6 on: October 15, 2012, 05:34:48 AM »
Did your forum allow you to enter (and save) a news item, with no errors reported in the logs?

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #7 on: October 15, 2012, 08:42:12 AM »
Yes, it did. Though I don't see the news item show up anywhere, but maybe I just don't know where to look.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #8 on: October 15, 2012, 08:50:25 AM »
In Admin > Configuration > Current Theme > Theme Settings should be a box labeled

> "Show news fader on board index:   [x]"

I must admit I'm struggling to see why the 'news' index to your $modSettings variable isn't available at that point in your Subs.php

Is there more in your error log that you haven't listed?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #9 on: October 15, 2012, 08:56:21 AM »
While we're struggling through this, drop the attached file in place of your current Subs.php (keep a copy of the original Subs.php)

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #10 on: October 15, 2012, 10:01:47 AM »
In Admin > Configuration > Current Theme > Theme Settings should be a box labeled

> "Show news fader on board index:   [x]"

I must admit I'm struggling to see why the 'news' index to your $modSettings variable isn't available at that point in your Subs.php

Is there more in your error log that you haven't listed?

Thanks, this worked to show the news item I added.

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #11 on: October 15, 2012, 10:02:21 AM »
While we're struggling through this, drop the attached file in place of your current Subs.php (keep a copy of the original Subs.php)

Still doesn't work, but I get a slightly different error:

Code: [Select]
http://www.hiddendragon.com/forums/index.php?PHPSESSID=c89c57031cfdbe2e4c477c38123518eb8: Undefined index: news_linesFile: /services4/webpages/h/i/hiddendragon.com/public/forums/Sources/Subs.php
Line: 3190

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #12 on: October 15, 2012, 12:41:49 PM »
Well I guess that some part of your upgrade didn't convert correctly.

I'm gonna stick with this for a while. In the meantime, please use the following copy of Subs.php (it checks for the news items and reacts accordingly)

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #13 on: October 15, 2012, 12:46:37 PM »
Is there a way I could reinstall then, without losing my data and settings?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #14 on: October 15, 2012, 12:48:31 PM »
Well, you'd lose Stop Forum Spam (I think that's the only mod you installed?) if you installed 2.0.2 from scratch, but your current database should remain intact.

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #15 on: October 15, 2012, 01:10:23 PM »
How would I go about doing it? I don't mind reinstalling the one mod.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #16 on: October 15, 2012, 01:14:59 PM »
I'm not an expert on reinstallations so can't really help there.

Did you try that Subs.php?

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #17 on: October 15, 2012, 01:53:57 PM »
While you're comtemplating that ;) which version of the DS-Natural theme are you currently running? Did you apply the version for SMF 2.0.2?

Might be worth a quick query on DzinerStudio.com

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #18 on: October 15, 2012, 01:54:29 PM »
I did. Same error as before, but it displays the news items properly.

kat

  • Guest
Re: Users Can't Register
« Reply #19 on: October 15, 2012, 02:23:16 PM »
This is just a hunch...

Try emptying the forum's cache, in Forum Maintenance.

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #20 on: October 15, 2012, 02:35:41 PM »
While you're comtemplating that ;) which version of the DS-Natural theme are you currently running? Did you apply the version for SMF 2.0.2?

Might be worth a quick query on DzinerStudio.com

I did install the version for 2.0.2. I tried resetting back to the default theme, and the problem is still there.

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #21 on: October 15, 2012, 02:37:03 PM »
This is just a hunch...

Try emptying the forum's cache, in Forum Maintenance.

Just tried it, still no luck. However, while in there I checked all file versions, and for "Default Templates" I have 2.0 instead of 2.0.2. I'm not sure if that might be the cause of the problem, or how I would go about updating those files.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #22 on: October 15, 2012, 02:54:07 PM »
For the sake of moving forwards, can you apply this final version?

If you see any errors reported from Subs.php can you list them please?

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #23 on: October 15, 2012, 03:12:31 PM »
I get this error in Chrome:

Code: [Select]
Server error
The website encountered an error while retrieving http://www.hiddendragon.com/forums/index.php?PHPSESSID=11f12231817f68135ebd441b3992cc81&action=register. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

However, there is nothing in the SMF Error Log.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #24 on: October 15, 2012, 03:50:42 PM »
Weird. This is gonna take some thinking about...

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,794
    • StoryBB/StoryBB on GitHub
Re: Users Can't Register
« Reply #25 on: October 15, 2012, 03:56:05 PM »
Firstly, note that newsFile doesn't exist. It should never exist in a stock install. It is index 'news' and the File bit is always on the next line but for some reason when you copy from the error log it mashes things together.

That said, farting around with Subs.php isn't solving the problem - the undefined errors won't cause it to fail like that, simple as that. It might break the CAPTCHA, possibly, but it wouldn't cause a 500 on action=register.

Something is more fundamentally wrong, and I'd be looking at... Register.php and Subs-Members.php being compared to a stock copy from 2.0.2 to see what's different.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline jvaran

  • Semi-Newbie
  • *
  • Posts: 23
Re: Users Can't Register
« Reply #26 on: October 15, 2012, 11:05:13 PM »
I replaced Register.php and Subs-Members.php from a clean copy of SMF 2.0.2, and everything worked fine. Replacing Register.php messed up my install of Stop Forum Spam (as expected), but I went back in and made the required changes to that file again. And everything still works fine. So my best guess, I probably made a typo while modifying Register.php for the "Stop Forum Spam" mod.

I appreciate all the help! Thanks!  :)

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,088
  • Gender: Male
    • i30 Owners Club
Re: Users Can't Register
« Reply #27 on: October 16, 2012, 02:42:11 AM »
For closure, the various tweaks we made to Subs.php gradually removed the reference to $modSettings['news'] upto the point where Subs.php no longer 'failed' and the true origin of the fault was no longer being disguised, allowing the real error in Register.php to shine through.

That's my story, and I'm sticking to it.

Hey jvaran - it's good that you're up and running. Good luck with the forum (it looks like it's got potential) :)