TinyPortal

Development => Support => Topic started by: davo88 on January 22, 2024, 06:18:42 AM

Title: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 06:18:42 AM
Link to my forum: NA - test forum only
SMF version: 2.1.4
TP version: TP ver. 3.0.0
Default Forum Language: English
Theme name and version: Default SMF Curve2
Browser Name and Version: Brave Chromium to 120.0.6099.217, Firefox 121.0.1
Mods installed: None
Related Error messages: Unable to load the 'tp_above' template

Just did a fresh install of SMF, imported the database, checked everything working, then installed TP 3.0.0. No mods or code edits at all. Installation appeared to run normally.

2024.01.22-16.52 - Screenshot 002.png

Then after closing the above window. the error message below appeared.

2024.01.22-16.53 - Screenshot.png

Clicking any link on the main page produces the same error message. Forums are inaccessible.

The same database has been imported into at least three other 2.1.4 test forums, also fresh installs with no mods, they are all working normally. I can do another fresh install if it helps at all.

Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 08:30:58 AM
Looking at the screenshots and the message I suspect that somehow the template files and language files are not in the \Themes\default folders.

Can you check these folders if they have the TP* template files?

2024-01-22_092710.jpg

If not you can try to copy the files from the install package to your server...
Normally you can just move these folders with the content to your server...

2024-01-22_092857.jpg

I have tested the install many times with the TP3.0.0 package and this never happened, so I can only imagine it has something to do with your server settings...
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 04:37:45 PM
Quote from: @rjenCan you check these folders if they have the TP* template files?

They all seem to be there.
2024.01.23-02.48 - Screenshot.png

So I did a second install, no data imported this time. Same confirmation notices after installing TP
2024.01.23-03.16 - Screenshot.png

2024.01.23-03.17 - Screenshot.png

And it all seems to work OK.
2024.01.23-03.17 - Screenshot 002.png

So could it be something in the database? Perhaps I should try a third install with the database in place again just to make sure it wasn't something quirky with that first test? I will do that now.

A related question... let's say I install SMF, then TP, but no database, as done with this '215_Test' site.
Is it then possible to drop the mainly empty smf_ tables from the database (leaving the smf_tp_ tables in place) and import the smf_ tables containing the data from my forum? Or does TP write data into the smf_ tables during installation?

Note there are no additional mod-created tables in my forum database.

Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 04:46:53 PM
TinyPortal does not store data in the SMF tables, everything is stored in the tables that are prefixed with tp_*

I just re-read your original message and only now I notice that you mentioned importing a database to the new install. However you never mentioned that after you imported a database also ran repair_settings.php?

Did you do that before you installed TP?

If not, that may very well explain the error: Tinyportal tries to call the templates in the default template according to the smf directory settings. If those are incorrect (because they were not fixed after importing the database) that may very well result in the error you were getting.
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 05:31:12 PM
Quote from: @jenDid you do that before you installed TP?
Definitely. I always run Repair Settings and then check forum topics to make sure posts, avatars, attachments - everything is working normally.

So I just did a third install - '220-Test'. The sequence was:

One thing I did do differently, was at the end of the TP installation.
In '210_test' (the first one), I think I clicked on the link that said something like "Redirect to TP". I don't have a snip of it but the 'Red' is just visible at the bottom of this snip.
2024.01.23-03.57 - Screenshot.png

In this latest install (220-Test), I didn't do that and just clicked on one of the SMF menu items. It's a minor point, but thought I should mention it.
Anyway, with this 220-Test, we have a third result which is sort of halfway between the first two tests. The installation has basically worked, the TP admin panel is accessible, but the panels and blocks are not laid out in the normal manner.

This sequence of four snips taken scrolling down the page, hopefully conveys what it is like.
2024.01.23-04.14 - Screenshot 002.png
2024.01.23-04.15 - Screenshot.png
2024.01.23-04.14 - Screenshot.png
2024.01.23-04.26 - Screenshot.png

The snips don't include all the forums listed because there a lot of them. But it is the sequence of the panel layout - left only, centre and right, centre only - that I thought might indicate something.

Only the left panel appears at first, then we scroll down to the shout box at the bottom and the centre panel containing the forum and the right panel appear. Then once we get to the bottom of the right panel, the forum becomes full width occupying the space of all three panels - left, centre and right.

Not sure what to try next.

   
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 05:43:29 PM
Ctrl f5?

Can you share a link?
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 05:57:49 PM
PM sent with links to the three test sites.

Ctrl-F5 - no change that I could see.

I could try importing the forum database into the 215-Test (the no data site).
Or I could repeat the sequence of 210-Test and 220-Test but using TP 2.3.1 instead of 3.0.0:

Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 06:01:45 PM
Ahhh! I just logged out and 220 came good!
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 06:03:36 PM
 :hmm:

and is stays good when you log back in?

it looks to me like there may be a closing div missing or too many...
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 06:05:16 PM
Quoteand is stays good when you log back in?

No, goes back to the long layout described above.
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 06:10:22 PM
Can you get me an account please?
Title: Re: Unable to load the 'tp_above' template
Post by: lurkalot on January 22, 2024, 06:12:01 PM
Your second test the one that worked ok, you said there was no no data imported on that occasion.  So something iffy with your database perhaps. 

What mods were you running on the original forum you got the database dump from?  And have you also installed those mods.  Have you any hooks showing in SMF Admin > Forum Maintenance > Integration Hooks?
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 06:16:03 PM
@rjen - A regular member account or admin account? Will need an email address won't I?

lurkalot - Will set up @rjen and then get back to you.
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 06:22:34 PM
an admin account plz. just register with a dummy mail adres and send me the details in PM here
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 06:32:26 PM
Just curious: after installing SMF2.1.4 you are 'importing the database'. What database are you importing? I hope it is a 2.1 database, and not your old 2.0 database...
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 06:36:45 PM
The broken page layout is related to the fact that your smileys seem to be broken in the forum...

Not sure how, but after I deactivated the smileys in the shoutbox it looks okay. Maybe a wierd case that I have never seen before. First question that comes to mind: why are your smileys missing?
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 06:58:51 PM
@rjen - Two accounts set up - regular and admin - details in PM.

lurkalot
The database is a processed version of my working 2.0.19 forum. Here is the sequence of events I followed.





Finally...

That is the database I have been using in further 2.1.4 test sites and these TP test sites.
Note that when imported into a stock 2.1.4 site, everything appears normal and working.

@rjen, I will have a look at the Smileys issue now.
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 07:08:20 PM
Thorough process. Chapeau!

But as far as I can see in test site 220 the smileys are not working, also not in the forum. That as a pre-existing condition, not caused by TP.

I tried to reproduce the issue on a test board by removing the smiley directories and then just the files, but for me the display does not break like yours...
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 07:17:35 PM
there is also something funky with the avatars

Edit: Link removed.

is missing
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 07:29:19 PM
Quote... why are your smileys missing?

Rushing to set up these latest test sites this morning, I had not copied over the 'default' set of smileys to the Smileys directory.
They are a phpBB set of smileys from 2004. Have copied them over now, but they are still not appearing correctly. Will have to fiddle with the settings some more.

I will go back to square one. Take a break for a while, retrace my steps through the cleaning and conversion process, then set up a fresh 2.1.4 site, install the database, ensure the smileys are working, then install TP 3.0.0.

Bloody smileys... :tickedoff: 

Quote from: @rjen"there is also something funky with the avatars
Thanks @rjen, will check that too before next test.
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 07:34:43 PM
Okay, I found why the smileys are not showing...

When I activated the user selectable smiley sets I saw in my profile that the DEFAULT smiley path is

http://blablabla/220-Test/Smileys/phpbb/

Where your smiley set is the /default/..

after I changed my profile the display now works and also shows the smileys in the post form..

Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 07:35:24 PM
@rjen, would you be able to remove the URL in above post please? I would prefer that not be available publicly. Thanks.
Title: Re: Unable to load the 'tp_above' template
Post by: lurkalot on January 22, 2024, 07:36:15 PM
Yes the you need to bring those essential directories to the test sites as the database will be calling for them. 

I would also run Repair settings again to make sure everything is in order. At least you seem to be making progress.  ;)
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 07:37:42 PM
Quote from: davo88 on January 22, 2024, 07:35:24 PM@rjen, would you be able to remove the URL in above post please? I would prefer that not be available publicly. Thanks.

