News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

A lot of "undefined xxx" errors after upgrade.

Started by Kaurin, December 07, 2011, 07:07:13 AM

Previous topic - Next topic

Kaurin

Hello. I have been assigned to help a large forum to convert to 2.0.1. I warned them that this will be a rough ride with lots of troubleshooting, and yet they still insisted on the convert. The forum in question is live, running and doing well, but there are some errors.

First, I will explain my upgrade procedure:

       
  • I have downloaded the upgrade package
  • Upgraded the forum successfully
  • Saw that error logs were piling up with various errors - package related
  • I have uninstalled and deleted all the packages
  • A lot of errors were still appearing, but that was because of the theme modifications
  • I have uninstalled ALL themes
  • I have suspended access to the forum with htaccess
  • Deleted Sources and Themes
  • Copied the original 2.0.1 Sources and Themes
The error logs are now a lot more silenced... only a few errors remain which confuse me. I know they are somehow related to the previous forum configuration, but I have no idea how to troubleshoot this, since i'm not a php programmer

Examples:

User Dacha, time: 11:07:10, 3 messages, same error, different lines

Quote
xxforumrootxx/index.php?action=pm
8: Undefined index: name
Datoteka: /home/vwclub/public_html/forum/Themes/default/PersonalMessage.template.php
Linija: 625

xxforumrootxx/index.php?action=pm
8: Undefined index: name
Datoteka: /home/vwclub/public_html/forum/Themes/default/PersonalMessage.template.php
Linija: 620

xxforumrootxx/index.php?action=pm
8: Undefined index: name
Datoteka: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Linija: 363

User Shone190, time 07:46:09

Quote
xxforumrootxx/index.php?action=pm;f=inbox;l=-1;done=sent
8: Undefined index: name
Datoteka: /home/vwclub/public_html/forum/Themes/default/PersonalMessage.template.php
Linija: 466

xxforumrootxx/index.php?action=pm;f=inbox;l=-1;done=sent
8: Undefined index: nameDatoteka: /home/vwclub/public_html/forum/Themes/default/PersonalMessage.template.php
Linija: 466

xxforumrootxx/index.php?action=pm;f=inbox;l=-1;done=sent
8: Undefined index: name
Datoteka: /home/vwclub/public_html/forum/Themes/default/PersonalMessage.template.php
Linija: 466

xxforumrootxx/index.php?action=pm;f=inbox;l=-1;done=sent
8: Undefined index: name
Datoteka: /home/vwclub/public_html/forum/Themes/default/PersonalMessage.template.php
Linija: 466

... totaling 22 times from shone190

Basically the pattern is this:

On this link: xxforumrootxx/index.php?action=pm
I get this error: 8: Undefined index: name
On these lines: 363, 620, 625

On this link: xxforumrootxx/index.php?action=pm;f=inbox;l=-1;done=sent
I get this error: 8: Undefined index: name
On line 464, 466 - but it repeats various number of times (same second both lines, but 466 repeats)

I get other errors, all are somehow related to personal messages:


xxforumrootxx/index.php?action=pm;sa=pmactions;f=inbox;start=0
8: Undefined index: unread_messages
Datoteka: /home/vwclub/public_html/forum/Sources/PersonalMessage.php

...Undefined index: id, Undefined index: unread_messages, undefined_offset:0, Undefined_id ...

I am also a hosting linux administrator on the shared hosting machine this site is hosted on. Could you guys offer me some assistance?

I am willing to reset any and all previous 1.x plugin settings that were applied before upgrades if you think that this is what is causing it, but you will also have to tell me how to do it because I'm relatively new to SMF

Thank you!

Joker™

When you make an upgrade to a forum all mods are uninstalled automatically.

Are there any mods installed on the forum after the upgrade?
Also attach the below mentioned files in next reply

- themes\default\PersonalMessage.template.php
- Sources\PersonalMessage.php
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

Thank you very much for your response Joker!

No packages are installed, and the forum still generates error messages.
As i said earlier: i have even tried copying the original smf 2.0.1 sources and themes folders, but it still generates same errors.
These two files are from my server. They should be exactly the same as smf 2.0.1 files



Kaurin

Bump, and a new error after enabling "Warn" builtin system

http://www.vw-club.rs/forum/index.php?action=profile;u=29526;area=issuewarning
2: sprintf() [<a href='function.sprintf'>function.sprintf</a>]: Too few arguments
File: /home/vwclub/public_html/forum/Sources/Profile-Actions.php
Line: 327

repeats often


Also: here is a list of disabled functions on our hosting provider:


allow_url_fopen, apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru, php_uname, phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode

P.S.
average user count at any time is 50-100

Joker™

Sorry for a bit delayed response. Your files seems to be absolutely fine.

Does these errors appears on english language pack also (the default one which comes with smf)?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

I will reply again in ~15 hours from now

I am setting the forum to English and resetting the error logs. You rock Joker!

Kaurin

#6
Sorry for the doublepost. The errors are still there, no need to wait till morning

I had set the board so the users can't change their language, when setting the board to english before.

Example:
User: Madison, Time : 11:41:47
errors follow

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined index: unread_messages
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 365

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;
reply;wap2
8: Undefined index: idFile: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 364

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined index: name
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 363

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined index: id
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 362

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined index: unread_messages
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 359

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined index: id
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 355

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined index: messages
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 229

xxxforumxxx/forum/index.php?action=pm;sa=send;pmsg=153339;u=22516;reply;wap2
8: Undefined offset: 0
File: /home/vwclub/public_html/forum/Sources/PersonalMessage.php
Line: 229

and then they would repeat. not always in the same order, and not always all of them.


Edit: i have seen this one before too, I don't know if i had mentioned it. This one repats on line 1291 for the same file

