TinyPortal

Development => Support => Topic started by: sburke930 on September 07, 2009, 06:42:56 AM

Title: [SOLVED] Shoutbox Error
Post by: sburke930 on September 07, 2009, 06:42:56 AM
I have been getting a persistent error that I have not been able to resolve.

I am running SMF 1.1.10
TP 1.0 Beta 4

Mods installed:

1. Admin Notepad 1.0  
2. Custom_Greeting_Depending_on_Time 1.1
3. Aeva ~ Auto-Embed Video & Audio 6.9.101  
4. Force Topic Read On Login Mod 2.1    
5. SMF Arcade 2.0.18  
6. User Control Panel By Alan S 2.0    
7. Users Online Today Mod 1.4.0    
8. Global Headers Footers 1.4.1    
9. Post_and_Change_as_Alternate_User 1.0  
10. Internal_Links_Use_Same_Window 1.2    
11. Treasury 2.36    
12. Reply Button in All Posts 1.1    
13. Aligned and Bilateral Child Boards 1.4  
14. Show Number of Errors at Top of Forum 1.0  
15. Add Domaintools to TrackIP 1.0    
16. Download Quota 1.1    
17. modVersion 1.0.0    
18. Custom Copyright 1.1    
19. Signature Settings Mod 1.1  
20. SMF Arcade Category Select Mod 1.0.2    
21. User Email System 1.3    
22. TinyPortal 1.083  


Here is the error

Warning: Illegal offset type in isset or empty in /home/XXXXXXX/public_html/Sources/TPmodules.php on line 1994

Here is line 1994
if($context['TPortal']['action']=='tpmod' && isset($_GET[$body]))

What do I need to change in order to get this error to go away?

Also, when I try to open the simple shout module, I get "unable to load 'main' template"

Thank you in advance for your help!

Title: Re: Shoutbox Error
Post by: G6Cad on September 07, 2009, 07:32:06 AM
What shoutbox is it that give you the error ? 
Advanced shoutbox is no longer supported and TP Shoutbox is the one you should install through the modules.

Please add a link to your site so we can look at it.

The other error you can copy and paste the error message in a search and you will have the answers on that one.
Title: Re: Shoutbox Error
Post by: sburke930 on September 07, 2009, 04:48:21 PM
I am using the simple shoutbox.  I have looked everywhere for an answer to this error which is why I posted.  The error does not show in the forum, it is in the error box itself. 

This is a new install with no previous versions.
Title: Re: Shoutbox Error
Post by: G6Cad on September 07, 2009, 05:07:46 PM
Until you provide a link to your site, we will not be able to help you any further..

And did you search for "unable to load 'main' template"
Title: Re: Shoutbox Error
Post by: sburke930 on September 07, 2009, 05:15:11 PM
Yes I did and there was no answer to the shoutbox module, only to articles.  And to previous versions of shoutbox/TO which I have neither.
Title: Re: Shoutbox Error
Post by: G6Cad on September 07, 2009, 05:39:55 PM
How do I manually install TinyPortal (http://docs.tinyportal.co.uk/index.php?topic=29)

Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)

Got the link in PM and from the looks of it, tp didnt get installed properly.


Follow the guides i linked to and i think you will be good to go  :up:
Title: Re: Shoutbox Error
Post by: sburke930 on September 07, 2009, 07:16:30 PM
Well, there were some things that were missing but that did not help the shoutbox error.....grrrrr
Title: Re: Shoutbox Error
Post by: sburke930 on September 07, 2009, 07:34:56 PM
I fixed it!!!!!

Here is the original code on line 1994 of TPmodules.php
if($context['TPortal']['action']=='tpmod' && isset($_GET[$body]))

I changed it to this:
if($context['TPortal']['action']=='tpmod' && isset($_GET['tpmod'],$body))

This was NOT addressed in the instructions you gave me so it may need to be changed!

Thank god that is over.  I have 3 hairs left on my head!!

Thank you G6 for making me think harder!!  :laugh:

I am not thanking you for the loss of hair!!!   :knuppel2: :tickedoff: :knuppel2:
Title: Re: [SOLVED] Shoutbox Error
Post by: IchBin on September 07, 2009, 07:39:21 PM
The code you posted makes no sense. Your error may have gone away, but that does not mean some other error won't appear as the result of your change.
Title: Re: [SOLVED] Shoutbox Error
Post by: sburke930 on September 07, 2009, 07:41:02 PM
That error was specific to posting any shouts.  I am working on the unable to load the 'main' template error.
Title: Re: [SOLVED] Shoutbox Error
Post by: sburke930 on September 07, 2009, 07:49:16 PM
After looking at tpmodules.php file I noticed that every other line referred to something in the brackets other than [$body].  This line was the only line that looked that way and once I changed it, the error when a shout was posted disappeared.

