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

Recent

Welcome to TinyPortal. Please login or sign up.

May 01, 2024, 04:13:33 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 160
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 141
  • Total: 141

Undefined index

Started by Lesmond, July 20, 2020, 03:37:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lesmond

Maybe I'm doing something wrong :-[ but I am getting this error when clicking on  General Articles category.

Type of error: Undefined
8: Undefined index: showchild
https://forum.xxxxx.pw/index.php?cat=2
/home/lesmond/public_html/forum/Themes/default/TPsubs.template.php (Line 2103)


SMF 2.1 RC2 --- TinyPortal 1.6.7

lurkalot

Thanks Les.  I just replicated the error on my test site, not seen that one before. 

Type of error: Undefined_vars
Error message:
8: Undefined index: showchild
File: /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/Themes/default/TPsubs.template.php
Line: 2103
URL of page causing the error: http://lts4.byethost7.com/testsite7/index.php?cat=2

Backtrace information
#0: smf_error_handler()
Called from /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/Themes/default/TPsubs.template.php on line 2103

#1: category_childs()
Called from /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/Themes/default/TPortal.template.php on line 142

#2: template_category()
Called from /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/Themes/default/TPortal.template.php on line 38

#3: template_main()
Called from /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/Sources/Load.php on line 2636

#4: loadSubTemplate()
Called from /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/Sources/Subs.php on line 3472

#5: obExit()
Called from /home/vol11_7/byethost7.com/b7_24299229/htdocs/testsite7/index.php on line 176

Lesmond

I never checked the the backtrace info, looks the same on my site...

Code ( Backtrace information) Select

#0: smf_error_handler()
Called from /home/lesmond/public_html/forum/Themes/default/TPsubs.template.php on line 2103
#1: category_childs()
Called from /home/lesmond/public_html/forum/Themes/default/TPortal.template.php on line 142
#2: template_category()
Called from /home/lesmond/public_html/forum/Themes/default/TPortal.template.php on line 38
#3: template_main()
Called from /home/lesmond/public_html/forum/Sources/Load.php on line 2474
#4: loadSubTemplate()
Called from /home/lesmond/public_html/forum/Sources/Subs.php on line 3279
#5: obExit()
Called from /home/lesmond/public_html/forum/index.php on line 154

Lesmond

Could it be because there are no articles under "General Articles" ?

lurkalot

Quote from: Lesmond on July 20, 2020, 05:59:34 PM
Could it be because there are no articles under "General Articles" ?

No don't think so Les, I have articles in my General Category.  I can only replicate the error if I ad a sub cat to General articles.  Regardless of whether they have anything in them it seems to throw the error.

I noticed if I append my site url with ?cat=2 the page that comes up only shows a button with "Portal Features" on it, clicking this results in that error.

Lesmond

I have removed the "Portal Features" category but I am not sure if the error appeared before doing that.

lurkalot

Quote from: Lesmond on July 20, 2020, 06:26:43 PM
I have removed the "Portal Features" category but I am not sure if the error appeared before doing that.

I would leave as is for the moment Les, see if @rjen or Tino can come up with a fix for it, hopefully they can also replicate it.

One thing also noticed, but unrelated.  While trying to replicate this I deleted the sub cat name and saved, there was no way to get back to that category to edit it afterwards, even though it's obviously still there. So that's another issue.  Probably needs some sort of default value. 

@rjen

Quote from: lurkalot on July 20, 2020, 06:12:57 PM
I noticed if I append my site url with ?cat=2 the page that comes up only shows a button with "Portal Features" on it, clicking this results in that error.

That's the default Cat list setting. The page is empty because it does not contain any articles...

I can see the error: it comes up when there is a subcategory created...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Go to the category settings, switch ON the setting show subcategories and save it. Errors will be gone.
It seems the variable is not set on install...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Quote from: @rjen on July 20, 2020, 08:42:25 PM
Go to the category settings, switch ON the setting show subcategories and save it. Errors will be gone.
It seems the variable is not set on install...

Thanks @rjen, yep switched on "Display any child categories?" and indeed the errors stopped.  O0