Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Issues With Post.php In SMF 1.0.6, SMF Community No Help
SunBlind
post Feb 13 2006, 01:23 AM
Post #1


Advanced Member
Group Icon

Group: Members
Posts: 128
Joined: 27-June 05
From: Belington, WV
Member No.: 6,653



I've been having issues with my Post.php file for 3 weeks, but haven't been able to get any help from the SMF Community.

Somewhere during a manual intallation of a package my Post.php file was altered in a bad way, resulting in an error that prevents the post template from being displayed. If you visit this link, you'll see what I mean.

the only advice I have gotten in 3 weeks from the SMF Community was 1 person suggesting to reinstall SMF... but because of the amount of mods and packages I have installed, I am trying to avoid replacing my Post.php file with a brand new copy so I don't have to re-add them all, possibly resulting in more errors. If anyone could help me out and take a look at my Post.php file I would be extremely appreciative.
Go to the top of the page
 
+Quote Post
Houdini
post Feb 13 2006, 01:53 AM
Post #2


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



QUOTE(SunBlind @ Feb 12 2006, 07:23 PM) *

I've been having issues with my Post.php file for 3 weeks, but haven't been able to get any help from the SMF Community.

Somewhere during a manual intallation of a package my Post.php file was altered in a bad way, resulting in an error that prevents the post template from being displayed. If you visit this link, you'll see what I mean.

the only advice I have gotten in 3 weeks from the SMF Community was 1 person suggesting to reinstall SMF... but because of the amount of mods and packages I have installed, I am trying to avoid replacing my Post.php file with a brand new copy so I don't have to re-add them all, possibly resulting in more errors. If anyone could help me out and take a look at my Post.php file I would be extremely appreciative.

I went to the site and not being a member was unable to post so I am not sure what your problem is. Are you or your other member unable to post at all, or does it do something totally bizzare when you do post? I will downoad and run a plain version of SMF on my local machine and see what problems you are having. If you have modified it it is possible that the last modification caused the problem. Send me a PM and after an hour or so of seeing how SMF works as opposed to phpBB or Invision then I might be able to help.
Go to the top of the page
 
+Quote Post
vujsa
post Feb 13 2006, 02:31 AM
Post #3


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714
myCENTs:35.43



What was the last mod that you installed?

You should be able to reread the installation instructions for that mod to remove the mod altogether. If your forum begins to work correctly after removing the mod, you'll know for sure it was either the mod or an error in installing the mod.

If after the mod is remove everything is working correctly, make a backup of each file that is changed by the mod.

I usually download the file, in this case post.php and then make a copy of it on my system named post.php~.

Now I have two identical files:
post.php
post.php~

I can now edit the original file.

Install the mod one more time on the original files and then upload the both versions of the file (post.php and post.php~) to the server when done. If the problem occurs again, just delete the .php files and rename the .php~ files to .php.

I reccomend always creating a backup prior to editing a file. If you have added several mods, then you should create a backup prior to each. Like so:
post.php
post.php~1
post.php~2
post.php~3
post.php~4
post.php~5

Where post.php~5 would be the newest backup.

Even beter would be to date the backup:
post.php
post.php~11-21-2005
post.php~12-13-2005
post.php~01-07-2006
post.php~01-26-2006
post.php~02-08-2006

This way you can quickly remove bad mod installations.
Once you are sure that a backup is no longer needed, I suggest moving it off of your server to your local system and making a zip file of all of the removed backups. This will save space on the server for other things.


Have you rechecked your edits?

Sometimes just going through the installation instructions again and checking to see that what you did is what you were supposed to do can isolate the error. Maybe you place the new code before something when you were supposed to place it after. Stuff like that.

Maybe the mod you used isn't compatible with another mod you installed or is incompatible with the version of SMF you are using.

I know that this may not be the answer that you are looking for but without seeing the errors that you are having and without knowing what the code looks like now and what it looked like before, it isn't posible to narrow the list of possible causes.

vujsa
Go to the top of the page
 
+Quote Post
SunBlind
post Feb 13 2006, 03:21 AM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 128
Joined: 27-June 05
From: Belington, WV
Member No.: 6,653



Ugh, I totally forgot that I didn't grant guests posting permissions! I'm sorry, I've been so stressed out these past few weeks between my forum, my site, making MySpace layouts for people, and potty training my 2 year old...

Anywhos, I've granted topic creation and post replying permissions for guests, so you should be able to see the post page now.

Houdini: When trying to post, some of the forum's template does not display and I get an "invalid foreach argument," or something like that, error.

I'm pretty sure there is an extra or missing bracket somewhere, but I don't know which one to take out or where to add another.

vujsa: The last mod I installed through the package manager worked fine (the topic solved mod), I added some code that was posted in the package's thread to add and subtract certain features from it. I don't remember exactly why, but I decided to take the new code out and when I did I followed the instructions in reverse in it's entirety... But like I said, either I took out too much or not enough. I just can't seem to sort it out, though.

Thanks for the help, BTW smile.gif
Go to the top of the page
 
+Quote Post
vujsa
post Feb 13 2006, 03:41 AM
Post #5


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714
myCENTs:35.43



First of all, you have a code fragment at the begining of your page. This looks like a missing quote somewhere in your code.