Why would that line be different from every other line in the tpmodules.php file?
Title: Re: [SOLVED] Shoutbox Error
Post by: IchBin on September 07, 2009, 07:52:57 PM
But the other lines are looking for something in_array(). isset does not take two parameters as you have done in your code. isset() checks to see if a variable has been declared. If it "is set" then it returns true or false. in_array() takes two parameters, thats why the other lines look different.
Title: Re: [SOLVED] Shoutbox Error
Post by: Freddy on September 07, 2009, 08:02:28 PM
I concur...
Title: Re: [SOLVED] Shoutbox Error
Post by: sburke930 on September 07, 2009, 08:35:04 PM
So from what you are saying it should look like this:

if($context['TPortal']['action']=='tpmod' && isset($_GET['dl']))

In other words ",$body" should be removed completely?
Title: Re: [SOLVED] Shoutbox Error
Post by: IchBin on September 07, 2009, 09:23:31 PM
The more important thing is to figure out a fix, not a band aide. Why isn't $body working? Can you figure out, when you are getting this error? Are you only getting it after doing something specific? Are you only getting it if you have a certain setting disabled or enabled? All part of debugging. If you can figure it out, we can post something to the bugtracker for Bloc to fix.
Title: Re: [SOLVED] Shoutbox Error
Post by: sburke930 on September 07, 2009, 09:32:54 PM
The error occurs when a post is made in the shoutbox.

More importantly to the question, why is $body not in the line for 'dl'?  That code is almost exactly the same as 'tpmod' and where line 1994 had "$body" in the brackets, the line for the dlmanager has "dl" in the brackets without $body present.  Which was the basis for changing the code on line 1994.

Shouldn't these lines reflect alike actions?
Title: Re: [SOLVED] Shoutbox Error
Post by: Syndel on October 13, 2009, 04:26:47 PM
I am having the

An Error Has Occurred!
Unable to load the 'main' template.

thing....
So, what is the practical solution for code dumbs like me?
Title: Re: [SOLVED] Shoutbox Error
Post by: G6Cad on October 13, 2009, 04:30:29 PM
Click me please (http://www.tinyportal.net/index.php?action=search2;params=YWR2YW5jZWR8J3wxfCJ8YnJkfCd8MTIsMjUsMTEwLDcwLDY5LDU5LDYwLDkxLDcyLDkzLDk0LDk2LDIwOCwxNSwxMDksMTI5LDE2Miw4OSwxNTQsNDYsMTMzLDIxNiwxMzAsODUsNjgsMTE4LDExOSwxMjAsMTMxLDE3NSw1Niw5NywxMTcsMTk3LDM2LDM1LDE5MSwxOTIsMTkzLDE5NCwxNzAsMTEzLDksMTUxLDg4LDMxLDExNSw2MywzMiwyNywyNiwyMywyMiwyMSwyMCwxOSwxOCwxNywyOSwxNTUsNzYsMTQ5LDE0NiwxMjIsMTA1LDg0LDgyLDEzNCwxNzEsMTc2LDE4MCwxNTYsMTUyLDEzNiwxMTQsMTA2LDkwLDgzLDgxLDgwLDc5LDc3LDc1LDczLDY1LDExNiwxNTgsMTU5LDE2MywxNjYsMTcyLDE3OCwxODMsMTg3LDE5OCwyMDUsMTU3LDEzOSwxMDgsNzgsNzQsMTY3LDE4OCwxOTUsMTI3LDEyOCwyMDEsMjEyLDMwLDgsNTEsMTIxLDU4LDE0Myw1MiwzMywyMDAsNTAsMTA3LDEyMywxMjQsMTM1LDEzNywxMzgsMTQ0LDE0NSwxNTAsMTUzLDE2MCwxNjEsMTY0LDE2OCwxNjksMTczLDE3NCwxNzcsMTc5LDE4MSwxODIsMTg0LDE4NiwxODksMTkwLDE5NiwxOTksMjAzLDIwNCwyMDYsMjEwLDIxMSwyMTMsMjE0LDIxNSw5OCw5OSwxNDAsMTQ4LDIwMiwxNDEsMTQyLDE0N3wifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0X2RpcnwnfGRlc2N8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c2VhcmNofCd8VW5hYmxlIHRvIGxvYWQgdGhlIFwnbWFpblwnIHRlbXBsYXRl)