TinyPortal

Development => News Board => Topic started by: @rjen on February 11, 2022, 07:10:52 PM

Title: TinyPortal 2.2.0
Post by: @rjen on February 11, 2022, 07:10:52 PM
The TinyPortal Team is pleased to announce the release of TinyPortal 2.2.0

TinyPortal 2.2.0 can be used on SMF 2.0 and 2.1

Minimum required PHP version : 7.2.0
Highest supported PHP version (tested) 8.1.1

Changelog: TinyPortal 2.2.0

Relevant to SMF 2.0 and 2.1:

New functionality:
- added most standard SSI functions as options to SSI block
- updated stats block to use thousand separators
- added font-awesome icons for menu options in specials themes
- updated installer to provide more consistent log information

Bugfixes:
- fixed block access page shows incorrect panels for blocks
- fixed Save button on block access pages showing between blocks when uneven #items
- fixed missing div on Downloads page when top downloads not activated
- fixed broken category links in profile articles view and use short names when available
- fixed link to article category from Profile
- fixed mini calendar blockcode for PHP 8.1
- fixed singleshout blockcode for 2.1.x
- general code updates for PHP8 compatibility

Note:
when updating from TinyPortal versions older than 2.1.0, shoutbox blocks are enhanced with a new block setting: "Characters to display in titles".
Due to this change any pre-existing shoutbox blocks 'may' have a changed title length after installing the new version of TP. Please check any shoutbox blocks and adjust the block setting "Characters to display in titles" to the desired length...

Download:
https://www.tinyportal.net/index.php?action=tportal;sa=download;dl=item172
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 10:30:46 AM
Getting this error when trying to install. New install of SMF 2.1.1

QuoteDuplicate column name 'display'
File: /home2/diabesv6/public_html/Packages/temp/install.php
Line: 912
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 10:33:18 AM
This is the code around line 912

$third = explode(',', $second);

// build new ones

if(count($third) > 1)

{

foreach($third as $t => $tr)

$new[] = $first.$tr;

}

else

$new[] = $first.$second;

}

}

else

$new[] = $row['display'];



$smcFunc['db_query']('', '

UPDATE {db_prefix}tp_blocks

SET display = {string:display}

WHERE id = {int:blockid}',
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 10:36:16 AM
From the error log

Quote$smcFunc['db_change_column']('{db_prefix}tp_blocks', 'access2', array( 'name' => 'display', 'type' => 'text', 'default' => ($db_type == 'mysql' ? null : '')));

A previous 'critical' error has this

QuoteThe database value you're trying to insert does not exist: access2
Function: require
Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 11:37:16 AM
What version of php, MySQL and TinyPortal (previous one)?
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 01:31:43 PM
PHP - 7.4
MySQL - 5.7
TinyPortal - 2.1.0 (previous one)
Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 02:00:51 PM
Quote from: Skb on February 12, 2022, 01:31:43 PM
PHP - 7.4
MySQL - 5.7
TinyPortal - 2.1.0 (previous one)

Thanks, I have just done the update from TinyPortal 2.1.0 to TinyPortal 2.2.0 three times in my test environment and none of them show the issue you are experiencing.

Admitedly it was a new TinyPortal 2.1.0 install after I'd cleared out all my old data from the previous update so not quite your scenario but as close as I could get it.
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 02:02:25 PM
Maybe I'll go in for a fresh install of SMF instead of upgrade. Will revert.
Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 02:03:23 PM
Quote from: Skb on February 12, 2022, 10:30:46 AM
Getting this error when trying to install. New install of SMF 2.1.1

QuoteDuplicate column name 'display'
File: /home2/diabesv6/public_html/Packages/temp/install.php
Line: 912

Looking back it, I think you have broken your install previously. Can you give me the structure of tp_blocks?

Did you by chance go back to an older version after previously updating.
Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 02:05:45 PM
Quote from: Skb on February 12, 2022, 10:33:18 AM
This is the code around line 912

$third = explode(',', $second);

// build new ones

if(count($third) > 1)

{

foreach($third as $t => $tr)

$new[] = $first.$tr;

}

else

$new[] = $first.$second;

}

}