Remember that because of the way that SMF works, the error may be in a file other than post.php. It could be an error in index.php as well. The fragment seems to be from the modify function. If you originally installed the mod with the package installer, there should have been a backup made on the files it cahnged. If that is so, uninstalling the mod using the package installer should take you back to a good configuration.

It might help if you made a copy of post.php and name it post.txt and give us the link to it so we can see the files contents. Also, I suggest providing the link in the forums at SMF since they are more familiar with the code there than we are.

vujsa
Go to the top of the page
 
+Quote Post
Houdini
post Feb 13 2006, 03:53 AM
Post #6


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



Yeah I saw the //--></script> and it is part of the index source, so somewhere there is something not closed or not even supposed to be there. So the problem is not just in the post I will attempt a post and from what SunBlind said it could be an imporper sql query that is causing the problem.
Go to the top of the page
 
+Quote Post
SunBlind
post Feb 13 2006, 10:08 PM
Post #7


Advanced Member
Group Icon

Group: Members
Posts: 128
Joined: 27-June 05
From: Belington, WV
Member No.: 6,653



Thanks for checkin it out, guys, I appreciate it smile.gif

However, I don't see how my problem can lay in index.php, since I never changed anything in that file at the time the problem occured. I was solely working in Post.php. I'm not trying to dismiss that possibility, but just for clarification purposes. I don't think it's an SQL error either, as the problem doesn't occur when I attempt to submit the post, it occurs when the post page is first called. Also, I've tried accessing the pages individually and Post.php is the only one returning errors.

Here is a link to my Post.php in text format

Also, when accessing Post.php directly, this is the outputted error:
// -->

Fatal error: Call to undefined function: theme_linktree() in /home/sunblind/public_html/tutorials/Sources/Post.php on line 143
Go to the top of the page
 
+Quote Post
SunBlind
post Feb 18 2006, 10:19 PM
Post #8


Advanced Member
Group Icon

Group: Members
Posts: 128
Joined: 27-June 05
From: Belington, WV
Member No.: 6,653



You guys gave up on me already, huh Lol
Go to the top of the page
 
+Quote Post
mastercomputers
post Feb 19 2006, 12:27 PM
Post #9


PESTICIDAL MANIAC
Group Icon

Group: Members
Posts: 626
Joined: 1-September 04
From: Auckland, New Zealand
Member No.: 27



Some of those commas, must be periods.

You aren't concatenating the variables correctly, whenever you do something like:
Taken from the first few lines, but this needs to be fixed throughout the code.
CODE

if ($context['show_spellchecking'])
        echo '
        <script language="JavaScript1.2" type="text/javascript" src="', $settings['default_theme_url'], '/spellcheck.js"></script>';


It should be:

CODE

if ($context['show_spellchecking'])
        echo '
        <script language="JavaScript1.2" type="text/javascript" src="'. $settings['default_theme_url']. '/spellcheck.js"></script>';


Notice where the periods are (src="') & (url']), whenever you break out of a 'string' and want to add a variable you'd do 'string' . $variable . 'more string' etc.

Hopefully you can sort it, you can't just replace every instance of a comma with a period, so you must do it manually or write a regular expression to check whether a comma follows a variable with optional whitespace.


Cheers,


MC
Go to the top of the page
 
+Quote Post
SunBlind
post Feb 20 2006, 01:52 AM
Post #10


Advanced Member
Group Icon

Group: Members
Posts: 128
Joined: 27-June 05
From: Belington, WV
Member No.: 6,653



That's odd because all of the code is like that... The only thing I did with the file was add in a few lines of code, but when I took it out I think I accidentally took out an extra line or two...

Ah oh well, it's been almost 3 weeks and I haven't been able to fix it, so I'll just get a new Post.php

Thanks for the reply smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What Linux Distro Do You Use?(12)
  2. Will There Be A Most Popular Music Player?(20)
  3. Game Glitches: Post All Glitches Here !(5)
  4. The Next Stage Of Human Evolution(24)
  5. What's Your Profession?(30)
  6. Counter-Strike Source Clans - Post Your Server IPs(18)
  7. I Cannot Embed A Google Video In A Joomla Post(5)
  8. ATI Radeon 9250 Issues(8)
  9. Read/Write Issues After Copying An Access .mdb File(3)
  10. Want To Create A Community Website(4)
  11. Oracle 10g Install Issues(27)
  12. Your Home Server!(5)
  13. Free Online Speed Test(16)
  14. Shared Hosting Account Server Update - Known Issues And Solutions(34)
  15. Hdd Stuck On Post(9)
  1. Help On Calc Date Issues !(4)
  2. Spam Issues...is Astahost Selling Our Addresses?(10)
  3. Session Issues(1)
  4. Gimp: Saving As... Issues(3)
  5. Opensuse Issues(4)
  6. Upgrade Windows Service Pack Issues(5)
  7. New Tutorials Have Issues(2)
  8. Game Key Press Issues(0)
  9. Issues With Htc Phone(0)
  10. Small Issues About Mysql Connector/j 5.1(2)
  11. No Post Count Forums Give Mycents(9)
  12. Issues With Vbulletin 3.6.8 P1 With Php 5.2.6(0)
  13. Test Post(6)


 



- Lo-Fi Version Time is now: 4th December 2008 - 11:11 PM