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

Recent

Welcome to TinyPortal. Please login or sign up.

May 01, 2024, 12:34:18 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: 108
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 106
  • Total: 106

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.

@rjen

Quote from: lurkalot on July 20, 2020, 08:55:24 PM
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

It actually should not matter what setting you change: it is caused by the variable missing when a new cat is created. Same happens when you create a new cat and not make ANY changes to the settings. Then create a child cat and it happens too...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Attached file fixed it...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

Nice, same issue in 2.0.0... I'll fix that too...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Lesmond

 
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 mate fixed it for me too,  O0

@rjen

Quote from: lurkalot on July 20, 2020, 07:38:34 PM
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.

That is no longer an issue in 2.0.0: I did already add the 'Edit' icon on the reworked category layout as well. I could do the same in 1.6.x, but we agreed the 1.6 would be a bug-fix branch only, and this is not a bug, more of an 'unrequested-feature'..
Running Latest TP on SMF2.1 at: www.fjr-club.nl

@rjen

This actually makes me wonder: why do we even allow users to create articles and categories WITHOUT a name? Is that something that has a reason? Or is that because in the olden days no one thought to make the names required entry fields?

I am thinking to do that (make them required) to prevent such things from happening at all...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Quote from: @rjen on July 21, 2020, 08:11:00 AM
This actually makes me wonder: why do we even allow users to create articles and categories WITHOUT a name? Is that something that has a reason? Or is that because in the olden days no one thought to make the names required entry fields?

I am thinking to do that (make them required) to prevent such things from happening at all...

I wondered that too, hence why I said they should have some sort of default value, or it should prevent you from saving it without entering something.

@rjen

I noticed that I creates a default value when you create a new category without a name (-no name-), but it lets you delete it completely afterwards...

On articles something similar happens, but that seems to be more completely implemented.
I guess for categories it should be mandatory to specify a name at all times. What about articles?
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Quote from: @rjen on July 21, 2020, 08:22:19 AM
I noticed that I creates a default value when you create a new category without a name (-no name-), but it lets you delete it completely afterwards...

On articles something similar happens, but that seems to be more completely implemented.
I guess for categories it should be mandatory to specify a name at all times. What about articles?

Or blocks.  ;)

@rjen

Quote from: lurkalot on July 21, 2020, 08:25:14 AM
Quote from: @rjen on July 21, 2020, 08:22:19 AM
I noticed that I creates a default value when you create a new category without a name (-no name-), but it lets you delete it completely afterwards...

On articles something similar happens, but that seems to be more completely implemented.
I guess for categories it should be mandatory to specify a name at all times. What about articles?

Or blocks.  ;)

That's not an answer, but another question  ^-^ ...
So what do you think / want there?
Running Latest TP on SMF2.1 at: www.fjr-club.nl