|
|
|
|
![]() ![]() |
Feb 13 2006, 01:23 AM
Post
#1
|
|
|
Advanced Member 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. |
|
|
|
Feb 13 2006, 01:53 AM
Post
#2
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
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. |
|
|
|
Feb 13 2006, 02:31 AM
Post
#3
|
|
|
Absolute Newbie 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 |
|
|
|
Feb 13 2006, 03:21 AM
Post
#4
|
|
|
Advanced Member 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 |
|
|
|
Feb 13 2006, 03:41 AM
Post
#5
|
|
|
Absolute Newbie 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 |
|
|
|
Feb 13 2006, 03:53 AM
Post
#6
|
|
|
Super Member 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.
|
|
|
|
Feb 13 2006, 10:08 PM
Post
#7
|
|
|
Advanced Member Group: Members Posts: 128 Joined: 27-June 05 From: Belington, WV Member No.: 6,653 |
Thanks for checkin it out, guys, I appreciate it
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 |
|
|
|
Feb 18 2006, 10:19 PM
Post
#8
|
|
|
Advanced Member Group: Members Posts: 128 Joined: 27-June 05 From: Belington, WV Member No.: 6,653 |
You guys gave up on me already, huh Lol
|
|
|
|
Feb 19 2006, 12:27 PM
Post
#9
|
|
|
PESTICIDAL MANIAC 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 |
|
|
|
Feb 20 2006, 01:52 AM
Post
#10
|
|
|
Advanced Member 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 |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 4th December 2008 - 11:11 PM |