News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Need help isolating error, please.

Started by Grammy, July 28, 2016, 07:47:51 PM

Previous topic - Next topic

Grammy

In 2.0.11 default, I've got this error:

Undefined index: poster

In this line (Post.template.php):

if(isset($_REQUEST['m']))
$message = 'Reply to message # [url=?topic=' . $_REQUEST['topic'] . '.msg' . $_REQUEST['m'] . '#msg' . $_REQUEST['m'] . ']' . $_REQUEST['m'] . '[/url] by ' . stripslashes($_REQUEST['poster']) . '[hr]' . "\n";


I keep all my installed mods together in a folder and ran a search for 'poster' within that folder but none of those mods add 'poster' to Post.template.php.  Does this look as if it still might be mod-related to you guys?  I'm just having a bit of trouble isolating the source.

Kindred

Well, since the core installation serves no errors, it is obviously mod related...however, we need more information

What mods do you have installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Grammy

Many, I'm afraid.  I've not thrown many errors but this one just piped up today, when someone was posting.

1.     XPtsp.com Style Boards   
2.     Board Notes   1.0.8     
3.     Add These Sites in Profile, Post & Memberlist   
4.     Users Online Today   
5.     SMFPacks Shoutbox Pro   
6.     Set News Fader height   
7.     Another YouTube BBCode Tag   
8.     Separate the sticky topics   1.0.1     
9.     Justify BBC   1.0.0     
10.   Sortable Packages (and Installed Time)   
11.   Member NotePad   2.0.3     
12.   Drafts      
13.   NiceTooltips   1.9     
14.   Breeze   1.0.10     
15.   SimpleDesk
16.   Enhancements to recent posts   
17.   Misc Anti Spam   1.0     
18.   Default Avatar by Username   
19.   Colorize Post 1.0   (updated version for 2.0.X)
20.   Lazy Admin Menu   1.16     
21.   Set order for sticky topics   
22.   SimplePortal   2.3.6     
23.   SMF Gallery Lite   5.6     
24.   InLine Attachments   1.2.1     
25.   Image Floating to Left or Right BBCode   
26.   Dynamic_Memberlist   3.0
27.   Ultimate Profile   0.9.1     
28.   PMXBlog   1.1     
29.   SMF Arcade   2.51     M
30.   Tabbed smileys   
31.   cbi 1.0   1.8.1

Illori

can you post the complete error message rather then what you think we need to know?

Grammy

http://example.com/index.php?action=post2;start=0;board=28
Undefined index: poster
/var/www/vhosts/example.com/httpdocs/Themes/default/Post.template.php
Line: 403

$message = 'Reply to message # [url=?topic=' . $_REQUEST['topic'] . '.msg' . $_REQUEST['m'] . '#msg' . $_REQUEST['m'] . ']' . $_REQUEST['m'] . '[/url] by ' . stripslashes($_REQUEST['poster']) . '[hr]' . "\n";



Illori

the error is related to stripslashes($_REQUEST['poster']) given that there is a hard coded text string there, this has to be added manually or by a mod.

Grammy

Quote from: Illori on July 29, 2016, 07:17:10 AM
the error is related to stripslashes($_REQUEST['poster']) given that there is a hard coded text string there, this has to be added manually or by a mod.


Yes, I felt it must be, but I was unable to find 'poster' when searching the files in the folder where I keep copies of all the mods I've installed.  I asked here on the off-chance that this might be something you guys have seen before.  I'm not having anything come up in Search.  I'll expand my search outside the forum; perhaps something will show up in Google.  Thanks!

Illori

can you attach the file to your next post? that may lead us further then you going to google.

Grammy

Quote from: Illori on July 29, 2016, 07:40:41 AM
can you attach the file to your next post? that may lead us further then you going to google.

Yes, thank you.  I just searched the mods folder for all mods using the term "stripslashes" and even Post.template.php (xml files) but I'm hitting a wall.

The template is attached.  Having just pulled it from my server, I see that the last edit date is June 7, 2016.  According to my mod installation dates, the Drafts mod was installed on that day.  I've just discovered 'poster' in Drafts.php here:

'poster' => $user_info['id'],

on line 621.  I'm attaching that file, as well, in case it might be the culprit.  The XML does edit Post.template.php, however, it does not edit line 403 and it does not add 'poster' to that template.

Illori

i would just remove lines 402 and 403 from your file. it looks like it is trying to add some text to the post box and it is failing to get the name of the user that is making the reply.

Grammy

Quote from: Illori on July 29, 2016, 08:13:27 AM
i would just remove lines 402 and 403 from your file. it looks like it is trying to add some text to the post box and it is failing to get the name of the user that is making the reply.


Thank you, Illori; I will, and just keep a backup of it, as is.   :)

Advertisement: