TinyPortal

Development => Support => Topic started by: Gavin Chatt on September 30, 2020, 01:30:29 PM

Title: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on September 30, 2020, 01:30:29 PM
Link to my forum: http://austeamracing.com.au
SMF version: SMF 2.0.17
TP version: 2.0.0 RC1
Default Forum Language: English
Theme name and version: Skyfall
Browser Name and Version: Google Chrome and Firefox
Mods installed: TinyPortal, User Online, Disable Last Edited, discord webhooks
Related Error messages: DataBase Error



Hello All,

I've search the boards and see other have had this issue however I'm still unsure on how to fix and seek some support please. I've had no issues with the boards until the attempt to add a new block.

I was setting up the new TP block and after attempting to save a couple of times must have missed why this fell over. I ended up with the following error

Database error, given array of integer values is empty. (cat)

And now thinking about it didn't select a category for the panel, in the end I've been locked out. As mentioned searched these boards for a fix and as such went in to the database and drop'd / deleted the table I had tried to setup (last entry) from the smfyj_ezp_blocks area.

I have played a bit with DB's however have very little experience in databases but now I think I have made this problem worse.

Can someone provide me with some assistance please.

I'm using a very fresh / new forum board but don't wish to loose the data already setup, the details are below. All works until you login in.


Thanks in advance

Kind Regards
Gavin

Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on September 30, 2020, 02:03:49 PM
You can remove and reinstall TinyPortal if you can access the packages section. That won't lose any data until you choose to remove everything.

If that isn't an option you can copy the do_hooks.php from the install package and run that to remove the hooks which TinyPortal has installed and you should be able to uninstall and reinstall it that way.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on September 30, 2020, 02:30:44 PM
Hi Tino,

Thank you for your reply, I'll try the second option as I'm locked out of the site all together right now.

Uploaded do_hooks.php to the route directory and it looked like this would work however its not sorted as yet.

Also tried a different browser

