TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

February 24, 2024, 02:22:38 AM

Login with username, password and session length
Members
  • Total Members: 3,881
  • Latest: fords8
Stats
  • Total Posts: 195,062
  • Total Topics: 21,208
  • Online today: 49
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 54
  • Total: 54

TPsubs.template.php Error after Upgrade to 2.2.2

Started by Phasotron Zhuk, July 01, 2022, 04:35:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Phasotron Zhuk

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?

@rjen

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

@rjen

I tried to reproduce your issue but no luck...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Phasotron Zhuk

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.

Phasotron Zhuk


@rjen

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

Phasotron Zhuk

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.

@rjen

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
// if no guest access to forum, then no recent topics
if($modSettings['allow_guestAccess'] == '0' && $user_info['is_guest']) {


to
// 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

Phasotron Zhuk

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.

@rjen

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