else

$new[] = $row['display'];



$smcFunc['db_query']('', '

UPDATE {db_prefix}tp_blocks

SET display = {string:display}

WHERE id = {int:blockid}',


That's not line 912? I have it around 455
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 02:11:08 PM
Quote$smcFunc['db_change_column']('{db_prefix}tp_blocks', 'access2', array( 'name' => 'display', 'type' => 'text', 'default' => ($db_type == 'mysql' ? null : '')));

This is the code in the line 
Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 02:25:34 PM
Quote from: Skb on February 12, 2022, 02:11:08 PM
Quote$smcFunc['db_change_column']('{db_prefix}tp_blocks', 'access2', array( 'name' => 'display', 'type' => 'text', 'default' => ($db_type == 'mysql' ? null : '')));

This is the code in the line

What I think has happened is you installed TinyPortal 2.x.x then went back to TinyPortal 1.6.x (or similar)
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 03:45:40 PM
I did a fresh SMF install and I still have the same problem. I cannot install TP. I think TP is having some issue with the database as I had reported here

QuoteThe database value you're trying to insert does not exist: access2
Function: require
Title: Re: TinyPortal 2.2.0
Post by: @rjen on February 12, 2022, 03:47:34 PM
Quote from: tino on February 12, 2022, 02:03:23 PM

Looking back it, I think you have broken your install previously. Can you give me the structure of tp_blocks?

Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 03:58:38 PM
Quote from: @rjen on February 12, 2022, 03:47:34 PM
Quote from: tino on February 12, 2022, 02:03:23 PM

Looking back it, I think you have broken your install previously. Can you give me the structure of tp_blocks?


I think you are right. What exactly do you mean 'structure of tp_blocks'. I removed latest version and tried installing 1.6.2 onwards but I still get this problem.

Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 04:04:00 PM
Quote from: Skb on February 12, 2022, 03:45:40 PM
I did a fresh SMF install and I still have the same problem. I cannot install TP. I think TP is having some issue with the database as I had reported here

QuoteThe database value you're trying to insert does not exist: access2
Function: require

Do you mean a completely empty database with no TinyPortal tables? As this shouldn't happen, and is what I tested. Which works.
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 04:19:07 PM
No database is the same one only the install is full install not upgrade.
Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 04:34:41 PM
Quote from: Skb on February 12, 2022, 04:19:07 PM
No database is the same one only the install is full install not upgrade.

Then we need to see the structure of the database. Which can be viewed by phpMyAdmin.

It should be noted, and we are quite explicit. Going back from TinyPortal 2.x.x to TinyPortal 1.x.x will cause issues. This is one of them. You are going to have to manually correct your database.
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 12, 2022, 04:42:50 PM
Is this what you need to see.

Title: Re: TinyPortal 2.2.0
Post by: tino on February 12, 2022, 05:23:15 PM
Yes, it should look like the attached screenshot.

There are other things likely to be broken also, which I can't remember at the moment.
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 13, 2022, 03:31:02 AM
I restored the database from a backup which was made before upgrading to SMF 2.1.1
I have been able to install TP 2.1.0 but have lost the last few posts because of that. Otherwise things seem to be in order.
Title: Re: TinyPortal 2.2.0
Post by: @rjen on February 13, 2022, 07:01:36 AM
And what is the structure of the tp_blocks table now?
Title: Re: TinyPortal 2.2.0
Post by: Skb on February 13, 2022, 09:06:13 AM
Now it is this
Title: Re: TinyPortal 2.2.0
Post by: @rjen on February 13, 2022, 09:29:03 AM
The table is as it should be now, I do not see any reason for issues atm