Call to undefined function TPortalHookLoadTheme()  :'( :'( :'( :'(

Kind Regards
Gavin
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: @rjen on September 30, 2020, 04:24:27 PM
smfyj_ezp_blocks area ?

That's not TinyPortal! Could it be that you are using ez portal instead?
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on September 30, 2020, 05:15:04 PM
Quote from: Gavin Chatt on September 30, 2020, 02:30:44 PM
Hi Tino,

Thank you for your reply, I'll try the second option as I'm locked out of the site all together right now.

Uploaded do_hooks.php to the route directory and it looked like this would work however its not sorted as yet.

Also tried a different browser

Call to undefined function TPortalHookLoadTheme()  :'( :'( :'( :'(

Kind Regards
Gavin

Hmmm, that shouldn't of happened. Let me look at that later this evening. I'll update with a new do_hooks.php file if this is the case.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: @rjen on September 30, 2020, 05:42:57 PM
Unless he ran do_hooks while TP was not installed?  :hmm:
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 01, 2020, 01:05:54 AM
Good Morning (8am)

I'm also a bit lost based on @rjen comment, attached is an image of my folders and I can see the folders regarding TP but now also noticed the folder ezportal.

When the site was available one of the menus was TP allowing the uploading of files, completing blocks, panels etc.

Come to think of it I might have installed ezportal before TP to test and play but decided to use TP. The database line I deleted may have been from that mod?

Should I see in the DB tables TP stuff, I ask because I don't see anything noted as TP but I was using TP on the site.

Would it be easier if you were to have access to the folder and files structure?
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 01, 2020, 01:27:54 AM
I think it's ok for you to do things currently. It's 1.30am here I'm the U.K. anyway.

Can you rename the file inside the TinyPortal folder called Integration.php to OldIntegration.php

That will stop the hooks being called and you should then be able to access the admin panel.

If that makes things worse rename it back to Integration.php
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 01, 2020, 01:30:26 AM
TinyPortal database tables will be smf_tp_articles for example
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 01, 2020, 01:37:38 AM
Geez Tino, get some sleep :)

I don't see a file named Integration.php however can see one named Integrate.php would this be the right one to change to OLD?

This was located in the TinyPortal folder.

Edit#
I tried the rename however still have the issue. (Changed back)

I located all the smf_tp_ tables (didn't notice a second page "lol") anyways I have changed the peramitors for the block I was trying to install to be switched off and matched to the prior table other than being off.

Tried a refresh but still receive the following error

Call to undefined function TPortalHookLoadTheme()
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 01, 2020, 07:32:22 AM
Can you confirm you have the TPCompat file in your sources directory.

Also if you can query the database can you go to the smf_settings table and check that the integrate_pre_include setting has TPCompat.php there.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 01, 2020, 07:48:32 AM
Hi Tino,

I can confirm I have TPCompat.php file under Sources.

Went through 9 pages under smf_settings table and was unable to see integrate_pre_include. Not sure if I am however in the right section tho. See attached
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: lurkalot on October 01, 2020, 08:11:32 AM
Hi Gavin, long time no see. (assuming this is your original username on here = Gav-Aus)

So you say you're "using a very fresh / new forum board" What's the story here? A little background info might help to track down the issue. I think the last time we chatted you were running SMF 1.1.15 and TP 1.0
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 01, 2020, 08:49:24 AM
Hi Mick,

Yes it is I "lol"

I think last time we caught up feels like 20 years ago :). I ended up having a stroke and ended up closing off many things including the online stuff for around ten years :(. Still working through health issues however with COVID-19 decided to locate and contact all (or as many as) the old members who used to run online with us all those years ago and as such have been looking to bring back our online gaming once again.

Glad to see your still here :)

In the last few weeks starting to put together a new web page and forum, I decided to go back to SMF and knowing how great TP was went down this road again "lol"

I've been able to build up a great board and starting to learn again the TinyPortal side again had everything set and in use, my last back up was Sept 26th so a lot of data had been added since however as I'd not added mods etc had not backed-up. The issue has come in to play when I tried to add a new left block which I was looking to use for the calendar as I remembered all those years back we could have a board to list calendar events which would be seen by those with the permission set.

I added the detail and generated the block however it failed, not seeing the wood for the trees tried to save again with the same result so selected back and boom had the error as noted on the first post.

Database error, given array of integer values is empty. (cat)

I've now assumed the issue was because I had not added the "category" option. I was unable to access the boards so went via the database (stupid I know) looking for the issue, located the last block noted as Calendar and drop'd the table.

Still had the issue and found my way searching these very boards :).

Tino has tried very hard to help out and suggested the do_hooks.php option however after trying this the error received is

Call to undefined function TPortalHookLoadTheme()

Additional suggestions have been made but this is where we're at now.

BTW, My health is much better, I can drive, dance and do very well considering :) Still have other issues and need to take care but enjoying things again.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 01, 2020, 09:34:12 PM
The following should show if the variable exists

SELECT value FROM smfyj_settings WHERE variable = 'integrate_pre_include'

If it doesn't show anything can you run the following

INSERT INTO smfyj_settings ( variable, value ) VALUES ( 'integrate_pre_include' , '$sourcedir/TPCompat.php' )
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 01, 2020, 11:53:53 PM
Hi Tino,

I've now reviewed the database and don't see the

SELECT value FROM smfyj_settings WHERE variable = 'integrate_pre_include'

So I had a couple of goes to insert (not really knowing what I'm doing) but managed to get this to now show.

[INSERT INTO smfyj_settings ( variable, value ) VALUES ( 'integrate_pre_include' , '$sourcedir/TPCompat.php' )

Hoping I have completed this right. Tried the domain and received

This page isn't working
austeamracing.com.au is currently unable to handle this request.
HTTP ERROR 500
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 02, 2020, 07:23:13 AM
Do you have an admin access you could PM me?

I think that's going to be most sensible now.

If not then I'll need to know what is in your Apache error log.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 02, 2020, 07:38:51 AM
Hi Tino

Just sent you a PM

Sorry to be such a pain and thank you for such great support.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 02, 2020, 09:40:15 AM
Hi Tino,

Sent another PM for you.

Thanks so much to where you have things right now :)
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: @rjen on October 02, 2020, 10:12:56 AM
Quote from: Gavin Chatt on October 02, 2020, 09:40:15 AM
Hi Tino,

Sent another PM for you.

Thanks so much to where you have things right now :)

Hey, it's back up!  O0

I trust that tino will let us (curious bystanders) know what happened...  ;)
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 02, 2020, 11:01:09 AM
It seems somehow all the hooks had been removed. So when we fixed TinyPortal the other modifications were also breaking the forum.

Unfortunately unlike TinyPortal they didn't show the error on the screen so just had a white page loaded and a 500 error.

I just reapplied those hooks and it appears to be working ok.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: @rjen on October 02, 2020, 11:51:19 AM
Any idea if TP somehow caused it to break?
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 02, 2020, 12:03:09 PM
Quote from: @rjen on October 02, 2020, 11:51:19 AM
Any idea if TP somehow caused it to break?

I don't think so, Gavin will be able to give us more of an idea. But I think either repair_settings.php or upgrade.php was run.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: Gavin Chatt on October 02, 2020, 12:47:57 PM
Hi All,

Firstly I just need to say a huge thank you to Tino and this support site. I really do appreciate all you guys do and what you've done Tino.

To confirm, yes I used repair_settings.php twice now, this first time was after I moved the board from the directory /forum after doing some testing and addition of data to the root directory, the second time was when trying to repair the board myself after the

Database error, given array of integer values is empty. (cat)

So in order of trying to fix since the above error and going by memory

Tried the do_hooks option.
Tried the Integration.php to OldIntegration.php change
Return the above filename to Integration.php
Web Site returned Call to undefined function TPortalHookLoadTheme()
Tried repair_settings.php and selected the hook option here.
Had no access to the website url at all
Checked for an inserted the suggested line to the database

I think that's how it all went.

A long time back I made a donation to this group and would like to see if this option is still available. I have always found the support is fantastic here.
Title: Re: TP TinyPortal 2.0.0 RC1 / SMF 2.0.17- Database Error
Post by: tino on October 04, 2020, 09:46:51 AM
Thanks for your feedback and kind comments.

With regards to a donation that's a conversation with lurkalot who runs and maintains this site.