Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 09, 2022, 05:43:18 AM

Login with username, password and session length
Members
  • Total Members: 3842
  • Latest: Kokoro
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 57
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 1
Guests: 55
Total: 56

Author Topic: TPsubs.template.php Error after Upgrade to 2.2.2  (Read 299 times)

0 Members and 1 Guest are viewing this topic.

Offline Phasotron Zhuk

  • Jr. Member
  • **
  • Posts: 24
TPsubs.template.php Error after Upgrade to 2.2.2
« on: June 30, 2022, 09:35:05 PM »
Link to my forum: https://www.gollies.net.au/index.php
SMF version: 2.1.2
TP version: 2.2.2
Default Forum Language: English
Theme name and version: SMF Default Theme - Curve2
Browser Name and Version: Edge, Firefox & Brave latest versions (all display the same TP issue)
Mods installed: SMF Gallery Pro 9.0.1
Related Error messages: See attachment.

Ever since I updated SMF and TP I get the attached error message every time I sign in. It keeps occurring and piles up until I delete them all. Are you able to help stop it, please?
« Last Edit: July 04, 2022, 12:08:23 PM by @rjen »

Online @rjen

  • Support Team
  • *
  • Posts: 3285
    • FJR-club Nederland
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #1 on: July 01, 2022, 07:25:56 AM »
Strange, it seems that modsettings is not set in a page. It is coming from the recent topics block testing guest access to you forum.

Do you allow guests to visit the forum ?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Online @rjen

  • Support Team
  • *
  • Posts: 3285
    • FJR-club Nederland
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #2 on: July 01, 2022, 12:11:20 PM »
I tried to reproduce your issue but no luck...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline Phasotron Zhuk

  • Jr. Member
  • **
  • Posts: 24
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #3 on: July 03, 2022, 01:18:41 AM »
No, I allow guests to look at the front page (Home) but not go into the forum (Forum). I will check all the permissions to see if there is anything there. I might start by denying guests everything.

Offline Phasotron Zhuk

  • Jr. Member
  • **
  • Posts: 24
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #4 on: July 03, 2022, 01:37:40 AM »
This is the capture of the Backtrace.

Online @rjen

  • Support Team
  • *
  • Posts: 3285
    • FJR-club Nederland
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #5 on: July 03, 2022, 03:12:58 AM »
I understand where it comes from. Like stated before there is a check in the recent topics block that checks guest access.

Problem is I cannot reproduce it.

I visited your site and did not see the homepage as guest. Just got a login screen.
What permissions did you set on your recent topics block?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline Phasotron Zhuk

  • Jr. Member
  • **
  • Posts: 24
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #6 on: July 03, 2022, 08:06:45 PM »
I've attached caps of the blocks permissions, but it doesn't matter whether I have Guests selected or not, I still get the error message every time the Home page is accessed.

Online @rjen

  • Support Team
  • *
  • Posts: 3285
    • FJR-club Nederland
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #7 on: July 04, 2022, 12:22:31 PM »
Still cannot reproduce it, but this code change should fix it...

Mind you: I still do not understand why the $modSettings is not set on your forum. Something is definately wrong there...

Change the file TPsubs.template.php
Lines 651 and 652

Change from
Code: [Select]
// if no guest access to forum, then no recent topics
if($modSettings['allow_guestAccess'] == '0' && $user_info['is_guest']) {

to
Code: [Select]
// if no guest access to forum, then no recent topics
if(empty($modSettings['allow_guestAccess']) && $user_info['is_guest']) {
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info

Offline Phasotron Zhuk

  • Jr. Member
  • **
  • Posts: 24
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #8 on: July 04, 2022, 07:36:59 PM »
Thanks, @rjen for your time looking at this issue. The change to TPsubs.template.php has stopped the error. I don't know if this is related, but the default SMF Default Theme - Curve2 comes up twice in the Themes and Layout Settings, see attached caps. I'm wondering if I could remove the second one under Theme Settings? I'm reluctant to do so in case it removes the default theme completely.

Online @rjen

  • Support Team
  • *
  • Posts: 3285
    • FJR-club Nederland
Re: TPsubs.template.php Error after Upgrade to 2.2.2
« Reply #9 on: July 05, 2022, 11:18:36 PM »
You may be able to remove it if it is a one to one copy of standard. Don’t know obviously . You may better ask support on SMF since this is not a TinyPortal question
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 (latest Github)
Want to check what php version I am testing on? See: PHP Info