TinyPortal

Development => Support => Topic started by: Phasotron Zhuk on July 01, 2022, 04:35:05 AM

Title: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: Phasotron Zhuk on July 01, 2022, 04:35:05 AM
Link to my forum: https://www.gollies.net.au/index.php (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?
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: @rjen on July 01, 2022, 02:25:56 PM
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 ?
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: @rjen on July 01, 2022, 07:11:20 PM
I tried to reproduce your issue but no luck...
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: Phasotron Zhuk on July 03, 2022, 08: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.
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: Phasotron Zhuk on July 03, 2022, 08:37:40 AM
This is the capture of the Backtrace.
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: @rjen on July 03, 2022, 10: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?
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: Phasotron Zhuk on July 04, 2022, 03:06:45 AM
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.
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: @rjen on July 04, 2022, 07: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
// 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']) {
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: Phasotron Zhuk on July 05, 2022, 02:36:59 AM
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.
Title: Re: TPsubs.template.php Error after Upgrade to 2.2.2
Post by: @rjen on July 06, 2022, 06:18:36 AM
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