xxxforumxxx/forum/index.php?action=pm;f=inbox;l=-1;done=sent;wap2
8: Undefined index: name
File: /home/vwclub/public_html/forum/Themes/default/Wireless.template.php
Line: 1291

xxxforumxxx/forum/index.php?action=pm;f=inbox;l=-1;done=sent;wap2
8: Undefined index: id
File: /home/vwclub/public_html/forum/Themes/default/Wireless.template.php
Line: 1291

Edit2 ^ updated this previous edit. undefined index id/name

Joker™

And all of the error seems to be related to labels created for Personal messages.

Just curious to know does those errors appears with your profile too?
Have you created any labels so far for your PM's?

If answer to both of above question is no, then please create a label for your PM and see if error appears from profile too.
To create label -- Personal Messages » Manage Labels 
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

I am pretty sure that it has happened with my profile too. Lets say "no" to both questions.

I have created a label "test"

i have went into my inbox and started labeling random pms

I don't see any errors so far. Would you like me to test some more?


Joker™

Quote from: Kaurin on December 09, 2011, 08:07:37 AM
I am pretty sure that it has happened with my profile too. Lets say "no" to both questions.

I have created a label "test"

i have went into my inbox and started labeling random pms

I don't see any errors so far. Would you like me to test some more?

The lines pointed out in errors are related to PM's labels. Yeah for sure, try to send some PM to some other id(a dummy account of yours) and see if the error pops up.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

Hmm... This is what I have tried:

Adding label test to random messages
Adding label test to all messages
Removing label test from random messages
Removing label test from all messages
Removing label "inbox" from all messages
Sending messages
Replying to messages (labeled and unlabeled)

So far - nothing.

Could you suggest what else to try regarding labels and PMs ?

Joker™

Quote from: Kaurin on December 09, 2011, 10:51:07 AM
Hmm... This is what I have tried:

Adding label test to random messages
Adding label test to all messages
Removing label test from random messages
Removing label test from all messages
Removing label "inbox" from all messages
Sending messages
Replying to messages (labeled and unlabeled)

So far - nothing.

Could you suggest what else to try regarding labels and PMs ?
Wow this getting way more confusing then what I thought of.

Umm whats the member group of the members who were able to generate those errors? Try the same test having there member group on the dummy account.


One more thing can you check the label column in database for those member (if you are comfortable with it) ad post the result here.
prefix_members (replace prefix with the prefix you have used for your forum)


P.S - I'm pretty sure fix is going to be a very easy one :P.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

#12
Most of the members are from the group "Uprava Kluba" (Club management), but it is because they PM each other often (my guess). They hang out on the forums a lot, almost constantly online.

But i have just seen another one showing up who is just a "Junior Member" - ~200 posts

I have created a dummy account with a primary group of  "Uprava Kluba", tried troubleshooting with the above tests, and i did not show up in the logs.

I am comfortable with phpmyadmin :) There is no column "labels" but there is "message_labels" None of those error msg members have any labels set

edit:

i have just sorted the smf_members table by "message_labels"

only 6 members have labels. I see that there is one member who has this label: "[URL=http://img441.i"

I am not touching it for now.


Joker™

Quote from: Kaurin on December 09, 2011, 01:14:29 PM
Most of the members are from the group "Uprava Kluba" (Club management), but it is because they PM each other often (my guess). They hang out on the forums a lot, almost constantly online.

But i have just seen another one showing up who is just a "Junior Member" - ~200 posts

I have created a dummy account with a primary group of  "Uprava Kluba", tried troubleshooting with the above tests, and i did not show up in the logs.
Meh, so we got a issue which we can't replicate.


QuoteI am comfortable with phpmyadmin :) There is no column "labels" but there is "message_labels" None of those error msg members have any labels set
Lol, I was in a bit of hurry so must have mistyped it.


Quote from: Kaurin on December 09, 2011, 01:14:29 PM
edit:

i have just sorted the smf_members table by "message_labels"

only 6 members have labels. I see that there is one member who has this label: "[ URL=http://img441.i"

I am not touching it for now.
Again a very basic question, out of these 6 members has anyone produced the concerning error in error log?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

One of them is me, and i have not seen any of the 5 in any of the error logs.

I have reset the logs around 4 hours ago

I will list the members showing now:

GTI 16V
Madison (this guy shows up a lot)
pokemoni (this guy shows up a lot)
Arsinov

None of them use labels

Joker™

Administration Center » Forum Maintenance » Routine

Find and repair any errors
Recount all forum totals and statistics
Empty out unimportant logs
Empty the file cache

Clear your error log and run all of the above mentioned tasks. See if the errors still appears.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kaurin

All right. Done. Will keep you posted in about few hours


Joker™

Hmm, I've made a post to know the views of other team members too.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

ok while making a reply someone a vague code came to mind :P.

This is just a test code to see the root of the issue.

As you have mentioned above that you are getting errors at
Line: 466, PersonalMessage.Template.php


Go to themes\default\PersonalMessage.template.php (Make backup of file before editing it)

Code (Find:) Select

if (!$message['fully_labeled'])
{
echo '
<option value="" disabled="disabled">', $txt['pm_msg_label_apply'], ':</option>';
foreach ($context['labels'] as $label)
if (!isset($message['labels'][$label['id']]))
echo '
<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
}



Code (Replace it with:) Select

if (!$message['fully_labeled'] && !empty($context['labels']))
{
echo '
<option value="" disabled="disabled">', $txt['pm_msg_label_apply'], ':</option>';
foreach ($context['labels'] as $label)
if (!isset($message['labels'][$label['id']]))
echo '
<option value="', $label['id'], '">&nbsp;', $label['name'], '</option>';
}
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: