TinyPortal

Development => Support => Topic started by: dmutha on May 16, 2007, 09:28:12 PM

Title: Undefined variable: aoptions, rating_votes, rating_average
Post by: dmutha on May 16, 2007, 09:28:12 PM
I'm getting the following errors.

SMF 1.1.2 and Tiny Portal 0.9.8 and I am running SMF_Gallery_Pro 1.7.1

I'm getting the following error message in the error log. Everything seems to work ok, but these messages are making me a bit crazy.

8: Undefined variable: rating_average
File: /home/content/html/smf/Sources/TPortal.php
Line: 1123
   
8: Undefined variable: rating_votes
File: /home/content/html/smf/Sources/TPortal.php
Line: 1122
   
8: Undefined variable: aoptions
File: /home/content/html/smf/Sources/TPortal.php
Line: 1112

Any ideas on how to troubleshoot or fix this?
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on May 16, 2007, 10:14:50 PM
Not something i have seen here before.
What setup do you have ? And do you have any other mods besides TP installed to your forum ?
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: dmutha on May 16, 2007, 11:02:23 PM
Quote from: G6â„¢ on May 16, 2007, 10:14:50 PM
Not something i have seen here before.
What setup do you have ? And do you have any other mods besides TP installed to your forum ?

Yes..

Here is the list of all the mods that i've got installed.
1.     Merge Double Posts      1.0.6
2.    SMF Gallery Pro    1.2.2    
3.    Monthly Statistics on Profile    1.0
4.    AutoSig    1.2
5.    Admin Notepad    1.0
6.    Rename Topic    1.0.2
7.    Reason For Editing Mod
8.    Spell Checker    1.0    
9.    User Email System    
10.    Active Members In Topic
11.    Ignore user    1.3    
12.    Ignore Boards    2.0.1    
13.    Max Subject Length    
14.    Enhanced Calendar    
15.    TinyPortal    0.983    
16.    EmailFlash    2.0    
17.    Registered Links    1.0
18.    Users Online Today Mod    1.4.0
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: granec on June 04, 2007, 12:13:08 PM
I'm having the same kind of report on my forum's error log using SMF 1.1.2, TinyPortal 0.983 and this few mods:

Sticky First Post (extends sticky topic)      1.3.2
YouTube BBC Tag (XHTML Compliant)    1.2

As you can see, almost a clean installation and also using default theme although default language is spanish_es. And by the way the forum's URL is http://bananet.com.ar

Hope this helps.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: IchBin on June 04, 2007, 11:04:31 PM
The errors are not TinyPortal errors. They are more than likely mod errors. Try a search at SMF for the name of your undefined error.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 05:13:56 AM
Same error here.  I wondered if it may be related to the Topic Rating mod, but neither of the above posters have it.  Nor do they have any over-lapping mods.

Is this definitely not related to TinyPortal?  I've just looked into TPortal.php and wondered if it could be related to the TP articles.  That's certainly what it looks like to me after an admittedly cursory glance at the afore-mentioned file.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 05:17:35 AM
Just re-downloaded TP and the references to these variables are in a clean unedited copy of TPortal.php so surely this error is directly related to TP, or do you think there is a mod conflict causing the errors? 

grancec has only two mods installed, so I'm inclined to think this is a TP problem.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 11:56:49 AM
It's not a TP related error, if you had done the search on SMF forums, you would have seen that it indeed is a conflick error with the rating mod ;)

Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 05:57:16 PM
I did search the SMF forums, as well as this one, and also Google.  Even running various search terms on there again now, I still can't find anything related to this issue.  Can you possibly direct me to the thread you're seemingly referring to, so that I can see if there is a fix?
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 06:10:34 PM
Download the manuall install package for TP and upload/replace all the old files through FTP
(make sure you do this to the Default Core theme)

If it's a Tp error this will be fixed if you replace the files with new ones.

You never mentioned what theme you get the errors in
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 06:24:40 PM
I've uninstalled the topic ratings mod, and I'm STILL getting these errors :-(  Any ideas?!
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 06:26:49 PM
Quote from: G6â„¢ on June 07, 2007, 06:10:34 PM
Download the manuall install package for TP and upload/replace all the old files through FTP
(make sure you do this to the Default Core theme)

If it's a Tp error this will be fixed if you replace the files with new ones.

You never mentioned what theme you get the errors in

Thanks, I'll give that a go! 

The theme is a copy of the default one, it was also happening on the default theme, but I've moved everyone over to the copy for the meantime, and the errors are still going.  I'll try reuploading the TP files then, fingers crossed this sorts it.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 06:45:23 PM
It's still happening :-(  I've got hundreds of pages of errors now:

QuoteApply Filter: Only show the error messages of this member  Ja'moke       Today at 06:39:05 PM
http://chilled.cream.org/corneringneatly/index.php
8: Undefined variable: rating_average
File: /home/chilled/public_html/corneringneatly/Sources/TPortal.php
Line: 1123
   
Today at 06:39:05 PM
http://chilled.cream.org/corneringneatly/index.php
8: Undefined variable: rating_votes
File: /home/chilled/public_html/corneringneatly/Sources/TPortal.php
Line: 1122
   

http://chilled.cream.org/corneringneatly/index.php
8: Undefined variable: aoptions
File: /home/chilled/public_html/corneringneatly/Sources/TPortal.php
Line: 1112
   

Just the same three errors, over and over again.  I don't know what to do. 

If I uninstall TinyPortal, all my settings will be stored in the database, I presume?  I would consider uninstalling and then reinstalling as long as I didn't have to reconfigure everything.

Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 06:53:35 PM
OK, I think I may be narrowing this down somewhat.  It looks like it ONLY gives an error when people click the "Home" button.  If people click "Forums", then it doesn't seem to register these three errors! 

Another odd thing is that when you do click "Forums", you are taken to the forums, but the "Home" tab is selected.

I did notice one other strange occurrence...when I was testing as a guest, threads were showing the right hand blocks WAY down the page, below the thread posts.  Fine when logged in though.  This didn't bother me as I turned off the right blocks when viewing the forums anyway.

I used package manager to install.  I'm thinking now it may be a good idea to uninstall, manually remove traces of TP (as that seems to be needed), and then try reinstalling.  But I would hate to have to go through all the configuration again.

EDIT:  Just tried switching everyone over to Babylon, and the exact same thing is happening.  Errors are generated for the "Home" page, but it's fine for "Forums"
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 07:02:05 PM
If you dont mind loosing all the other mods on your site, i can set your forum back to all default files with Tp installed, and you can go from there.
Then you have atleast every thing set back to default and working files.
PM me the FTP info and your forum URL with Admin account if you want to do this.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 07:08:33 PM
Thanks, but what would you do to get the board back in that state?  It's not my server and therefore I'm not comfortable giving out passwords etc. 

I would like to try uninstalling and then reinstalling my TinyPortal to see if this solves the problem.  Would either of these processes delete or over-write the existing data? 
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 07:09:38 PM
I replace all the SMF and TP files with a set of fresh ones.
And if you dont trust me, then you are on your own i guess.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: tick on June 07, 2007, 07:33:04 PM
I would trust G6 with my wife and kids if that means anything to ya.   :)
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 07:33:56 PM
Thanks anyway.

I have just uninstalled TinyPortal, and then reinstalled it.  Those three errors are still coming up when anyone clicks the Home button.  I don't know what to try next.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 07:35:45 PM
As i said, replace all files (both SMF and TP) with fresh files from the full packages.
Yes, it means you have to reinstall TP again.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 07:36:30 PM
Quote from: Tick on June 07, 2007, 07:33:04 PM
I would trust G6 with my wife and kids if that means anything to ya.   :)

It's not my server, though, so I don't give that info out as it's not really mine to give.

I'm thinking now about doing what he seems to suggest, i.e. backing up and renaming the forum folder, then uploading brand new files, then using repairsettings.php to (HOPEFULLY!) get my forum set up the way it was, but with no mods, yes?  Then I could try installing TinyPortal and see if it works this time.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 07:38:45 PM
No, you dont need to use the repair_settings.
The settings.php and settings_bak.php are left alone, they are the only files you leave alone. All the rest is what you replace.
And yes, all the mods installed will be gone, everything will be alike a new installed forum
And He is a She ;)
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 07:49:23 PM
Quote from: G6â„¢ on June 07, 2007, 07:38:45 PM
No, you dont need to use the repair_settings.
The settings.php and settings_bak.php are left alone, they are the only files you leave alone. All the rest is what you replace.
And yes, all the mods installed will be gone, everything will be alike a new installed forum

OK, understood!  Thank you for your time and patience here.  TP looks ACE, I'm eager to get it running right.

QuoteAnd He is a She ;)

Heh, apologies :-)
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 09:28:21 PM
Oh no!  It's STILL doing it!

Clean SMF install, then installed TP, go to Home and it gives me those three errors in the error log.

It's SMF 1.1.2 by the way.

I don't know what else to do.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: Neil on June 07, 2007, 09:50:51 PM
OK...it's me again :-)  I have decided to have another look at the source code of TPortal.php

I looked for the function where the error is being generated from, and as far as I can see, it is function TPortal_init()

So I've taken the clean TPortal.php file, and added $rating_average, $rating_votes, $aoptions to the declaration of global variables in this function.

And...IT SEEMS TO WORK! 

I'm surprised that others don't seem to have had this error, perhaps people just don't generally look in their error logs?!  Could some folks maybe do it now and see if you can find the errors that have been mentioned in this thread?

Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: tick on June 07, 2007, 10:01:01 PM
I have installed TP in to many forums to count.  I check errors logs four and five times a day.  I have not had this error with any tp install I have done.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on June 07, 2007, 11:00:42 PM
QuoteI'm surprised that others don't seem to have had this error, perhaps people just don't generally look in their error logs?!  Could some folks maybe do it now and see if you can find the errors that have been mentioned in this thread?

I can assure you that if there is something we do, it's crawling around in the error log as TinyPortal are a beta product. Every little error we see or hear about, we try to duplicate on our own sites or testsites so we can fix them up.
And as Tick say, we have installed this, and been to sites and have members that have TP installed in thousands by now, and not one error of this type have accured.
I still think it's something else that generate the error on your forum, the "fix" you made probably made a workaround for the error, but a clean install  of SMF and TP foesent have this error any where.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: granec on June 08, 2007, 04:56:00 PM
Quote from: Neil on June 07, 2007, 09:50:51 PM
OK...it's me again :-)  I have decided to have another look at the source code of TPortal.php

I looked for the function where the error is being generated from, and as far as I can see, it is function TPortal_init()

So I've taken the clean TPortal.php file, and added $rating_average, $rating_votes, $aoptions to the declaration of global variables in this function.

And...IT SEEMS TO WORK! 

I'm surprised that others don't seem to have had this error, perhaps people just don't generally look in their error logs?!  Could some folks maybe do it now and see if you can find the errors that have been mentioned in this thread?


I've done the same as you did and it seems to work for me too.
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: gczapko on August 03, 2007, 06:11:00 PM
Hello,

I have a default theme installation ver 1.1.3 & TP 0.983.

I'm having the same problem with this error. I only have the Ignore User Mod 1.3 and EmailFlash 2.0 Mod installed. If I re-install the TP and SMF files manually, will I lose all the member and post data? It doesn't seem that I should.

It does seem to be related to a user clicking the Home Button.

Do all the files need to be replaced or has anyone found the particular culprit?

Thanks
Title: Re: Undefined variable: aoptions, rating_votes, rating_average
Post by: G6Cad on August 03, 2007, 10:19:08 PM
Tiresome that you cant use the search your self on simplemachines.org
The errors listed are NOT tp errors.

Error 8: Undefined variable: rating_votes (http://www.simplemachines.org/community/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwxMjYsMTksOSwxMCwxMSwyMCwxMzIsMTMzLDEzNCwxMzUsODYsMyw3OSwzOCwyLDEyLDEzOSwxNDAsMTcsNjAsNzIsMTE1LDU5LDEzNywzNywzMyw3NywxMzgsMzQsOTYsMTA2LDUsNDAsNTYsMTE2LDQsNiw4LDQxLDM1LDUwLDUxLDcsMTI4LDEyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0X2RpcnwnfGRlc2N8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c2VhcmNofCd8cmF0aW5nX3ZvdGVz)

Error rating_average (http://www.simplemachines.org/community/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwxMjYsMTksOSwxMCwxMSwyMCwxMzIsMTMzLDEzNCwxMzUsODYsMyw3OSwzOCwyLDEyLDEzOSwxNDAsMTcsNjAsNzIsMTE1LDU5LDEzNywzNywzMyw3NywxMzgsMzQsOTYsMTA2LDUsNDAsNTYsMTE2LDQsNiw4LDQxLDM1LDUwLDUxLDcsMTI4LDEyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0X2RpcnwnfGRlc2N8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c2VhcmNofCd8cmF0aW5nX2F2ZXJhZ2U=)

Error 8: Undefined variable: aoptions (http://www.simplemachines.org/community/index.php?action=search2;params=YWR2YW5jZWR8J3wwfCJ8YnJkfCd8MSwxMjYsMTksOSwxMCwxMSwyMCwxMzIsMTMzLDEzNCwxMzUsODYsMyw3OSwzOCwyLDEyLDEzOSwxNDAsMTcsNjAsNzIsMTE1LDU5LDEzNywzNywzMyw3NywxMzgsMzQsOTYsMTA2LDUsNDAsNTYsMTE2LDQsNiw4LDQxLDM1LDUwLDUxLDcsMTI4LDEyOXwifHNob3dfY29tcGxldGV8J3x8InxzdWJqZWN0X29ubHl8J3x8Inxzb3J0X2RpcnwnfGRlc2N8Inxzb3J0fCd8cmVsZXZhbmNlfCJ8c2VhcmNofCd8YSBvcHRpb24=)