done.

I think you need to check the smiley sets in your 2.1 forum: I do see some references to a phpbb set that actually does not exist...
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 07:47:36 PM
Quote from: @rjenI do see some references to a phpbb set that actually does not exist...
They were there in the Smileys directory, I just had to import them in the SMF admin panel. ... et voila! everything appears normal in the TP layout.
Amazing... they are a troublesome bunch those smileys. :o
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 07:51:15 PM
I could not even reproduce the issue in my test site, even after knowing what the issue is... nothing I can do in TP...
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 07:57:20 PM
Any theories on why TP would look normal for a regular user, but not for an admin under these 'not smiley' conditions?
Title: Re: Unable to load the 'tp_above' template
Post by: tino on January 22, 2024, 08:01:25 PM
Quote from: davo88 on January 22, 2024, 07:57:20 PMAny theories on why TP would look normal for a regular user, but not for an admin under these 'not smiley' conditions?

You can't post in the shoutbox unless you have permissions to, so assume that was disabled for the non admin user.
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 08:06:29 PM
Exactly:  the little element that shows the smileys is only showing for users that have permission to shout. Due to the inconsistency in the settings this element was not constructed correctly when logged in..
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 08:14:30 PM
QuoteI could not even reproduce the issue in my test site, even after knowing what the issue is... nothing I can do in TP...

I have had trouble, even back in 2.0.19 with smileys under these conditions where I am using a custom set of smileys. I have found that even when I copy all the smileys from the phpBB directory into the default directory, then make the default directory the default set of smileys, check them in the Edit Smileys and Set Smiley Order windows, they do not show up in the posting window unless the old phpBB directory is imported and sitting there along side the default directory. Even though it is not set as default, it has to be there for the smileys to appear in the posting window.
 
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 08:52:39 PM
@rjen, I plan to wipe this batch of test sites and replace them with new files for TP testing. Is it any help if I set up one or two with the same smiley issue for later testing while I can remember the exact smiley conditions that caused the problem? They can sit there for a few months, but I just need to give them different names so they are outside my current test site numbering system.
Title: Re: Unable to load the 'tp_above' template
Post by: tino on January 22, 2024, 08:52:42 PM
That suggests that something isn't configured correctly in the database or Settings.

Title: Re: Unable to load the 'tp_above' template
Post by: lurkalot on January 22, 2024, 08:54:35 PM
I've always found the smileys sys a bit of a mare. Hence, https://github.com/SimpleMachines/SMF/issues/5368
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 08:58:30 PM
Quote from: davo88 on January 22, 2024, 08:52:39 PM@rjen, I plan to wipe this batch of test sites and replace them with new files for TP testing. Is it any help if I set up one or two with the same smiley issue for later testing while I can remember the exact smiley conditions that caused the problem? They can sit there for a few months, but I just need to give them different names so they are outside my current test site numbering system.

It is up to you.
We have coded TinyPortal to work in correcty configured SMF forums. With incorrect setups anything can happen as you found out. Since I cannot even re-create the issue I will not be investigating it further.

I trust that you will address the smiley issue in your migration tests. If you find any TinyPortal issue on a correctly configured install I am happy to look into that...
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 09:08:14 PM
Quote from: @rjen...after I changed my profile the display now works and also shows the smileys in the post form..
Now I understand why both sets of smileys are needed. I see a field in the database for 'smiley_set', but where does one choose that in a personal profile? Looking through the last 500 records of the members table, I don't see any data in the smiley_set field, even for yours.
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 22, 2024, 09:09:52 PM
OK, found it.
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 22, 2024, 09:16:49 PM
Quote from: davo88 on January 22, 2024, 09:08:14 PM
Quote from: @rjen...after I changed my profile the display now works and also shows the smileys in the post form..
Now I understand why both sets of smileys are needed. I see a field in the database for 'smiley_set', but where does one choose that in a personal profile? Looking through the last 500 records of the members table, I don't see any data in the smiley_set field, even for yours.


I changed my profile back to forum default
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 23, 2024, 05:22:15 AM
Can we mark this question solved then?
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 23, 2024, 07:17:45 AM
Yes. Thank you very much for your fast and thorough help this morning @rjen.
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 23, 2024, 07:38:28 PM
@rjen, the URL in post #18 (https://www.tinyportal.net/index.php?msg=304070) has somehow returned. Would you be able to edit it out again pls?
Title: Re: Unable to load the 'tp_above' template
Post by: lurkalot on January 23, 2024, 07:43:31 PM
Quote from: davo88 on January 23, 2024, 07:38:28 PM@rjen, the URL in post #18 (https://www.tinyportal.net/index.php?msg=304070) has somehow returned. Would you be able to edit it out again pls?

I've removed it for you.  ;)  :tick:
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 23, 2024, 08:17:21 PM
That's an edited url
Title: Re: Unable to load the 'tp_above' template
Post by: lurkalot on January 23, 2024, 08:25:12 PM
This one's the edited url https://www.tinyportal.net/index.php?topic=36913.msg304072#msg304072

But this one still had a working link, I tried it before I removed it. https://www.tinyportal.net/index.php?msg=304070

Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 23, 2024, 08:34:11 PM
Thank you!
Title: Re: Unable to load the 'tp_above' template
Post by: @rjen on January 24, 2024, 09:49:12 PM
Quote from: @rjen on January 22, 2024, 08:58:30 PM
Quote from: davo88 on January 22, 2024, 08:52:39 PM@rjen, I plan to wipe this batch of test sites and replace them with new files for TP testing. Is it any help if I set up one or two with the same smiley issue for later testing while I can remember the exact smiley conditions that caused the problem? They can sit there for a few months, but I just need to give them different names so they are outside my current test site numbering system.

It is up to you.
We have coded TinyPortal to work in correcty configured SMF forums. With incorrect setups anything can happen as you found out. Since I cannot even re-create the issue I will not be investigating it further.

I trust that you will address the smiley issue in your migration tests. If you find any TinyPortal issue on a correctly configured install I am happy to look into that...


Just an FYI. I managed to replicate the issue in a test forum by changing the database and assign a non-existing default smiley set.

It turns out this issue may also appear in a forum that has less the 5 smileys in the post form. A Highly unlikely scenario, but I made a fix for 3.0.1 nonetheless...
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 25, 2024, 03:27:52 AM
That's great. I was concerned another new user might come along, encounter a similar problem and maybe get the wrong impression about TP. I would never have connected the unusual panel layout that appeared after installation, with a smiley issue.
Title: Re: Unable to load the 'tp_above' template
Post by: Skhilled on January 27, 2024, 05:23:36 PM
@davo88 - I remember being in the same situation. I made a test site and just copied the images into new smf smileys so I wouldn't have to deal with the smf/phpBB issue.
Title: Re: Unable to load the 'tp_above' template
Post by: davo88 on January 27, 2024, 09:56:09 PM
@Skhilled - Like your text !! "Once you stop learning...!"

So you just copied them into one of the 2.1 smiley directories - Fugue or Alienine - and then chose to display that set as your smileys. Then you had no smiley directory called phpBB anymore? Is that right?
Did you get additional new smileys displayed from the new set that weren't in the phpBB set?

I did try a similar thing and copied them into a set called "Default". And even though that was set to be the default smiley set, the posting window required the presence of the phpBB smiley directory. I also changed the setting for the smiley directory in the admin theme panel (Select default smiley set for this theme), but somewhere there was still a  reference to the phpBB directory. I searched the database for phpBB and couldn't find anything that looked like a setting. So I never fully solved it. Just ended up having to have the phpBB smiley directory there along side the default smiley directory, both containing the same set of smileys.
Title: Re: Unable to load the 'tp_above' template
Post by: Skhilled on January 27, 2024, 10:37:36 PM
LOL, thanks! I'll never stop trying to learn things and I just turned 62. ;)

Well, this happened quite a number of years ago and I was using SMF 2.0. So, I'm sure that you may have to take a different approach because of the coding and db changes. But, I do remember having smiley issues.  I believe there was left over phpBB code somewhere and had to edit the db but I can't seem to find the topic for it (not here).

You might want to search for 'smileys' instead of 'phpBB' in your database.

EDIT: If that doesn't work, you want to create a full fresh smf install for testing so you can compare your db to the fresh one.